To be able to access a shared folder or copy paste in the guest OS in VirtualBox, one need to install and enable guest additions in VirtualBox guest OS first.
I have Manjaro as host OS and Ubuntu 22.04 LTS as guest OS in VirtualBox.
Before we jump to start the process, make sure you have installed virtualbox-host-dkms
module on the host OS. In my case it will be:
sudo pacman -S virtualbox-host-dkms
Let’s get started.
1- Download the guest addition ISO file first. https://download.virtualbox.org/virtualbox/6.1.32/VBoxGuestAdditions_6.1.32.iso
You can download other versions too. Check the download section.
2- Mount the downloaded ISO as CD from Storage section of the virtual machine in Settings.
3- Save and start the virtual machine.
4- Create a mount directory in guest OS.
sudo mkdir /mnt/cdrom
5- Run the following command to mount the media.
sudo mount /dev/cdrom /mnt/cdrom
6- Execute ./VBoxLinuxAdditions.run
to install guest additions.
cd /mnt/cdrom/
sudo ./VBoxLinuxAdditions.run
7- Once finished, reboot the guest OS in VirtualBox.
Now you should be able to see the shared folders.
If you want to confirm the module is loaded, run the following in guest OS.
lsmod | grep -io vboxguest