New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bento/ubuntu-16.04 and virtualbox guest additions #1145

Closed
robocoder opened this Issue Nov 28, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@robocoder

robocoder commented Nov 28, 2018

Version:

2.3.7

Environment: [Details about the environment such as the Operating System, cookbook details, etc...]

Host: macos mojave
Guest: linux
Provider: virtualbox 5.2.22

Scenario:

On vagrant up, installation of virtualbox guest additions fails.

Steps to Reproduce:

Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "bento/ubuntu-16.04"
  config.vm.box_version = "2.3.7"
end

Expected Result:

Virtualbox guest additions installed and vagrant continues to provision the vm.

Actual Result:

==> default: Machine booted and ready!
[default] GuestAdditions versions on your host (5.2.22) and guest (5.1.22) do not match.
...
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /dev/loop0 is write-protected, mounting read-only
Installing Virtualbox Guest Additions 5.2.22 - guest version is 5.1.22
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.22 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 5.1.22 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
update-initramfs: Generating /boot/initrd.img-4.4.0-81-generic
VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: modprobe vboxsf failed
An error occurred during installation of VirtualBox Guest Additions 5.2.22. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Job for vboxadd-service.service failed because the control process exited with error code. See "systemctl status vboxadd-service.service" and "journalctl -xe" for details.
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 5.1.22
    default: VirtualBox Version: 5.2
==> default: Mounting shared folders...
    default: /vagrant => /Development/dev-vm
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 vagrant /vagrant

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device
@robocoder

This comment has been minimized.

robocoder commented Nov 28, 2018

The problem appears to be that because the old guest extension is removed, the new guest extension can't be loaded until a restart, which in turn causes the mount to fail.

Removing installed version 5.1.22 of VirtualBox Guest Additions...

VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted

I believe this can be fixed by bundling a newer version of the guest additions (than 5.1.22). If you refer to the virtualbox https://www.virtualbox.org/wiki/Changelog-5.1 there's this change in 5.1.24:

Linux Additions: no longer recommend removing distribution- installed Additions if they are updated to our guidelines

@robocoder

This comment has been minimized.

robocoder commented Nov 28, 2018

Doh. I see we're using an old box. Nevermind.

@robocoder robocoder closed this Nov 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment