LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This 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


Reply
  Search this Thread
Old 01-12-2017, 07:20 AM   #1
Don_Nadie
Member
 
Registered: Aug 2009
Posts: 49

Rep: Reputation: 0
VirtualBox: How to add Guest Additions ISO from guest machine


Host machine:
Linuxmint 17.3 Cinnamon 64 bit
Oracle VM VirtualBox Manager 5.0.2

On the host machine:
Code:
    $ ls -l /usr/share/virtualbox/VBoxGuestAdditions.iso
    -rw-rw-r-- 1 root root  56M Aug 13  2015 VBoxGuestAdditions.iso
Guest machine:
elementaryos-0.3.2-stable-amd64.20151209.iso

My virtual machine basically works, I guess.

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.

Remind me not to buy anything from Oracle.
 
Old 01-12-2017, 08:04 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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.

Last edited by BW-userx; 01-12-2017 at 08:16 AM.
 
Old 01-12-2017, 08:20 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
you may try do download that image within the guest os and mount it as any other iso, cd into it and run the file *.run as root.
 
Old 01-12-2017, 08:20 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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

Last edited by BW-userx; 01-12-2017 at 08:22 AM.
 
Old 01-13-2017, 07:18 AM   #5
Don_Nadie
Member
 
Registered: Aug 2009
Posts: 49

Original Poster
Rep: Reputation: 0
@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?
 
Old 01-13-2017, 07:53 AM   #6
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
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?
 
Old 01-13-2017, 08:01 AM   #7
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 286

Rep: Reputation: 91
Look here, first image (scroll down a little bit): https://www.stugon.com/install-virtu...ons-in-ubuntu/

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.
 
Old 01-13-2017, 08:09 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Don_Nadie View Post
@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
Attached Thumbnails
Click image for larger version

Name:	Screenshot_VBox-addons-2017-01-13_08-07-47.png
Views:	154
Size:	97.1 KB
ID:	23967  

Last edited by BW-userx; 01-13-2017 at 08:23 AM.
 
Old 01-14-2017, 01:58 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Don_Nadie View Post
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.

edit:
this is basically the same as post #3
 
Old 01-14-2017, 09:03 AM   #10
Don_Nadie
Member
 
Registered: Aug 2009
Posts: 49

Original Poster
Rep: Reputation: 0
@goumba: My command line history shows that I installed VirtualBox from the Linux Mint repository

Code:
$ sudo apt install VirtualBox
@BW-userx:
  1. see attached screenshot. What prompts? I don't see any prompts.
  2. 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.
Attached Thumbnails
Click image for larger version

Name:	Prompts,What-Prompts.png
Views:	105
Size:	39.9 KB
ID:	23970  

Last edited by Don_Nadie; 01-14-2017 at 09:09 AM. Reason: change color of applicable part of quote
 
Old 01-14-2017, 09:27 AM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Don_Nadie View Post
@BW-userx:
  1. 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.

look around you hopefully will find it.

Last edited by BW-userx; 01-14-2017 at 09:32 AM.
 
Old 01-14-2017, 10:42 AM   #12
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by Don_Nadie View Post
@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
 
Old 01-14-2017, 12:24 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
Quote:
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.
 
Old 01-14-2017, 06:43 PM   #14
DVOM
Member
 
Registered: Nov 2010
Posts: 223

Rep: Reputation: 48
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.
 
Old 01-15-2017, 03:29 AM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Don_Nadie View Post
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.
 
  


Reply

Tags
guest additions, virtualbox



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] CentOS 7 Host and Virtualbox Win 8.1 Guest with Guest Additions Installed Sum1 Linux - Virtualization and Cloud 1 03-26-2015 02:31 PM
[SOLVED] how to check version of virtualbox guest additions currently installed in guest syste masuch Linux - Virtualization and Cloud 3 09-03-2012 01:05 AM
Problem installing guest additions on virtualbox Centos 5.5 64bit guest eljay313 Linux - Virtualization and Cloud 1 09-03-2010 08:22 AM
LXer: Install Guest additions and run fullscreen mode on VirtualBox Guest OS | Linux LXer Syndicated Linux News 0 01-17-2010 05:30 PM
problem installing guest additions in Fedora 11 guest (virtualbox) mia_tech Linux - Desktop 9 07-28-2009 12:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 03:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration