Vagrant在等待机器启动时超时



我是新流浪者。我目前的环境是Ubuntu->在虚拟盒子上运行->在Mac书上运行。

我已经成功地在Ubuntu上安装了Virtualbox和Vagrant软件包。我建立了我的回购并开始了我的构建(流浪(。在成功复制映像后,我在我的流浪文件中有一个步骤,通过SSH连接到VM。。它只是挂起并最终超时。

参见下方的错误

==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
default: URL: https://vagrantcloud.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20190514.0.0) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190514.0.0/providers/virtualbox.box
==> default: Successfully added box 'ubuntu/trusty64' (v20190514.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Setting the name of the VM: postgres_default_1588691813886_34109
==> default: Clearing any previously set forwarded ports...
Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:
https://www.virtualbox.org/manual/ch04.html#sharedfolders
This option can be disabled globally with an environment variable:
VAGRANT_DISABLE_VBOXSYMLINKCREATE=1
or on a per folder basis within the Vagrantfile:
config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> 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
#<Thread:0x00005618d3a47468@/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:71 run> terminated with exception (report_on_exception is true):
....
....
....
Timed out while waiting for the machine to boot. This means that (Vagrant::Errors::VMBootTimeout)
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.
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.
Vagrantfile
# -*- mode: ruby -*-
# # vi: set ft=ruby :
IMAGE_NAME = "bento/ubuntu-18.04"
N = 1
Vagrant.configure("2") do |config|
config.vm.box = IMAGE_NAME
config.vm.provision "shell", path: "provision/vagrant_provision.sh", privileged: true
config.vm.provider "virtualbox" do |v|
v.memory = 2048 
v.cpus = 1
end
# Nodes
(1..N).each do |number|
config.vm.define "node-#{number}" do |node|
node.vm.network "private_network", ip: "192.168.50.21#{number}"
node.vm.hostname = "node-#{number}"
node.vm.synced_folder "scripts/", "/scripts"
end  
end

end

问题与在已经在Mac上运行VirtualBox的Ubuntu虚拟机下使用Vagrant/VirtualBox有关。当我在Mac上原生安装Vagrant/VirtualBox时,我没有遇到任何问题。

相关内容

  • 没有找到相关文章

最新更新