vboxsf unable to mount old binary data in Groovy Vagrant box

Bug #1895862 reported by John Chittum
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
Fix Released
Undecided
John Chittum
Groovy
Fix Released
Undecided
John Chittum
livecd-rootfs (Ubuntu)
Fix Released
Undecided
John Chittum
virtualbox (Ubuntu)
Confirmed
High
Unassigned

Bug Description

When booting the Groovy vagrant box, Guest Additions is unable to mount the shared folder

```
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: Invalid argument
```

If one `vagrant ssh` into the box and try the command, it fails with the same error. systemctl and dmesg didn't show any errors. However, capturing the serial log showed the following on boot:

```
ubuntu-groovy login: [ 17.100243] vboxsf: Old binary mount data not supported, remove obsolete mount.vboxsf and/or update your VBoxService.
[ 17.219577] vboxsf: Old binary mount data not supported, remove obsolete mount.vboxsf and/or update your VBoxService.
[ 22.353951] vboxsf: Old binary mount data not supported, remove obsolete mount.vboxsf and/or update your VBoxService.
[ 27.412062] vboxsf: Old binary mount data not supported, remove obsolete mount.vboxsf and/or update your VBoxService.
[ 829.055100] vboxsf: Old binary mount data not supported, remove obsolete mount.vboxsf and/or update your VBoxService.
```

Related branches

Revision history for this message
John Chittum (jchittum) wrote :
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

please tell exacly which version of virtualbox you have in the host, in the guest and which OS/Version you are running.
Also, please tell me the exact steps to reproduce the problem, how you installed the guest additions (and from where), and specially what happens if you delete mount.vboxsf binary from the system, does it work?

Changed in cloud-images:
status: New → Incomplete
Revision history for this message
John Chittum (jchittum) wrote :

host:

Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

Linux 5.4.0-7642-generic #46~1598628707~20.04~040157c~dev-Ubuntu SMP Fri Aug 28 17:55:30 x86_64 x86_64 x86_64 GNU/Linux

virtualbox installed via apt:

ii virtualbox 6.1.10-dfsg-1~ubuntu1.20.04.1 amd64 x86 virtualization solution - base binaries
rc virtualbox-6.1 6.1.6-137129~Ubuntu~bionic amd64 Oracle VM VirtualBox
ii virtualbox-dkms 6.1.10-dfsg-1~ubuntu1.20.04.1 amd64 x86 virtualization solution - kernel module sources for dkms
ii virtualbox-qt 6.1.10-dfsg-1~ubuntu1.20.04.1 amd64 x86 virtualization solution - Qt based user interface

Guest:

Distributor ID: Ubuntu
Description: Ubuntu Groovy Gorilla (development branch)
Release: 20.10
Codename: groovy

Linux ubuntu-groovy 5.8.0-18-generic #19-Ubuntu SMP Wed Aug 26 15:26:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

guest-utils are installed as part of the livecd-rootfs image build via apt. The guest-utils within the Groovy vagrant image:

ii virtualbox-guest-utils 6.1.14-dfsg-3 amd64 x86 virtualization solution - non-X11 guest utilities

Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :
SERIAL = true
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.
  NOW = Time.now.strftime("%d.%m.%Y.%H:%M:%S")
  FILENAME = "serial-debug-%s.log" % NOW
  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://vagrantcloud.com/search.
  config.vm.box = "ubuntu/groovy64"
  config.vm.provider "virtualbox" do |vb|
     vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ]
     vb.customize [ "modifyvm", :id, "--uartmode1", "file",
     File.join(Dir.pwd, FILENAME) ]
  end
end

> if you delete mount.vboxsf binary from the system, does it work?

Yes, that worked. Steps:

* vagrant up (see above error)
* vagrant ssh
* sudo rm /usr/sbin/mount.vboxsf
* exit
* vagrant reload (did not see error)
* vagrant ssh
* ls /vagrant (saw my debug file, Vagrantfile, etc)

