GuestAdditions 版本的 Vagrant 问题

GuestAdditions 版本的 Vagrant 问题

我正在尝试在 Ubuntu 服务器上运行Vagrantfile。我收到以下错误消息:

An error occurred during installation of VirtualBox Guest Additions 6.1.26. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Unmounting Virtualbox Guest Additions ISO from: /mnt
Cleaning up downloaded VirtualBox Guest Additions ISO...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.2.0
VBoxService inside the vm claims: 6.1.26
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.2.0
VBoxService inside the vm claims: 6.1.26
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.2.0
VBoxService inside the vm claims: 6.1.26
Going on, assuming VBoxService is correct...
Restarting VM to apply changes...

我使用以下命令安装 Virtualbox 和 Vagrant:

# Install VirtualBox
sudo apt-get install linux-headers-$(uname -r) build-essential dkms
sudo apt-get install libgl1-mesa-glx libxmu6 libxt6 -y
sudo apt-get install virtualbox -y

# Install vagrant and its plugins
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - && sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && sudo apt-get update && sudo apt-get install vagrant -y
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-disksize
vagrant plugin install vagrant-hostmanager

安装的版本:

Vagrant 2.2.18
Virtualbox 6.1.26

安装卡在:

Installing rsync to the VM...
==> worker-customer: Rsyncing folder: /home/worker/ => /vagrant

这似乎合乎逻辑,因为 Guest 添加功能无法正常工作。

如何修复版本不匹配?

答案1

vagrant-vbguestGithub 页面

如果你很幸运,vagrant-vbguest 不需要任何配置

但似乎有几份报告称不同版本也发生同样的事情。这里有一个 vagrantfile 的例子,其中有一行被注释掉了:

  # config.vbguest.iso_path = "../relative/path/to/VBoxGuestAdditions.iso"

取消注释并设置正确的相对行应该可以解决这个问题。根据讨论使用命令更新 vagrant-vbguest 到最新版本

vagrant plugin update

似乎已经为多个用户解决了该问题。

这位 SU 社区成员表示可以通过在客户操作系统中安装 Guest Additions 来解决该问题。

通过谷歌搜索该消息可以找到更多可能的解决方案

Got different reports about installed GuestAdditions version

所有版本的 VBox Guest Additions 都可以从此处下载virtualbox.org 下载页面

相关内容