stream浪报告VirtualBox客人添加过时

stream浪者来说是相当新的,如果我不了解这个过程,那就忍受吧。

我从http://www.vagrantbox.es/下载了一个CentOS盒子

开始运行VirtualBox 4.2.4并得到这个消息:

[默认]此VM上的guest虚拟机添加与VirtualBox的安装版本不匹配! 这可能会导致诸如转发的端口,共享文件夹等内容不能正常工作。 如果在这台机器上出现这些情况,请更新客人添加物并重新包装。

Guest Additions版本:4.0.8

VirtualBox版本:4.2.4

所以我使用vbguest插件来更新客人添加,然后按照build议重新包装盒子。 replace旧盒子并加载后,我得到了关于客户添加过期的相同消息,但是vbguest报告他们是最新的(在我的Vagrantfile中禁用了自动vbguest更新):

Vagrant::Config.run do |config| config.vm.box = "centos56_64" config.vbguest.auto_update = false config.vbguest.no_remote = true end 

和命令:

 dtest$ vagrant up [default] Importing base box 'centos56_64'... [default] The guest additions on this VM do not match the install version of VirtualBox! This may cause things such as forwarded ports, shared folders, and more to not work properly. If any of those things fail on this machine, please update the guest additions and repackage the box. Guest Additions Version: 4.0.8 VirtualBox Version: 4.2.4 [default] Matching MAC address for NAT networking... [default] Clearing any previously set forwarded ports... [default] Forwarding ports... [default] -- 22 => 2222 (adapter 1) [default] Creating shared folders metadata... [default] Clearing any previously set network interfaces... [default] Booting VM... [default] Waiting for VM to boot. This can take a few minutes. [default] VM booted and ready for use! [default] Mounting shared folders... [default] -- v-root: /vagrant dtest$ vagrant vbguest --no-install [default] Detected Virtualbox Guest Additions 4.2.4 --- OK. [default] Virtualbox Guest Additions on host: 4.2.4 - guest's version is 4.2.4 

由于它们似乎是在安装后更新的,我可以忽略这个消息。 但是有可能摆脱它吗?

确保你已经更新了Vagrant和VirtualBox的安装。 我有一个类似的问题(并遇到这个答案)和更新我的VirtualBox安装固定它。

问题是由于安装了比安装的VirtualBox软件版本更新的guest虚拟机添加的盒子造成的。 在我的情况下:

GuestAdditions versions on your host (4.3.12) and guest (4.3.14) do not match.

添加这个答案,以防其他人遇到问题。

尝试安装应该照顾你的客户添加的vbguest插件:

 vagrant plugin install vagrant-vbguest vagrant vbguest vagrant up 

如果没有帮助,您需要下载VM内的VirtualBox Guest Additions内核模块,例如

  1. 下载ISO文件,例如

     wget http://download.virtualbox.org/virtualbox/5.0.20/VBoxGuestAdditions_5.0.20.iso -P /tmp 
  2. 挂载ISO文件:

     sudo mount -o loop /tmp/VBoxGuestAdditions_5.0.20.iso /mnt 
  3. 运行安装程序(在sh之后添加-x以进行debugging):

     sudo sh /mnt/VBoxLinuxAdditions.run 

如果你使用stream浪汉,安装简单得多,只需运行: vagrant vbguest

要find正确版本的ISO文件,请查看: http : //download.virtualbox.org/virtualbox/

或者将ISO文件下载到您的主机,并replace现有的文件(位置可能取决于您的操作系统,在macOS上它位于/ Applications / VirtualBox / Contents / MacOS )。