Cannot install Guest Addtions

Discussions about using Linux guests in VirtualBox.
52ROSt
Posts: 86
Joined: 28. Dec 2014, 07:12

Cannot install Guest Addtions

Post by 52ROSt »

Version 5.1.14 r112924 (Qt5.6.1)
Host: LM17.3KDE 64 bit
Guest LM17.3KDE 32 bit

Installation of LM worked fine but I cannot install the Guest Additions.
When I do Devices > Insert Guest Addition CD
I get the following error message:
Unable to insert the virtual optical disk /usr/share/virtualbox/VBoxGuestAdditions.iso into the machine LM173KDE_Basic.

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

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Callee: IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}
CD drive is connected and working. I used the same device to install LM as the OC of the VM.

What did I make wrong?
How can I solve the problem?

I am grateful for your help.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Cannot install Guest Addtions

Post by Perryg »

VERR_PDM_MEDIA_LOCKED, means something already resides in the drive and is locked so you can not add another until you remove what is there already.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot install Guest Addtions

Post by socratis »

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
52ROSt
Posts: 86
Joined: 28. Dec 2014, 07:12

Re: Cannot install Guest Addtions

Post by 52ROSt »

Thanks for your help.

I tried the following:

Device > USB and DVD drived checked
- DVD drive empty and clicked: Insert Guest Addtion CD image.... => same error messsage
- DVD drive with CD inside and clicke: Insert Guest Addition CD image... => same error message

Device > USB > USB Settings added a filter for the DVD drive
- DVD drive empty and clicked: Insert Guest Addtion CD image.... => same error messsage
- DVD drive with CD inside and clicke: Insert Guest Addition CD image... => same error message

In the same Linux Mint host machine I created a 2 W7 32bit VMs and Guest Addition installation worked fine.

What can I do next?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot install Guest Addtions

Post by socratis »

Shut down the VM. Go to VM Settings » Storage » select the CD/DVD icon on the left » click on the CD/DVD icon on the right » remove what's there.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
52ROSt
Posts: 86
Joined: 28. Dec 2014, 07:12

Re: Cannot install Guest Addtions

Post by 52ROSt »

Thanks a lot for your ongoing support.

Problem remains also I think I followed your advice. Thus I added 2 screen shots showing the settings I have currently in my VM:
Settings are
LM173KDE_Basic-Settings_03dt.png
LM173KDE_Basic-Settings_03dt.png (66.1 KiB) Viewed 107487 times
When I click on the CD/DVD icon on the right side I can the following:
Menu_03dt(004).png
Menu_03dt(004).png (13.33 KiB) Viewed 107487 times
Is my optical drive selection (IDE Primary Slave) correct?
What I am doing still wrong?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot install Guest Addtions

Post by socratis »

• Close all running VMs (are there any other VMs that are paused or saved?).
• Go to VirtualBox Manager and then to the Virtual Media Manager (default Ctrl-D) » Optical disks.
• Do you have the GAs CD listed?
• If yes, select it and see the information about it. If it says "Not attached" you should be all set. If not, see what VM is attached to and remove it.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
52ROSt
Posts: 86
Joined: 28. Dec 2014, 07:12

Re: Cannot install Guest Addtions

Post by 52ROSt »

@socratis - thanks for your continuing support.

VM are all closed and I never had VM running while trying to solve the problem.

However, I have one VM in saved status, which I would prefer not to shut down because until the installation inside the VM where running properly I took me sometime. If I have no other choice but shut down this machine as well I will do so.

I also looked in the Virtual Media Manager > Optical Disks and found the VboxGuestAdditions.iso. And I found that this is attached to several, if not all, shut down VM and the saved VM. Among the shut down VMs is also the VM, which makes to problems.

Due to the finding that the VBoxGuestAdditions.iso is attached to fully shut down VMs, I did not yet shut down the saved machine but would like to get your next comment.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot install Guest Addtions

Post by socratis »

