Comment 22 for bug 1873506

Revision history for this message
Mark Waite (waitem) wrote :

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)