VirtualBox: How to add Guest Additions ISO from guest machine
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've searched a lot for instructions on how to insert the Guest Additions CD image. Many posts are from the time of the trilobites when VirtualBox looked quite different. None of what I've found makes sense to me because the general instruction is to use the "Devices" menu item "from the guest machine."
Well, there's a "Devices" menu item above my guest machine window, but I think that menu belongs to the host machine, not the guest machine. When I use it to select the "Insert Guest Addition CD image..." item, I of course get the following error message:
Code:
Unable to insert the virtual optical disk
/usr/share/virtualbox/VBoxGuestAdditions.iso
into the machine Elementary OS.
Would you like to try to force insertion of this
disk?
Details
Could not mount the media/drive
'/usr/share/virtualbox/VBoxGuestAdditions'
(VERR_PDM_MEDIA_LOCKED).
Result Code: NS_ERROR_FAILURE (0X80004005)
Component: ConsoleWrap
Interface: Iconsole {872da645-4a9b-1727-
bee2-5585105b9eed}
Callee: IMachine {f30138d4-35ea-4b3a-8858-
a059de4c93fd}
Now I know everyone who got past kindergarten is expected to know exactly what to do when confronted with this message, but all I find in my searches is the recommendation to add the Guest Additions ISO from the guest machine.
How can I access the host machine file system from the guest machine? Maybe I have to insert the Guest Additions ISO from the guest machine in order to access the host machine so I can insert the Guest Additions ISO from the guest machine in order to access the host machine so I can insert the Guest Additions ISO from the guest machine in order to access the host machine . . . ad infinitum.
click on the client menu bar items and find where it says to do that.
Most installs of your clients will show a CD/DVD on the desktop.
I just double click it to open it in a file manager.
I use that to get the path to that 'CD' then copy it off the file manager.
Then I open a terminal then type 'cd [space]' in it, then paste that path address into the terminal. Hit enter to get into that directory (CD/DVD/ISO)
Then issue 'ls' to find the Linux version of the install then type the 'sudo ./' into the terminal,
Then I highlight the executable, middle button click on it to paste it on the right side of 'sudo ./' then hit enter and let it do its thing.
some installed distros have an auto run that will pop up when it gets attached use that. but if you oops that you can revert back to the prior instructions I just gave you.
sorry I do not have it installed right now to look so I can give you the actual name on the menu of that client .. but if you click on it then move your way down the bar you'll see it on the bottom of the list off one of them menu listings.
Make sure you have an empty cd added to your client. you can do that in the settings for same client you are working with under storage with them little '+' by an icon of a ' cd/dvd' that they put in there.
guest additions gives you the ability to copy/paste between host and client, USB support 2.0 and 3.0, the ability to resize your client. and perhaps a few more added functions.
Here are some nice commands to add to your client to get it to set in whatever size you want. 1024x768 - 1900x1240 etc..
be sure to be inside of the directory that your clients are installed in.
Code:
VBoxManage setextradata global GUI/MaxGuestResolution any
[actual size setting you want that are available]
VBoxManage setextradata "VM-Name" CustomVideoMode1 1920x1200x32
here extra bonus info:
if you ever get a MAC Vbox image.
Code:
To control GOP, use the following VBoxManage command:
VBoxManage setextradata "VM name" VBoxInternal2/EfiGopMode N
Where N can be one of 0,1,2,3,4,5 referring to
the 640x480, 800x600, 1024x768, 1280x1024, 1440x900, 1920x1200 screen resolution respectively.
VBoxManage setextradata Sierra10.12 VBoxInternal2/EfiGopMode 5
Workaround command (replace vmname with your virtual machine name):
VBoxManage modifyvm "MacOS-10.12Sierra." --cpuidset 00000001 000306a9 00020800 80000201 178bfbff
VBoxManage modifyvm "Sierra10.12" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "Sierra10.12" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "Sierra10.12" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Sierra10.12" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "AppleBlows"
VBoxManage setextradata "Sierra10.12" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Sierra10.12" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
@BW-userx: Thanks for your reply, but I have no idea what this means:
Quote:
click on the client menu bar items and find where it says to do that.
There's a complete failure to communicate here. I don't know what you're trying to say. "Find out where it says to do" WHAT? My guest machine desktop is blank, no icons. As for the other stuff you typed, maybe I'll look at that in the far distant future.
@pan64: Thanks for replying, but I'm trying to accomplish a maximum of one thing with this post, and that is to get the Guest Additions ISO connected to my Elementary OS guest machine. All I can tell you about networking from the guest machine is that there's a different MAC address for eth0 under the guest machine than there is under the host machine. I can't currently connect the guest machine to the internet; my guess is that in order to do that, I'll have to get the Guest Additions ISO working in the guest machine. Catch-22. Right now, connecting the guest machine to the internet seems to me like sending a manned space mission to another galaxy billions of light years from our beleaguered planet.
My real question remains
Is it possible to access the host file system from the guest machine?
How did you install VirtualBox? From the repositories (via Synaptic, Software Center, whatever application that elementary provides), or did you download the file from Oracle's website? Was it a Debian package (.deb) or other?
The guest additions cd image is included in the virtualbox software and gets visible to the guest via "Insert guest additions cd image". No need to download it separately on the host.
@BW-userx: Thanks for your reply, but I have no idea what this means:
Quote:
click on the client menu bar items and find where it says to do that.
My real question remains
Is it possible to access the host file system from the guest machine?
when you open up VBox you have to start your client. That client you start is suppose to have a window that the virtual OS starts in. within that window that the client uses it has a menu bar on it. within that client menu bar lays your answer to insert the guest addistions cd
2: your post was misleading;(2 me anyways) nevertheless, go into settings for your client, pick 'Shared folders' - - then follow the prompts.
or set up an ftp sight or an ssh sight connection
see photo... for guest addiction CD
Is it possible to access the host file system from the guest machine?
yes.
but your original question was about the guest additions cd - fwiw, i, too, have had problems with the way outlined inside the virtualbox software.
i ended up using the guest systems os to download a current/suitable (sorry i don't rememeber anymore which - suitable means from the guestsystem's package management, current means straight from vb website) and installing that manually:
iirc, you have to mount the .iso, then there's instructions.
all inside the guest vm.
@goumba: My command line history shows that I installed VirtualBox from the Linux Mint repository
Code:
$ sudo apt install VirtualBox
@BW-userx:
see attached screenshot. What prompts? I don't see any prompts.
re: your attachment--clicking on "Insert Guest Addition CD image..." under Menu->Devices is how I got the error message I mentioned in my first post. That's what I said in my first post.
Quote:
Well, there's a "Devices" menu item above my guest machine window, but I think that menu belongs to the host machine, not the guest machine. When I use it to select the "Insert Guest Addition CD image..." item, I of course get the following error message . . .
@cepheus11: your link is eternally stuck on the first page of the web site; I can't access the web page entitled "How to Install VirtualBox Guest Additions in Ubuntu - Stugon" URL: https://www.stugon.com/install-virtu...ons-in-ubuntu/ which I found by searching the home page and clicking on the just mentioned search result. When I click on the link, I'm taken back to the home page.
@ondoho: I already said that
Quote:
I can't currently connect the guest machine to the internet . . .
Frankly, given my experience with VirtualBox to date, I don't expect to ever be able to connect my guest machine to the internet.
I have found that my guest machine knows about the Guest Additions ISO. I can't make the screenshot application capture what I want it to capture in my guest window, but Menu->Devices->Optical Drives shows VBoxGuestAdditions.iso as available but unmounted (not checked--the elementaryos-0.3.2-stable-amd64.20151209.iso file is checked, and so I assume that's mounted in the virtual optical drive).
The guest machine ISO I'm using is a live DVD image. It appears under /cdrom. I'm just guessing here, but maybe I can't mount the Guest Additions ISO on the guest machine virtual optical drive because that virtual device is perhaps somehow bound to /cdrom, which contains the Elementary OS ISO image.
Last edited by Don_Nadie; 01-14-2017 at 09:09 AM.
Reason: change color of applicable part of quote
see attached screenshot. What prompts? I don't see any prompts.
OMGoodness you are also lacking in Computer Jargon as well I see.
School time:
Prompt:
(of an event or fact) cause or bring about (an action or feeling).
if you issue a command and it gives you a message back to do something (more/else as well)that is called a 'prompt'
Billy was prompted by Sally to give her all of his money. Billy didn't follow that prompt given by Sally. Instead he found another girl friend.
Quote:
[*] re: your attachment--clicking on "Insert Guest Addition CD image..." under Menu->Devices is how I got the error message I mentioned in my first post. That's what I said in my first post.
in settings for the client under storage . them little icons + (w/a cd image next to it) to add a CD/DVD to mount your ISO to.
@goumba: My command line history shows that I installed VirtualBox from the Linux Mint repository
Code:
$ sudo apt install VirtualBox
The guest machine ISO I'm using is a live DVD image. It appears under /cdrom. I'm just guessing here, but maybe I can't mount the Guest Additions ISO on the guest machine virtual optical drive because that virtual device is perhaps somehow bound to /cdrom, which contains the Elementary OS ISO image.
Ok, you installed it the right way, so that eliminates any permissions issue.
Are you using elementary as a Live instance, or have you already installed it as a Guest OS?
If the latter, installed, go ahead and go into the guest settings and remove the elementary ISO. Then you should be able to mount the Guest Additions image.
If running live (as in from the elementary ISO), then you'll have to mount the Guest Additions ISO yourself. BUT before you do that, check your repositories. Go ahead and use these, they'll make your life easier, as any other dependencies needed will be installed (otherwise you're going to be tracking those down as well).
Code:
*anthony**~**apt-cache search --names-only virtualbox-guest
virtualbox-guest-dkms - x86 virtualization solution - guest addition module source for dkms
virtualbox-guest-source - x86 virtualization solution - guest addition module source
virtualbox-guest-utils - x86 virtualization solution - non-X11 guest utilities
virtualbox-guest-x11 - x86 virtualization solution - X11 guest utilities
virtualbox-guest-additions-iso - guest additions iso image for VirtualBox
The guest machine ISO I'm using is a live DVD image.
So Elementary is not installed to disk (vdi)? If you installed Elementary to a disk then you should be able to eject the installation ISO and then select the guest additions ISO.
If running a live CD then just like physical hardware it is locked and can not be ejected unless it can run from memory. I don't think Elementary can. You can try adding another virtual CD device or if you have enough memory copy the ISO file via file transfer like ssh cifs etc. You need guest additions installed to use shared folders. You can then mount the ISO file and install just like a real device. By the way since you are running the live CD any changes you make will not be saved.
Without knowing how the virtual network adapter is configured we can not say why your having network problems. Networking does not need guest additions.
Quick question: Have you actually installed the guest into a VM or are you just running it off the ISO image? You've mentioned the ISO a couple of times. Which is why I think you haven't installed it.
I have found that my guest machine knows about the Guest Additions ISO. I can't make the screenshot application capture what I want it to capture in my guest window, but Menu->Devices->Optical Drives shows VBoxGuestAdditions.iso as available but unmounted
well mount it then and continue with post #3?
Quote:
The guest machine ISO I'm using is a live DVD image. It appears under /cdrom. I'm just guessing here, but maybe I can't mount the Guest Additions ISO on the guest machine virtual optical drive because that virtual device is perhaps somehow bound to /cdrom, which contains the Elementary OS ISO image.
that might make things more difficult, and changes lost after virtual reboot, but not impossible.
i think it's possible to register another virtual cd/dvd drive?
BUT:
why do you not have internet connectivity inside the vm?
it should be possible very easily. any internet connection present in the host system can be forwarded to the vm as a wired connection.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.