0

My host is Win 10. For years, I haven't been able to install Guest Additions from the VM's menu Devices -> Install Guest Additions CD Image..., but I've been able to do that manually by following these steps:

  1. Copy C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso to my guest.
  2. sudo mkdir /media/GuestAdditionsISO.
  3. sudo mount -o loop path/to/VBoxGuestAdditions.iso /media/GuestAdditionsISO.
  4. sudo /media/GuestAdditionsISO/VBoxLinuxAdditions.run.
  5. sudo adduser abc vboxsf.
  6. sudo reboot.

Now I upgraded from VBox 6.1.18 to 6.1.26r145957 and tried to repeat those steps on a new Guest Ubuntu Server 20.04.2, but it doesn't seem to work. Initially I got a Permission denied error. I noticed this time the group owner was root:

abc@myvm:[~]: ll /media/
total 16
drwxr-xr-x  4 root root 4096 Aug 14 05:28 ./
drwxr-xr-x 21 root root 4096 Aug 13 10:00 ../
drwxr-xr-x  2 root root 4096 Aug 14 05:27 GuestAdditionsISO/
drwxr-x---  2 root root 4096 Aug 14 05:28 sf_xyz/

Whereas previously it used to be vboxsf, so I tried to manually fix that by running sudo chown -R root:vboxsf /media and so now it looks like this:

abc@myvm:[~]: ll /media/
total 16
drwxr-xr-x  4 root vboxsf 4096 Aug 14 05:28 ./
drwxr-xr-x 21 root root   4096 Aug 13 10:00 ../
drwxr-xr-x  2 root vboxsf 4096 Aug 14 05:27 GuestAdditionsISO/
drwxr-x---  2 root vboxsf 4096 Aug 14 05:28 sf_xyz/

But the problem now is I cannot access anything from the mapped folder (which is not empty on the host):

abc@myvm:[~]: ll /media/sf_xyz/
total 8
drwxr-x--- 2 root vboxsf 4096 Aug 14 05:28 ./
drwxr-xr-x 4 root vboxsf 4096 Aug 14 05:28 ../

Rebooting didn't help either.

BTW I tried another VM (Ubuntu Server 20.04.1), which was created with the previous VBox version. It had a shared folder setup previously, which continues to be OK with the new VBox version as well. On it I could also easily share another folder with the new VBox version - still no problem.

1 Answer 1

0

The problem was the Guest Additions were not properly installed. I didn't pay close attention to the message it displayed when I ran VBoxLinuxAdditions.run:

This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.

So I fixed the problem by running this (before VBoxLinuxAdditions.run):

sudo apt install gcc perl make

That wasn't needed before, so it's a bit annoying, but at least it solves the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .