I am a beginner and just installed VM VirtualBox 6.1.16140961-Win and xubuntu-18.04.5-desktop-amd64. As I was not able to copy / paste from my pc (Windows 10) with Ctrl+Alt+C / Ctrl+Alt+V (and even Ctrl+C/Ctrl+V, I was going to install and enalble Guest Addition with
sudo apt install linux-headers-$(uname -r) build-essential dkms
but simply nothing happens! If I do Devices/Insert Guest Addition CD Image I get this error:
Virtualbox unable to insert the virtual optocal disk C:\ Program Files \ Oracle \ Virtualbox \ VBoxguestadditions.iso into the machine Xubuntu
Can someone help to solve this problem please? I already powered off the VM, I already rebooted it but nothing. In the Storage/Optical Drive I have VBoxGuestAdditions.iso even if I did not select it...no clue
Also in Devices/Optical Drivers the VBoxGuestAdditions.iso is checkmarked...
72 Answers
sudo apt install linux-headers-$(uname -r) build-essential dkms
has to be done in a terminal IN THE VM.
The current GuestAdditions.iso contains a set of commands that needs these installed.
If the ISO is already mounted (ticked in the settings), it cannot be inserted, giving the error you have.
Also if the ISO is present DURING BOOT, it will not Autostart.
Remove and Reinsert it using Virtualbox settings or menus - alternatively start a Terminal/Shell and launch the "autostart" script from there, it is present on the virtual disk created by the ISO.
If the GuestAddition CD is present in your optical disk (checkmarked) and the commandsudo apt install linux-headers-$(uname -r) build-essential dkms
has succeeded then execute the next commandscd /mediacd <your_user_name>cd VBox_Ga*./autorun.sh
If the disk is not mounted, you can try to do it manually.ls /dev/sr*
This will typically show /dev/sr0. Then:sudo mkdir /media/<your_user_name>/ANameToChooseForTheDisksudo mount /dev/sr0 /media/<your_user_name>/ANameToChooseForTheDisk
If the mount succeeds (read-only) the contents of the disk show up in ANameToChooseForTheDisk and you can run the ./autorun.sh from there.