Further to my previous comment #21 above, I have found a workaround to
get the shared folders working again with the latest image. It appears
that the problem is with the virtualbox-guest-utils package included in
the image.

Here are the steps that I performed in order to get a virtualbox
ubuntu/focal64 guest with shared folders working again:

Notes:
It is OK to use the latest "ubuntu/focal64" box version - this was tested on 
20210803.0.0
In order to be able to Insert the Guest Additions CD image, make sure you have 
gui enabled in Vagrantfile as per: 
https://www.vagrantup.com/docs/providers/virtualbox/configuration#gui-vs-headless

vagrant halt
# With the guest powered off, in Virtualbox in the storage settings, add an IDE 
Optical drive. Select the Guest Additions CD image if already available.

vagrant up
# click on Device -> insert Guest Additions CD image (or select it, if 
available, when adding the optical drive)

vagrant ssh # into guest machine

# then in guest machine...
  sudo apt-get remove virtualbox-guest-utils
  sudo apt update
  sudo apt upgrade
  # inspired by: 
http://en.ig.ma/notebook/2012/virtualbox-guest-additions-on-ubuntu-server
  sudo apt-get install -y dkms build-essential
  sudo mount /dev/cdrom /mnt
  sudo /mnt/VBoxLinuxAdditions.run
  exit

# On host machine:
vagrant reload

# If all went well, the shared folders will now be working again.
Disable gui in Vagrantfile if no longer needed

dmesg on guest now shows:
[   11.087117] vboxvideo: loading version 6.1.22 r144080
[   11.131885] 01:43:34.944899 main     VBoxService 6.1.22 r144080 (verbosity: 
0) linux.amd64 (Apr 28 2021 18:43:39) release log
               01:43:34.944901 main     Log opened 
2021-08-08T01:43:34.944892000Z
[   11.131917] 01:43:34.944972 main     OS Product: Linux
[   11.131929] 01:43:34.944987 main     OS Release: 5.4.0-80-generic
[   11.131940] 01:43:34.944998 main     OS Version: #90-Ubuntu SMP Fri Jul 9 
22:49:44 UTC 2021
[   11.131956] 01:43:34.945009 main     Executable: 
/opt/VBoxGuestAdditions-6.1.22/sbin/VBoxService
               01:43:34.945009 main     Process ID: 899
               01:43:34.945010 main     Package type: LINUX_64BITS_GENERIC
[   11.133106] 01:43:34.946143 main     6.1.22 r144080 started. Verbose level = 0
[   11.137611] 01:43:34.950642 main     
vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1)
[   17.071954] vboxsf: g_fHostFeatures=0x8000000f g_fSfFeatures=0x1 
g_uSfLastFunction=29
[   17.072174] *** VALIDATE vboxsf ***
[   17.072181] vboxsf: Successfully loaded version 6.1.22 r144080
[   17.072233] vboxsf: Successfully loaded version 6.1.22 r144080 on 
5.4.0-80-generic SMP mod_unload modversions  (LINUX_VERSION_CODE=0x5047c)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1873506

Title:
  ubuntu/focal64 fails to mount Vagrant shared folders

Status in cloud-images:
  Fix Released
Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Eoan:
  Fix Released
Status in linux source package in Focal:
  Fix Released

Bug description:
  SRU Justification

  Impact: When our kernel packaging was updated to build the virtualbox
  guest packages by downloading the dkms package, the modules were
  accidentally moved to linux-modules-extra instead of linux-modules.
  This has caused the modules to go missing in our Vagrant images.

  Fix: Move the modules back to linux-modules.

  Test Case: Build the kernel packages and confirm that the vboxguest
  and vboxsf drivers are now in linux-modules rather than linux-modules-
  extra.

  Regression Potential: Since linux-modules is required, anyone who is
  using the vbox drivers will continue to have them after this change.
  Therefore the risk of regression is extremely low.

  
  ---

  
  Attempting to `vagrant up` using the `ubuntu/focal64` box fails to mount the 
`/vagrant` shared folder. `ubuntu/bionic64` works as expected. Here is the 
Vagrant error message:

  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:

  : No such device

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1873506/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to