加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

vagrant up报错 Warning: Authentication failure. Retrying...

发布时间:2020-12-13 22:18:28 所属栏目:Linux 来源:网络整理
导读:windows下vagrant报错,老是提示Warning: Authentication failure. Retrying...,并且运行完毕后没有共享文件夹,郁闷... 网上找资料,逛论坛,终于有了解决方法,最起码能运行了,贴出来分享一下。 不废话了,下面是报错代码和解决方案: 本地环境win7,vag

windows下vagrant报错,老是提示Warning: Authentication failure. Retrying...,并且运行完毕后没有共享文件夹,郁闷...

网上找资料,逛论坛,终于有了解决方法,最起码能运行了,贴出来分享一下。

不废话了,下面是报错代码和解决方案:

本地环境win7,vagrant版本1.8.5,virtualbox版本5.0.4

vagrant box add centos71 vagrant-centos-7.1.box

vagrant init centos71

?

报错代码:

?

 1 f:box>vagrant up
 2 ==> default: Attempting graceful shutdown of VM...
 3     default: Guest communication could not be established! This is
 4 se
 5     default: SSH is not running,the authentication information was
 6     default: or some other networking issue. Vagrant will force hal
 7     default: capable.
 8 ==> default: Forcing shutdown of VM...
 9 ==> default: Clearing any previously set forwarded ports...
10 ==> default: Fixed port collision for 22 => 2222. Now on port 2200.
11 ==> default: Clearing any previously set network interfaces...
12 ==> default: Preparing network interfaces based on configuration...
13     default: Adapter 1: nat
14 ==> default: Forwarding ports...
15     default: 22 (guest) => 2200 (host) (adapter )
16 ==> default: Booting VM...
17 ==> default: Waiting for machine to boot. This may take a few minut
18     default: SSH address: 127.0.0.1:2200
19     default: SSH username: vagrant
20     default: SSH auth method: private key
21     default: Warning: Authentication failure. Retrying...
22 23 24 25 26 27 28 29 The guest machine entered an invalid state while waiting  it
30 to boot. Valid states are 'starting,running'. The machine is in th
31 paused' state. Please verify everything is configured
32 properly and try again.
33 
34 If the provider youre using has a GUI that comes with it,
35 it is often helpful to open that and watch the machine,since the
36 GUI often has more helpful error messages than Vagrant can retrieve
37 For example,if youre using VirtualBox,run `vagrant up` while the
38 VirtualBox GUI is open.
39 
40 The primary issue for this error is that the provider youre using
41 is not properly configured. This is very rarely a Vagrant issue.

?

解决方法:

?

 1 # -*- mode: ruby -*-
 2 # vi: set ft=ruby :
 3 
 4 # All Vagrant configuration is done below. The "2"  Vagrant.configure
 5 # configures the configuration version (we support older styles for
 6 # backwards compatibility). Please dont change it unless you know what
 7 # youre doing.
 8 
 9 Vagrant.configure(") do |config|
10   # The most common configuration options are documented and commented below.
11   # For a complete reference,please see the online documentation at
12   # https://docs.vagrantup.com.
13 
14   # Every Vagrant development environment requires a box. You can search 15   # boxes at https:atlas.hashicorp.com/search.
16   config.vm.box = centos71"
17   
18   config.vm.boot_timeout = 360
19   config.ssh.username = vagrant20   config.ssh.password = 21 
22   # Disable automatic box update checking. If you disable this,1)">then
23   # boxes will only be checked  updates when the user runs
  # `vagrant box outdated`. This is not recommended.
25   # config.vm.box_check_update = false
26 
27   # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,29   # accessing localhost:8080" will access port 80 on the guest machine.
30   # config.vm.network forwarded_port",guest: 80,host: 8080
31 
32   # Create a private network,1)">which allows host-only access to the machine
33   # using a specific IP.
34   # config.vm.network private_network192.168.33.1035 
36   # Create a public network,1)"> generally matched to bridged network.
37   # Bridged networks make the machine appear as another physical device on
  # your network.
39   # config.vm.network public_network40 
41   # Share an additional folder to the guest VM. The first argument is
42   # the path on the host to the actual folder. The second argument is
43   # the path on the guest to mount the folder. And the optional third
44   # argument is a set of non-required options.
45   # config.vm.synced_folder ../data/vagrant_data46 
47   # Provider-specific configuration so you can fine-tune various
48   # backing providers for Vagrant. These expose provider-specific options.
49   # Example  VirtualBox:
50   #
51   # config.vm.provider virtualboxdo |vb|
52   #   # Display the VirtualBox GUI when booting the machine
53   #   vb.gui = true
54 55   #   # Customize the amount of memory on the VM:
56   #   vb.memory = 102457   # end
58 59   # View the documentation for the provider you are using for more
60   # information on available options.
61 
62   # Define a Vagrant Push strategy  pushing to Atlas. Other push strategies
63   # such as FTP and Heroku are also available. See the documentation at
64   # https:docs.vagrantup.com/v2/push/atlas.html for more information.
65   # config.push.define atlasdo |push|
66   #   push.app = YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME67 68 
69   # Enable provisioning with a shell script. Additional provisioners such as
70   # Puppet,Chef,Ansible,Salt,and Docker are also available. Please see the
71   # documentation  information about their specific syntax and use.
72   # config.vm.provision shellSHELL
73   #   apt-get update
74   #   apt-get install -y apache2
75   # SHELL
76 end

?

在Vagrantfile配置文件中添加了两行代码,使用明文用户名密码

config.ssh.username = "vagrant"
config.ssh.password = "vagrant"

保存

vagrant reload

done!

Well done and Good Luck!?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读