Error when I clicked on Insert GuestAdditions CD Image from "Devices"

Unable to insert the virtual optical disk /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the machine VirtualUbuntu.
Would you like to try to force insertion of this disk?
Could not mount the media/drive    '/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED).

Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
Console
Interface: 
IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}
Callee: 
IMachine {480cf695-2d8d-4256-9c7c-cce4184fa048}

I can see VBoxGuestAdditions under VirtualBox list

homeuser@ubuntu:/usr/share/virtualbox$ ls -l
drwxr-xr-x 2 root root 4096 Jan 14 12:46 nls
-rw-r--r-- 1 root root 64647168 Apr 7 2014 VBoxGuestAdditions.iso
-rwxr-xr-x 1 root root 2176 Apr 6 2014 VBox.sh
-rwxr-xr-x 1 root root 4161 Apr 7 2014 VBoxSysInfo.sh

Any suggestion(s)?

up vote 45 down vote accepted

I assume your host operating system is Mac OS X and you have installed Ubuntu as the guest operating system.

There is no need to mount the guest additions ISO and install from it if your guest OS is Ubuntu.

Instead, open a terminal and enter the following -

sudo apt-get install virtualbox-guest-utils

This will install the guest additions and is more or less equivalent to installing via the ISO.

  • 4
    Also worked for Windows host! – Hack-R May 26 '16 at 13:32
  • 5
    not available on debian – chovy Oct 15 '16 at 2:53
  • 2
    The statement about "No need to install Guest Additions" is presumptuous and does not actually answer the underlying problem of the CD failing to mount. In my experience, the drivers provided on the Guest Additions CD are newer and offer better performance than those offered in the Ubuntu PPA. Furthermore, as @chovy has explained, this solution does not scale well when received on non-Ubuntu based distributions. Please see dave-rose's answer below for a better solution. – tresf Nov 7 '17 at 14:42
  • 1
    For installing virtualbox guest additions on Debian: virtualboxes.org/doc/installing-guest-additions-on-debian @chovy – Caleb Jay Jan 24 at 5:38
  • The command brew install virtualbox-guest-utils will also work – userX Jul 9 at 15:41

I ran into this problem recently (Sept 2017) trying to install Guest Additions into Oracle VM VirtualBox Manager version 5.1.28, in a newly-installed VM for Ubuntu version 16.04.3. The host is Win-10. The problem was that the Guest Additions CD image was already mounted. To fix it:

  • In the VM Manager under Settings->Storage, under Controller: Right-click on VBoxGuestAdditions, and select “Remove Attachment." There will be a confirmation box: click “remove.”
  • Click the “+” icon next to “Controller," to add new optical drive. A dialog box will open. Choose “Leave Empty-> Okay”
  • Open the VM and select Devices->Insert Guest Additions. It should install now. Power off the VM (not the VM Manager) and restart the VM. GuestAdditions should now be working.
  • 2
    This is a slightly better version of @jan-hettich's answer. – tresf Nov 7 '17 at 14:15
  • This works. But for me I had to manuall install the guest additions as the OS (Lubuntu in my case) was not starting the "autorun.sh" script. So I had to manually execure this: sudo ./VBoxLinuxAdditions.run This than told me that my system was not set up to compile the kernel moduls for the guest additions. So I had to install them before running the script again: sudo apt install gcc make perl sudo ./VBoxLinuxAdditions.run After a restart the resizing did indead work. Thanks guys! – KFleischer Aug 5 at 13:18

For me, the solution was discovering that you have to add an Empty optical drive in the virtual machine settings! If you try to "help" by pre-loading the VBoxGuestAdditions.iso, it doesn't work. The shortcut on the Devices menu "Insert Guest Additions CD image ..." wants to find an empty optical drive to use!

  • 1
    I followed a similar procedure. By powering down the guest, deleting the optical drive and re-adding one, I was able to re-insert the Guest Additions CD. This should be the accepted answer because it is the most user-friendly fix to the problem. Whereas other answers that instruct to use apt-get are a workaround, not a solution. – tresf Nov 7 '17 at 14:14
  • If you're running Oracle-provided VirtualBox, you shouldn't use the apt-get method. The apt-get solution is a bit better for if your host is also Ubuntu and you're using the Ubuntu-provided VirtualBox package. It will keep your guest system running the right version of the guest additions when VirtualBox is updated on the host (they update their guest additions and VirtualBox packages at the same time, so both the host and guest get updated software). – Chai T. Rex Aug 30 at 16:47

Hi I was having same issue (copy and paste problem) and I entered following commands from terminal and solved the problem.

  • sudo apt-get upgrade
  • sudo apt-get install virtualbox-guest-additions-iso
  • Go to display setting, under video capture, check enable video capture
  • sudo apt-get install virtualbox-guest-utils
  • restart virtual machine.
  • 2
    "under video capture, check enable video capture" - this is extremely unlikely to help. No offence, but this is probably not a good idea. :-) – Max Murphy Dec 3 '16 at 10:34

I had the same problem and manual installation with sudo apt-get didn't work for me. Different Virtual Box has different guests additions version so it's better to install the guest additions that comes with Virtual Box. So I installed it in this way:

  1. From File manager choose "Devices" -> "Insert Guest Additions CD image..."
  2. Login Ubuntu
  3. Unmount the CD (guest addition cd image)
  4. Mount the guest additions iso

    It'll pop up a window asking for confirmation to run it or not. If choosing to run, enter the login password and install it.

  5. Reboot Ubuntu

Got same error, get it work as below:

  1. after got that error, unmount VBOXADDITIONS CD in ubuntu;
  2. get out Ubuntu, click Devices - Insert Guest Additions CD Image. This time it will pop up a window asking run it or not,
    • choose to run
    • enter the login password
    • start to install now.

The problem many times that happens is that the iso file you installed is already mounted. Just go to Devices-Optical Device-Remove Virtual Disk from Guest installation. Then Manually mount the Guestadditions.iso file by going to Devices-Optical Drive-Choose Disk image then go to the folder where you installed ubuntu, find the guestadditions.iso file and then mount it. Once mounted, simply again click the Devices-Install Guest additions, enter your userID password for Ubuntu and the wizard will then continue to install the guest additions :)

In my case this happened because I was running Ubuntu server which doesn't have a window manager. Here is how I installed:

First, boot up the Ubuntu VM. Then press Devices > Insert Guest Additions CD. The CD has now inserted but you won't see anything. If you try to press Insert Guest Additions CD again you will get the error.

Next mount the CD:

sudo mount sr0 /media/cdrom

And then cd into the directory (no pun):

cd /media/cdrom

Next, run the install script:

sudo ./VBoxLinuxAdditions.run

And now everything should fine :)

I had problems that after mounting ISO the disk was empty in Debian. I made following workaround:

  1. mount addons image in Deamon tools in home Win system
  2. copy files from iso to shared folder to access them from virtual Debian
  3. perform SH installation directly in that folder (you will have access to addons files all the time via this folder)

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.