我正在尝试在虚拟机内部运行流浪汉,不幸的是它随机计数失败(它曾经每隔一段时间失败)。但是当我将日志级别设置为调试并运行vagrant时,它不会出错。寻求有关如何调试此问题的建议。
主机:rhel 6.5(圣地亚哥)2核4G内存,ESXi 5.1 客机:rhel 6.5(访客添加版本:4.1.18)/ centOS 6.5(访客增加版本:4.3.8)
Vagrant版本 - 1.6.5 VirtualBox 4.3.20 Chef Development Kit版本:0.3.6 流浪汉插件 vagrant-berkshelf(4.0.2) vagrant-login(1.0.1,system) vagrant-omnibus(1.4.1) vagrant-share(1.1.3,system)
运行失败
Bringing machine 'default' up with 'virtualbox' provider...
default: The Berkshelf shelf is at "/root/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150206-18541-kdy12t-default"
==> default: Sharing cookbooks with VM
==> default: Importing base box 'rhel65-1.0.0'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: XXXXXXXXXX_1423257225720_47393
==> default: Clearing any previously set forwarded ports...
==> default: Updating Vagrant's Berkshelf...
==> default: Resolving cookbook dependencies...
==> default: Fetching 'XXXXXXXXXX' from source at .
==> default: Using XXXXXXXXXX (1.2.0) from source at .
==> default: Vendoring XXXXXXXXXX (1.2.0) to /root/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150206-18541-kdy12t-default/XXXXXXXXXX
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2200 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. 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.
更新 : 我根据此博客的说明http://www.dedoimedo.com/computers/virtualbox-screenshot.html
拍摄了我的虚拟机快照我在来宾VM中遇到的错误:
MP-BIOS bug: 8254 timer not connected to IO-APIC
kernel panic - not syncing: IO-APIC + timer doesn't work! Boot with apic-debug and send a report. Then try booting with the 'noapic' option.
pid: 1, comm: swapper Tainted: G W -------- 2.6.32-431.el6.x86_64 #1
答案 0 :(得分:2)
看看Vagrant stuck connection timeout retrying它应该为您提供所需的所有答案。
首先我建议做的是:
现在将您的Vagrant升级到最新版本它看起来是1.7.2而您使用的是1.6.5。
将此添加到您的Vagrantfile
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
end
它将使VBox在GUI模式下启动Vagrant构建VM。 确保它正常启动,并且您可以使用用户名登录到它:vagrant password:vagrant(这应该是在您的基本框上设置的标准凭据)。
然后尝试从主机系统SSH到正在运行的VM。使用相同的流浪者/流浪者证书。
如果2& 3工作正常然后您可以尝试将其添加到您的Vagrantfile: (如果你愿意的话,你可以在那里保留以前指定的VBox GUI)
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
end
再次让您的VM流出,看看这是否有效。
希望这会有所帮助。我现在也开始使用Vagrant,它并不像我想象的那么容易:)祝你好运!
答案 1 :(得分:0)
尝试了不同门户网站上提供的各种选项后,最后,我做了vagrant destroy
然后是vagrant up
,它对我有用...... :)