117

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)?

αғsнιη
  • 36,350
Rads
  • 1,273
  • 2
  • 9
  • 6

17 Answers17

106

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.

75

I ran into this problem recently (Sep. 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. The host is Windows 10.

The problem was that the Guest Additions CD image was already mounted. To fix it:

  1. In the VM Manager go to Settings -> Storage.
  2. Under Controller right-click on VBoxGuestAdditions, and select Remove Attachment. There will be a confirmation box. Click Remove.
  3. Click the + icon next to Controller to add a new optical drive. A dialog box will open. Choose Leave Empty -> OK.
  4. Open the VM and select Devices -> Insert Guest Additions. It should power off the VM (not the VM Manager) and restart the VM.

VirtualBox Guest Additions should now be working.

karel
  • 122,292
  • 133
  • 301
  • 332
Dave Rose
  • 751
  • 5
  • 2
24

I solved by manually mounting the image (after adding the Device and the ISO according to the Dave Rose's answer) and running the installer.

sudo su
cd /media
mkdir cdrom
mount /dev/cdrom /media/cdrom
cd cdrom
sh VBoxLinuxAdditions.run

Check my answer on SuperUser

Kamafeather
  • 606
  • 6
  • 11
17

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!

10

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.
3

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

rpan
  • 31
3

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.
Yaron
  • 13,453
Kevin
  • 31
  • 1
1

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 :)

1

Start your Ubuntu in VirtualBox:

  1. Go to Devices -> Optical Drives -> Remove Disk from Virtual Drive
  2. Go to Devices -> Click on ->Insert Guest Additions CD Image
  3. Enter authentication Details
  4. Shutdown Ubuntu and Close VirtualBox. Open again VirtualBox to see it Working

Also Check Shared Clipboard and Drag & Drop is checked bidirectional

0

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 :)

0

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)
abu_bua
  • 11,313
0

Same error for me with Macos. I was hitting the error Could not mount the media/drive '/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED). The guest additions iso was already downloaded previously. All steps are done within VM.

  1. cd to media/<user>/Vbox_GAs_<version> (there may be multiple folders here so choose the most recent).
  2. ./autorun.sh to install the guest additions iso
  3. sudo reboot
Rifty
  • 1
0

For windows 10 as host start the VM click on devices --> Optical Devices --> choose disk image --> go to C:\Program Files\Oracle\VirtualBox --> select VBoxGuestAdditions.iso from there -->Click Ok --> A small window will appear Click Force Unmount --> now again click on devices with ubuntu logged in -->Click on insert Guest Additions CD image --> click run --> after the successfull insert your ubuntu will start coming on fullscreen.

0

go to /media/cdrom/

or files and copy the content from virtualboxguestaddition optical drive

paste anywhere may be into documents in a folder for example into a new directory called vbox

open the directory in terminal

sudo chmod -x VBoxLinuxAddtions.run

sudo sh ./VBoxLinuxAddtions.run

after restart the system will start as in full screen mode.

0

In my case I have found work around to this problem my virtual box version 6.1 and Ubuntu version is 20.0.4LTS

Click on start button in your virtual box Login to your ubuntu machine on top of the machine you'll find controls for your virtual box click on View > Seamless Mode (Right hand side Ctrl + L key) that's all you will be in maximized view If you want to enter in full screen mode click on view > Full-screen mode (Right hand side Ctrl + F key)

0

I had the issue on my Ubuntu VM installed on a Mac. I did the following to resolve the issue:

  1. In Virtual Box Settings -> Advanced -> Controller IDE and make it empty.

  2. Start the Ubuntu VM, open the terminal, run the following two commands, and restart:

    sudo apt update 
    sudo apt install build-essential gcc make perl dkms
    
karel
  • 122,292
  • 133
  • 301
  • 332
0

Start your Ubuntu in VM Virtual Box -

  1. open terminal
  2. cd /media
  3. cd sivareddy (in your case it might be your name, check by ls command)
  4. cd VBox_GAs_6.1.36
  5. ls (if VBoxLinuxAdditions.run is present, then do the next steps otherwise you have to install Guest additions)
  1. ./VBoxLinuxAdditions.run
  1. Restart ubuntu and login

This worked for me and my os is windows 11 Thanks!