54

I installed Ubuntu 12.10 Server AMD 64 with VirtualBox 4.2 latest version. I've installed it successfully. I've to install now Guest Additions but I am getting a error message like the below exactly same

Unable to mount the CD/DVD image
/usr/share/virtualbox/VBoxGuestAdditions.iso on the machine Sandbox. Would you like to force mounting of this medium?

Could not mount the media/drive
'/usr/share/virtualbox/VBoxGuestAdditions.iso'
(VERR_PDM_MEDIA_LOCKED).

Details

Result Code: NS_ERROR_FAILURE (0x80004005)

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Console
Interface: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
Callee: IMachine {22781af3-1c96-4126-9edf-67a020e0e858}

I research a lot with Google and other places and I removed the installation disc image from ~/.VirtualBox/VirtualBox.xml file to edit a line but didn't get any luck

I installeddkms too but still didn't get any luck

Can anyone please help me about that? I am stuck now :(

11
  • After the error messsage, if you click Ok, does the guest see a CD-ROM?
    – ignis
    Jul 18, 2013 at 19:57
  • I got the two option with the error message. That is "Leave" and "Force Mount". I did force mount all the time but after nothing is happened
    – Sumon Khan
    Jul 18, 2013 at 20:15
  • 1
    I'll rephrase my question: if you click in the virtualized system, can you open the CD-ROM? I get that error message every time, however the file manager of the virtualized system (I virtualize Ubuntu) shows me that it has the guest additions CD-ROM, and I can proceed with the guest additions installation. The VirtualBox menu option "Install Guest Additions..." merely inserts a virtual CD-ROM in the guest, which is supposed to auto-mount. If it does not, you can mount it manually (always in the guest). What system are you virtualizing?
    – ignis
    Jul 18, 2013 at 20:37
  • 1
    Hi, Sorry for my bad. Yes, I've got the CD-ROM option but I can't open it. I am virtualizing Ubuntu Server 12.10
    – Sumon Khan
    Jul 18, 2013 at 21:13
  • 1
    It may be mounted in /media/VBOXADDITIONS_xxx or /media/<user>/VBOXADDITIONS_xxx - however except you need USB2.0 support the GA are of little use in a server.
    – Takkat
    Jul 18, 2013 at 21:25

13 Answers 13

81

I struggled with this for about 2 hours on a Windows 7 host running Ubuntu 13.10 Server guest. In the end, I just copied over the VBoxGuestAdditions.iso to the guest (using WinSCP), mounted it, and then ran VBoxLinuxAdditions.run from the guest.

Here are the steps I took:

  1. Locate VBoxGuestAdditions.iso on your host (in my case, C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso).

  2. Copy VBoxGuestAdditions.iso to your guest (in my case, I used WinSCP).

  3. In the terminal for the guest mount the ISO using the following:

    sudo mkdir /media/GuestAdditionsISO

    sudo mount -o loop path/to/VBoxGuestAdditions.iso /media/GuestAdditionsISO

  4. At this point you'll probably get a message that the ISO has been mounted as READ-ONLY. That's perfectly fine. If you change into the directory /media/GuestAdditionsISO you should see VBoxLinuxAdditions.run and it should be executable:

    cd /media/GuestAdditionsISO

    ls -l

  5. Now just run VBoxLinuxAdditions.run:

    sudo ./VBoxLinuxAdditions.run

You also have the option of extracting VBoxGuestAdditions.iso in Windows (or whatever host OS you're using) and then SCP'ing (or WinSCP'ing) it over to the Ubuntu guest, and then just running: sudo ./VBoxLinuxAdditions.run

Better doing what I have listed above instead of wasting time and putting faith in methods that may or may not work on your particular configuration.

Hope this helps.

6
  • 23
    Excellent answer. Instead of copying the ISO to the guest using SCP, you could also easily download it from http://download.virtualbox.org/virtualbox. Select the version of your Virtualbox and copy the link for VBoxGuestAdditions.iso. Go to your home folder in host, wget link. Continue with sudo mkdir....
    – mcbetz
    Jan 27, 2015 at 12:42
  • 2
    I preferred to get the "path/to/VBoxGuestAdditions.iso" by attempting to install guest additions via the VirtualBox menu > Insert Guest Additions CD Image... It will fail, but will give you the path to the .ISO image on your host workstation. For the OSX, it will likely be /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso.
    – l3x
    Nov 16, 2015 at 6:10
  • On (my) Mac OSX the ISO file path is /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
    – tamberg
    Feb 1, 2016 at 22:03
  • Works for me in 2017. Debian 8 64 Bits. Apr 4, 2017 at 14:01
  • @mcbetz : awesome. you should put it as an answer May 22, 2019 at 16:39
49

The trick is to

  1. shut down the guest OS
  2. in the VM manager, right-click the relevant VM and select 'settings'
  3. in the Storage tab, select the cd drive w/ the guest additions in it
  4. in the attributes section click the little CD symbol and select 'remove disk...'

Then, after starting the VM the guest additions should be mountable again. hth

10
  • 1
    This doesn't work for me, I can follow all the steps down to 3, but I can't remove the ISO from the controller list. What am I missing?
    – delliottg
    Oct 25, 2013 at 16:29
  • worked for me, Windows 10 64 Bit Host and Ubuntu 16.04.2 LTS Guest Apr 25, 2017 at 23:45
  • 1
    Holy smokes why is there an answer higher than this, this is so easy convinient and works!!!
    – Kraigolas
    Oct 24, 2019 at 20:36
  • 1
    THis worked for me after all other remedies failed! Thanks.
    – Thagomizer
    Feb 6, 2020 at 19:08
  • 1
    worked for me. beautiful. i won't bother with why or what's broken... thanks!
    – Vortex
    Jul 23, 2021 at 20:46
34

In my case (VM ubuntu 14.04 on an WIN7 system), I open /var/log/kern.log, and search for CD-ROM, I find that in ubuntu 14.04, VBOX CD-ROM is recognized as SCSI CD-ROM, and attached to /dev/sr0

kernel:[      1.456xxx] scsi 1:0:0:0: CD-ROM VBOX CD-ROM 1.0 PQ: 0 ANSI: 5

kernel:[      1.460xxx] sr 1:0:0:0: Attached scsi CD-ROM sr0

Now, after click the menu 'Device' -> 'Install Guest Additions', then type the following command:

sudo mount /dev/sr0 /media/cdrom

and the ISO file is mounted on /media/cdrom

so, after this run:

cd /media/cdrom
sudo ./VBoxLinuxAdditions.run
2
  • 2
    or mkdir /media/cdrom before mount Nov 24, 2017 at 12:51
  • That worked for me on Ubuntu Server 16.04. Jul 5, 2018 at 12:30
13

Just mount the optical drive, which should be in /dev/cdrom

First, in your VirtualBox main screen, go to Settings -> Storage and make sure VBoxGuestAddidtions.iso shows under Controller: IDE. If it doesn't, add it there. It is in C:\Program Files\Oracle\VirtualBox

Then start the guest machine, open a terminal, and mount the drive like so:

sudo mount /dev/cdrom /media/cdrom0
cd /media/cdrom0
sudo ./VBoxLinuxAdditions.run
cd
sudo umount /media/cdrom0
3
7

I stuck with the same problem. Removing and adding iso in virtualbox anew didn't help me too either.

The problem is that auto-installation doesn't work. So we can run it manually as:

enter image description here

As result additions were successfully installed (at least terminal said so), but I didn't notice any improvements after installing.
Maybe it'll work for you.
Good luck!

4

Eject the image while VM is running then retry. Works like a charm.

2
  • It happened to me just now, and was going to enter this same answer. Windows 7 64-bit, with Ubuntu 16.04-LTS guest.
    – LSerni
    Aug 20, 2017 at 11:31
  • I came back here just to say that, shame on StackOverflow this answer is not on top.
    – Machado
    Jun 7, 2019 at 18:40
2

This is what worked for me...

  1. Shutdown guest OS
  2. Go to Settings -> Storage
  3. Dismount all drives, including CD drive and Hard drive
    • My hard drive was mounted under SATA
    • CD drive was mounted under IDE
  4. Re-mount hard drive under IDE (not SATA)
    • Browse to C:\Users[your username]\VirtualBox VMs[VM name]
  5. Re-mount an empty CD drive under IDE
  6. Press OK, start VM
  7. Try mounting/installing guest additions again
1
  • This work for me Ubuntu 18.04 with gust host Windows 10
    – Sri
    Jan 18, 2019 at 10:07
1

Right click on the window bottom of the disk icon, and click Remove the virtual disk -> click Insert Guest Additions, and then

sudo mount -r /dev/cdrom /mnt
cd /mnt
sudo ./VBoxLinuxAdditions.run
2
  • Worked for me !
    – matt
    Jun 5, 2018 at 8:19
  • One additional note... These commands have to run inside the Virtualbox image. After that, the Virtualbox image has to be restarted.
    – raz
    Aug 24, 2020 at 10:45
0

I had the same problem as the OP. After many trials I found that the VBOXGuestadditions iso was also mounted in other VMs. I remember after creating the VM, virtualbox automatically attaches the iso to the VM. I unmounted the iso from all other VMs and then from the current one also as suggested by @MakerMax. Restarting the VM resulted in the CD being seen fine. (FYI my guest was Fedora 20, and host Mint 17. Of course had further problems with the Shared Folders when running the install script)

1
  • how do you unmount from other VMs?
    – chovy
    Oct 15, 2016 at 2:55
0

Just an update - 14.04 LTS guest on a windows 8.1 host. Display by default was not correctly set on the new machine... I could not change the resolution. I went to install guest additions ( as recommended fix from oracle), but received the same unable to mount error.

I opened the explorer, and noticed that the file was mounted, just autorun did not work. I just went to the drive and ran the program. was prompted for credentials, but everything worked.

Installed for me (:

0

The following works for me:

  1. Shutdown Ubuntu
  2. Go to oracle VM virtual box manage -> settings -> storage. Delete the mounted .iso file under controller: IDE, and then add an empty disk.
  3. Start Ubuntu and go to Device -> Insert Guest Additions CD image -> browse to the .iso file you'd like to mount and then install.
  4. After installation, reboot Ubuntu and the screen should be adjusted.
0

THIS WILL WORK - I hope! Like everyone I scoured the net and tried almost everything

For me - removing CD device under storage/controller, CLONING the VM, adding a NEW/empty IDE CD/DVD drive, starting VM, and restarting worked

It was important to understand - are guest additions working for any 1 VM and not for a particular VM. If yes, then the above will work.

If not, Make sure guest additions are installed under File - Preferences - Extensions

Good luck

-1

I got it installed - Go to VM Manager -- select the VM -- Select Storage -- Controll IDE Select the icon with + sign "Add CD/DVD device" Add the VBoxGuestAdditions.iso from Programs\Oracle\VirtualBox Boot into Ubuntu on VM Open files and Select the CD under Devices I had an option to run the CD on top right. But it is same as running the autorun.sh file. Let the installations run. Shutdown ubuntu VM Go to VM Manager and remove the disk. Boot into vm and it should be in full screen mode. Good luck!!!

2
  • Note select the CD icon left of "VBoxGuestAdditions.iso", then click right mouse button to see a context menu and select "Remove attachments." This is equivalent to ejecting a CD. You don't want to select "Controller: IDE" or the CD icon with a plus sign to the right of it. That would be equivalent to unplugging the CD drive.
    – bootchk
    Mar 27, 2014 at 13:43
  • My comment above is wrong. "Remove attachments" is more like unplugging the CD (since it is a disk image.) But then you can click on the CD icon with a plus sign to add another disk drive. You can leave it empty. Then when the VM is running, choose VBox>Devices>Insert Guest …, which is similar to inserting a CD.
    – bootchk
    Mar 27, 2014 at 14:03

You must log in to answer this question.

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