Closed meaz closed 10 months ago
My environment: Vagrant 2.3.4 on Windows 11 with Virtual Box 7.0
It looks like it is a known issue and other Debian-based distro boxes may suffer from it too, namely I'm seeing this problem on Ubuntu 20.04, 22.04 and 22.10:
Vagrant.configure("2") do |config|
config.vagrant.plugins = ["vagrant-vbguest"]
config.vm.box = "roboxes/ubuntu2204"
end
will fail with
See https://askubuntu.com/a/1437555/139530 for workaround and based on that I found a solution using the installer_hooks:
Vagrant.configure("2") do |config|
config.vagrant.plugins = ["vagrant-vbguest"]
config.vm.box = "roboxes/ubuntu2204"
config.vbguest.installer_options = { allow_kernel_upgrade: true }
config.vbguest.installer_hooks[:before_install] = [
"apt-get update",
"apt-get -y install libxt6 libxmu6"
]
config.vbguest.installer_hooks[:after_install] = [
"VBoxClient --version"
]
end
will succeed printing the VBoxClient --version
:
I deploy a debian 11 box with vagrant (I'm on Arch, with virtualbox 7.0.2).
Here is what I get:
As you can see it's struggling installing GuestAdditions 7.0.2.
When I restart the box with
vagrant up
, I do have issues again:however, I can
vagrant ssh
without issue.I don't understand where the problem comes from: virtualbox? virtualbox-guest-iso? vagrant? vagrant-vbguest? neither how to fix it.