52ROSt wrote:However, I have one VM in saved status, which I would prefer not to shut down because until the installation inside the VM where running properly I took me sometime.
I may be missing something, but what's going to happen if you shutdown the VM? Why do you think you're going to lose the installation that you performed? If you shutdown your computer, will you lose all your data? Of course you won't. Unless of course the VM is running from a LiveCD/DVD.

Mind you not, I'm not talking about discarding the saved state, but resuming and then shutting down the guest from within the guest, like any normal computer.

Saved state doesn't work like your word processor where you save your document. Saved state in the VirtualBox case is similar to hibernating your computer. When your computer returns from hibernation, it will expect all of its hardware to be there, including the contents of its CD drive, the GAs CD.

What you do is: resume from the saved state. After you resume the VM, you eject any CD. You can then re-save the VM state or shut it down, it's up to you. I personally find it really bad practice to keep the VM in its saved state. Because it can lead to issues like the one you're facing right now.
52ROSt wrote:And I found that this is attached to several, if not all, shut down VM and the saved VM.
Go to each and every VM that has the CD attached and remove it. Then remove it from the media manager. And remember this lesson for the future; after you're done installing the GAs, remove the CD, otherwise your next update will get you again.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
52ROSt
Posts: 86
Joined: 28. Dec 2014, 07:12

Re: Cannot install Guest Addtions

Post by 52ROSt »

@socratis - Thanks for your help. I could make a big step forward.

The W7 VM has the GA installed and in can see the set up machine folder of the host. This remained after rebooting the VM.

I still cannot see an host machine folder on a Linux Mint 17.3 KDE GUEST. For you to understand what I did, logged all steps:
- Placed GA CD in CD-drive and closed the drive
- Setting > Insert GA - CD ran
- Guest machines show message that there is a drive but drive did not start automatically.
- Opened file manager > VBOXADDITION in CD drive > double clicke autorun.sh > entered password
Terminal display:
Verifying archive integrity... All good
... installation started...machine was busy for a while...
You may need to restart...
Press return to close this window... > Enter

- Devices > Optical disk > remove disk...
Message: Unable to eject... > clicked Force Unmount
- Devices > Optical disk > CD drive empty
- Restarted guest machine

Added a host machine drive
- Devices > Shared folder > Shared folder settings >
Machine folders > path to /home/user folder > Automount > Make permanent > OK
- Opened file manager of guest => no host drive to be seen (only VM drives)
- Opened /media => there is a folder call rost (= user name) and sf_rost. Both folders are empty. When clicking the sf_rost folder error message "Could not enter folder /media/sf_rost

Tried to use a transient machine

- Devices > Shared folder > Shared folder settings >
Transient folders > path to home/user folder > Automount > OK => error message
Failed to create the shared folder rost (pointing to /home/rost) for the virtual machine LM173KDE_Basic.
Details
Failed to create the shared folder rost (pointing to /home/rost) for the virtual machine LM173KDE_Basic.
Could not create a shared folder 'rost' mapped to '/home/rost' (VERR_ALREADY_EXISTS).
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}



In interprete the error message in the way that there is already a machine folder with the same name but I don't see anything in such a folder

- Devices > Shared folder > Shared folder settings => neither machine folders not transisient folder were to be seen.
- Opened /media and found only the folder rost (the sf_rost was gone)

Added newly the same TRANSIENT folder by
- Devices > Shared folder > Shared folder settings >
Transient folders > path to home/user folder > automount > OK => same error message as above

Added newly the same MACHINE folder
- Devices > Shared folder > Shared folder settings >
Machine folders > path to home/user folder > Automount > Make permanent > OK
- Opened file manager of guest => no host drive to be seen (only VM drives)
- Opened /media => there is a folder call rost (= user name) and NO sf_rost folder.

Rebooted guest machine

In file manager not host maschine folder to be seen.
In /media/ there were again the two empty folders rost and sf_rost
Here I gave up.

What am I still doing wrong with the linux guest?_
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot install Guest Addtions

