Unable to mount the CD/DVD image on the machine Sandbox

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


Solution 1:

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.

Solution 2:

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