Virtual Box

This page has been live for a long time. Sun Microsystems bought Innotek the authors of Virtual Box, an opensource virtualisation product in 2008. It permits Windows/Linux/Solaris guests on the same operating system. I probably started this page slightly later, my first oracle blog on it was dated May 2008. It mainly describes any guest installation tricks.
I have not been systematic in how I document my virtual box projects, some are on this page, some have their own articles, they should all be tagged; https://davelevy.info/wiki/tag/virtual-box.
The shared folder manager script has been uploaded to git, see https://github.com/dfl1955/vboxtools, just in time to be replaced by launchd
although there is a problem with systemd
and vboxshares, or there was last time I checked.
Elementary 6.0
And this sort of nonsense is why I gave up on it; it needs System:Enable EFI = true to be set otherwise the screen display is too small to run the graphic installer; there is a warning that the OS may freeze or hang on virtual hardware. It also doesn’t display the vm managament menu, on some of the views. So I needed to reset the Host button.
Ubuntu 22
I needed to install build-essential
and dkms
using apt
. The installation is invoked by autorun.sh
; it did not autorun for me and so I invoked it via the file manager and menu option run as program
.
Elive 3
I decided to make a guest of Elive 3.0.6. This is currently much slower than I want. The install suggested I needed 15Gb, although after asking forthe uninstall of Libre Office and WINE, it fitted into 4GB. TCL/TK may now be missing, but easy enough to fix.
The screen is not behaving, and when I tried to install the guest additions, it reported that they were already installed.
MacOS (Snow Leopard)
I have found my Snow Leopard disk, let’s see what happens with this. I made another page for this.
Windows 10 (Guest)
Sometimes, to act as an applications host; this might once have been useful , as might this from MS Community Answers and this might be the ISO source.
Windows 98
Yes, really! I want to see if I can rescue Superproject. This video,“Windows 98 Second Edition – Installation in Virtualbox” is a good start point. Since VB post dates W98, the Guest Additons are a bit crap, and so my researches take me to this page on the ubuntu forums, which points at Sci-Tech Display Doctor version 7 beta, the .iso is here, and instructions are here. Auto capture is not in place, except for the keyboard. In May 2020, when tranferring the image to my 2nd Laptop (W10), I found this video on the subject. I also found this article which includes a section on networking, one has to install the hardware driver. When I am ready, how to change the wall paper.
Elementary (Loki)
This can install via AppCenter
or apt-get
,
$ sudo apt-get install -y virtualbox
Fedora 24 & Vbox 5.0.26
yum has been replaced by dnf, (yum update) && (yum install kernel-devel)
which will invoke the dnf commands and then make the guest additions. The update took a bit of time. It would seem that one has to use systemd to execute the mount commands as System V init files no longer works.
Ubuntu 16 & Vbox 5.0.26
I did this with a Window 10 host. Easy peasy. Until I wanted Samba. This might be tricky, bridged networking seems harder than before on W10; can we actually build servers on a w10 host? I was advised to use NAT for the internet connection and “host only” to allow the guest servers to be connected using the host. 2 August 2015
I can’t find a complete problem statement, but stackexchange have a page here, and google is quite effusive.
Problems
Mongodb & Shared Folders
Mongodb, cannot unfortunately be mounted on an incoming shared folder, nor (more obviously) on a mounted NFS disk, less sure about SMB. See here… on google groups/vagrant
Extending or resize(ing) Hard Disks
I found this, by Derek Molloy very useful. You extend the disk using vboxmanage
, and extend the partitions using gpartd
.
Using Shared Folders
Share Disk
I have had a method for several years; it was based on the documentation for Linux Guests, see Help with Shared Folders VB 3.0.6 at http://forums.virtualbox.org. Using the -o flag allows mounting as a non root user. Each host will have a folder, that will be mounted on /host. This requires a script in /usr/local/bin, invoked by rc.local.
mount -t vboxsf -o uid=1000,gid=1000 ${sharename} ${mountname}
In Sept 2011, I had another look at this and re-wrote the mountshares script to use the -o flag. I have also written an installer. It is LSB compliant and tested for syntax and function on Ubuntu 11
To mount the cdrom if you are using a server edition,
mount -t iso9660 -o ro /dev/cdrom /media/cdrom
Shared Folders
I have written some scripts to mount shared folders on Ubuntu and uploaded them there, and on the Virtual Box Forums in this thread. , thi is now held in my vbooxtools repo on github.
Resources.
- VirtualBox Community Forums
- my posts at the vbox forums, I may need to be logged in for this to work.
.
Comments ( 14 )
$ apt-cache show virtualbox-guest* | egrep ^Package
installed on Windows 8, I installed the guest addition using apt-get, I am using mountshares, see below, and used update-rc.d to install it.$ sudo apt-get update ; sudo apt-get upgrade;
You don't need to get the kernel header source any more. Tidy up the launcher panel, insert a terminal and libre office, delete the libre office tools, lock the software update program to the panel, wish they still had drawers mount the vbox installation CD, browse using the file browser and you will be prompted to make the vbox drivers, do so.