我正在使用导出的Vagrant框。文件扩展名为.ova。 我将它导入VirtualBox并将其ID放入" id"文件" /home/user/Documents/vagrant/.vagrant/machines/default"夹。在此之后我跑了" vagrant up"命令。我得到以下输出
调试输出
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 3001 (guest) => 3003 (host) (adapter 1)
default: 3000 (guest) => 9090 (host) (adapter 1)
default: 8080 (guest) => 9091 (host) (adapter 1)
default: 8161 (guest) => 8166 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
SSH超时,虽然身份验证失败,但我仍然能够使用" vagrant ssh"但是我没有创建我在vagrant文件中定义的同步文件夹。
我正在使用:
Vagrant版本:Vagrant 1.8.1
VirtualBox版本:版本5.0.40
主机操作系统: Ubuntu 16.04 LTS
访客操作系统: CentOS 7.0
Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "oneops"
# Use the vagrant-cachier plugin, if installed, to cache downloaded packages
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
config.vm.network "forwarded_port", guest: 3001, host: 3003
config.vm.network "forwarded_port", guest: 3000, host: 9090
config.vm.network "forwarded_port", guest: 8080, host: 9091
config.vm.network "forwarded_port", guest: 8161, host: 8166
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = 6144
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "70"]
end
config.vm.synced_folder "~/Documents/Share/", "/home/vagrant/Documents/Share/"
end
结束结果:我无法在主机和来宾计算机之间创建同步文件夹。当我尝试使用&#34时停止机器时;流浪汉停止"我得到以下输出
$ vagrant halt
==> default: Attempting graceful shutdown of VM...
default: Guest communication could not be established! This is usually because
default: SSH is not running, the authentication information was changed,
default: or some other networking issue. Vagrant will force halt, if
default: capable.
==> default: Forcing shutdown of VM...
任何人都可以帮我弄清楚这里可能出现的问题吗?