Post by socratis »

52ROSt wrote:What am I still doing wrong with the linux guest?
You didn't read the User Manual? ;)

Check out ch. 4.3 Shared folders. There is a note there that may be crucial:
Note: Access to auto-mounted shared folders is only granted to the user group vboxsf, which is created by the VirtualBox Guest Additions installer. Hence guest users have to be member of that group to have read/write access or to have read-only access in case the folder is not mapped writable.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
52ROSt
Posts: 86
Joined: 28. Dec 2014, 07:12

Re: Cannot install Guest Addtions

Post by 52ROSt »

I already created a user group earlier and checked right now using the terminal:

Code: Select all

rost@rost-X240:~ > id
uid=1000(rost) gid=1000(rost) groups=1000(rost),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),111(sambashare),129(vboxusers)
rost@rost-X240:~ > 
After installing the GA I rebooted the guest machine and the host machine.

Additionally the XP and W7 guests see the host drive.

It is only the Linux guest which does not see the host drive. Is there something special to be done in the case of a Linux guest?
Did I forget to use my glasses when reading the manual?

Is the usergroup "vboxsf" different from the "vboxusers" group?

Do I have to run

Code: Select all

sudo usermod -a -G vboxusers username
again after each new VM?

Do I need to run

Code: Select all

mount -t vboxsf [-o OPTIONS] sharename mountpoint
although I checked "automount"?
"Automount" is set; I just checked it again.

I am sorry for needing your help for such a long time. Maybe - if there is interest - I put a small cheat-sheet together at the end: 1. do ... 2. do.... and so on.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot install Guest Addtions

Post by socratis »

52ROSt wrote:I already created a user group earlier
I hope you didn't have to create the group; the installer is supposed to do that for you. The "vboxusers" group in for accessing USB devices on Linux hosts.
52ROSt wrote:Is the usergroup "vboxsf" different from the "vboxusers" group?
Obviously, otherwise they wouldn't have different names. On top of that the "vboxusers" is a group that's created on a Linux host, while the "vboxsf" is a group on a Linux guest. You have to add your guest username to the guest's "vboxsf" group.
52ROSt wrote:Do I need to run "mount -t vboxsf [-o OPTIONS] sharename mountpoint" although I checked "automount"?
I would start with the manual mounting and make sure that the whole thing works. Then move to the automatic ones after all the issues have been resolved.
52ROSt wrote:Did I forget to use my glasses when reading the manual?
I don't know about your glasses, but a second read didn't hurt anyone...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
52ROSt
Posts: 86
Joined: 28. Dec 2014, 07:12

Re: Cannot install Guest Addtions

Post by 52ROSt »

@socratis - read once more should be of help! You are right. Thanks for leaving me not in the rain.


vboxusers group
Wrongly written. This was installed in when I installed the VB, I only checked it already before.


vboxsf versus vboxuser group - Understood, after all!

I intend to follow your advice and do first use the command

Code: Select all

mount -t vboxsf [-o OPTIONS] sharename mountpoint
for a manual mounting before attempting to mount during boot.

As I don't want to mess anything up at the point, may I please ask some questions?

1 - what is the -o option for? Could not find the answer in the web.

2 - sharename - is this the name I gave my Linux guest?

3 - mounting point - As far a my mounting point understanding goes this should be the path like /home/rost where as "rost" is my equivalent to /home/user. I want to access all folders of the /home/rost directory of my real linux machine.
Is my understanding correct or what do I need to do here?

Except for the option -o, I would now use the following command inside the terminal of the linux guest

Code: Select all

mount -t vboxsf LM173KDE_Basic /home/rost
where
- LM173KDE_Basic is the name of my Linux host
- rost is my user name in the host machine.

The option -o I will add depending on the function of -o.

Is my considered command to be used in the terminal of the guest correct?


I am really thankful for your patience!!!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot install Guest Addtions

Post by socratis »

"mount" is a standard Linux command. Try "man mount" in a terminal for more information.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply