Ubuntu 20.04 上的 Vagrant(主机)和旧版 Ubuntu(来宾)

Ubuntu 20.04 上的 Vagrant(主机)和旧版 Ubuntu(来宾)

我在 Ubuntu Budgie 20.04(主机)上,内核是 5.4.0-74-generic。

VirtualBox 版本 6.1.22 r144080

流浪者:2.2.16

从某个星期起,我无法使用较旧的 ubuntu 版本作为我的客户系统运行 vagrant,例如

$ vagrant init ubuntu/xenial64
$ vagrant up

然后我得到信息和错误:

Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.18
VBoxService inside the vm claims: 5.1.38
Going on, assuming VBoxService is correct...
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000,_netdev vagrant /vagrant

The error output from the command was:

: No such device

如果我使用 focus 来启动一个 vagrant box。

$ vagrant init ubuntu/focal64
$ vagrant up

它非常有效。

有什么建议我可以做些什么来让它再次工作?

我不知道,但我认为这与内核更新有关,但在降级 Linux 内核方面却没有任何进展。

这是来自https://stackoverflow.com/questions/67833305/vagrant-on-ubuntu-20-04-host-with-older-ubuntu-on-guest因为有人建议我在这里可能会更容易得到帮助。

答案1

这不是真正的答案,但最终成为了我的解决方案。

我费了好大劲才将我的旧 ubuntu 16.04 更新到 20.04。

这对我来说是相当困难的工作,所以我的建议很简单:

保持你的盒子是最新的,这样你就不会陷入这样的情况。:)

相关内容