What step are we (CPC team) missing in creating the Vagrant image that is causing this error for end-users? Here's the hook we use for creating the image

https://git.launchpad.net/livecd-rootfs/tree/live-build/ubuntu-cpc/hooks.d/base/vagrant.binary

it's essentially a base Ubuntu server image with virtualbox-guest-utils installed.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hello John, I see two possible solutions for this issue:

1) don't install the guest utils anymore (it seems to be now natively working with the new kernel modules)

2) install the guest-utils with the guest-dkms package, so you enforce the usage of the virtualbox native kernel packages (not the kernel ones).

Both solution should work, but unfortunately looks like the two kernel modules lost the interoperability between them.

Changed in cloud-images:
status: Incomplete → Confirmed
Changed in virtualbox (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
John Chittum (jchittum) wrote :

I did a test build using a branch of livecd-rootfs where I removed the code installing virtualbox-guest-utils. The vagrant box produced booted fine and mounted guest folders. This works on groovy on the 5.8.0 kernel.

Looking at groovy, vboxsf, vboxguest, and vboxvideo are included as part of the linux-modules package. This was an update done in Focal on 5.4.0-48 and migrated forward. Moving forward for our creation of Vagrant boxes, we can remove the explicit install of vbox-guest-utils.

https://packages.ubuntu.com/groovy/amd64/linux-modules-5.8.0-19-generic/filelist

John Chittum (jchittum)
Changed in livecd-rootfs (Ubuntu):
assignee: nobody → John Chittum (jchittum)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.689

---------------
livecd-rootfs (2.689) groovy; urgency=medium

  * ubuntu-cpc: remove explicit install of virtualbox-guest-utils.
    LP: #1895862

 -- John Chittum <email address hidden> Tue, 29 Sep 2020 12:59:23 -0500

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Revision history for this message
John Chittum (jchittum) wrote :

latest Groovy vagrant image has removed virtualbox-guest-utils and now mounts properly. Any version equal to or newer than v20201006.0.0 will mount the guest folder.

I'm still going to do some testing with the vagrant guest-utils plugin as well, just to see if it successfully pulls in a newer version. But otherwise the core issue has been fixed for the cloud image.

Revision history for this message
John Chittum (jchittum) wrote :

I did a test utilizing the vagrant plugin for installing guest-additions on the newly created Vagrant images (using the pre-installed guest-utils kernel module)

`vagrant plugin install vagrant-vbguest`

This failed in the same fashion, however, I was able to get an install log. It is attached as is the output from spinning up a test VM with `vagrant-vbguest` installed.

Revision history for this message
John Chittum (jchittum) wrote :
Revision history for this message
Seth Forshee (sforshee) wrote :

Looking at the upstream vboxsf driver, this "Old binary mount data not supported ..." message happens due to this old-style mount data being explicitly provided via mount(2). It seems to me that whatever is doing that (presumably /sbin/mount.vboxsf) should just retry the mount without the binary mount data if mount(2) returns EINVAL.

Revision history for this message
Seth Forshee (sforshee) wrote :

Though it seems like upstream basically says to either use their modules together with their userspace tools, or else don't use their userspace tools:

https://www.virtualbox.org/ticket/17728#no1

If we take that stance then shouldn't guest-utils have a hard dependency on virtualbox-guest-dkms? Those driver will then have to be signed with a MOK under secure boot, but I don't even know if virtualbox does secure boot for guests, so that may be a non-issue.

Revision history for this message
John Chittum (jchittum) wrote :

I've marked cloud-images as Fixed-Released based upon the updated livecd-rootfs, and confirming that the latest Vagrant Box posted to https://app.vagrantup.com/ubuntu/boxes/groovy64. We can leave this open for the Virtualbox package and how we can deliver updates to virtualbox-guest-utils. But the original bug of being unable to mount shared folders is mitigated for the moment.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.