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.

The shred folder manager script needs to be uploaded to git, just in time to be replaced by launchd.

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.

Ubuntu 14 & Vbox 4.3.26

Even better, they’ve fixed the virtual guest compilation script

  1. make the VM manifest, set the ubuntu .iso as the boot disk,
  2. Install the  live cd on the .vdi, restart, you can set the shared folder parameters now, which in my case includes making a folder called local in the VM folder, restart
  3. $ sudo apt-get update ; sudo apt-get upgrade; you don’t need to get the kernel header source any more.
  4. 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
  5. mount the vbox installation CD, browse using the file browser and you will be prompted to make the vbox drivers, do so.

Ubuntu 14 & Vbox 4.3.15

Even better, Ubuntu now have a package for the guest additions, (See here for more)

$ 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.

And again, lost the mount.shares script and have recreated it. mountvbshares


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.

Share Disk

I have ahd a method for several years; it was based on the documentation for Linux Guests, see Help with Shared Folders VB 3.0.6 at 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. , and now here, immediately below; these need to be posted to github.

  1. Version 1, share names and mount points hard coded, now has an init or 1st time function that creates the mount points. … mountshares
  2. Version 2, this is ubuntu lsb compliant (I think) … mountvbshares



Related Posts

  • Centos 6.x I downloaded this from The […]
  • Ubuntu 13.10 I am installing this on the Mac under Virtual Box. This snip is about Ubuntu. The […]
  • OpenSUSE and Virtual Box I have been experimenting with an OpenSUSE Linux VM running in Virtual Box. This is […]
  • gNewSense 3.1 get the .iso from here don't make a mistake in creating the Vbox image, it needs a […]
  • System V init scripts I really like Ubuntu's system V initialisation scripts and features. This is now based […]

10 thoughts on “Virtual Box

  1. I needed to use Linux and rebooted my trusty Natty Narwahl aka U13. Whole bunch of problems due to it being out of support. So I downloaded the latest and greatest Vbox 4.2.16, and then Ubuntu 13. Oracle have obviously spent some money and time. It installs a treat, and so does Ubuntu 13. 64 bit now refers to the platform and is no longer code for the CPU architecture/vendor. Vbox fetches its extensions and guest additions now self installs at the touch of a button.

    Now to identify the packages I have installed such as Samba, and install my personal scripts from NN.

    And to delete all my redundant Ubuntu and Centos images.

  2. I moved some out of date comments to here.

    Ubuntu 9, First tried on the Mac, see Networking above, I used synaptic to install smbfs.

    Ubuntu 8, The screen resizing now seems pretty solid. All my U8 images do a full screen resize.

    Ubuntu 7, This has a full screen mode and a vnc client launcher. I don’t use this anymore.

  3. About Ubuntu 11 Server, I installed it at home, and it couldn’t find the dhcp server, (interesting, is this the cause of all the Vista shite!), so installed with static network addressing. When I got to work I changed it, with help from the Ubuntu Networking page.

    I checked that the samba service was running it was. Rebooted the Server, up it comes and I have server VM advertising itself on the network.

    I installed dkms, build-essential and linux-headers-generic using apt-get. The Guest Additions then compiled the windows install failed, this is to be expected.

  4. Some inconclusive comments about VRDP. Virtual Box now has this as functionality to support remote desktop. I tried to get this working with a MS Windows XP Home host and a Win 7 Client. There seems to be a configuration issue with the host. I have not yet got this working with external i.e. host authentication, nor from the ipod touch. I asked for help at the forums in a thread called Help with connecting using VRDP. I shall return to this one day soon.

  5. I have just amended the page to point at Derek Molloy’s advice on growing a disk.

    This didn’t work on an Ubuntu image as the rebooted VM couldn’t see the extra space. (Ubuntu 16 for Docker). I made a new VM using the old disk and this seems to be not what I expect. The disk i.e. file system is larger but some data is missing (U16 4 Docker).

  6. I removed some out of date comments about OpenSUSE, I orginally said, the downloaded disk (11.3) is well behind the repos, since you need to download some additional packages its important that the kernel, source and headers are in sync. The VBox How To states that you need dkms, binutils, gcc, make, patch, libgomp, glibc-headers, glibc-devel, kernel-headers, kernel-devel OR kernel-pae-devel. OpenSUSE uses zipper not yum.

    I waited a while and then issued a zypper refresh command. I then started to issue the compile statements, but was still getting failures. I ran the zypper install for the string above and dkms and libgomp fail. They can’t find anything suitable. I am running this on a W7 64 bit host and this asked for kernel-devel not the pae version. I don’t know if the kernel libraries had been updated before I issued the refresh. Any way the shared folders compiled. This comment was originally written in Sept 2011.

  7. I removed a comment about Centos 5.3 and the screen driver, and a comment about networking on Vbox V3.x on XP. Don’t think anyone will find them useful any more. I also removed a bit about the HP Probook 5320m, its advertised 64 bitness, and the need to play/configure the BIOS to get Vbox working.

  8. I moved my notes on using the FAT file system if using Windows Hosts. The short version is “Don’t”.

    In my early experimentation with Virtual Box, I installed an Ubuntu 8.04 image on an XP FAT Filesystem. On my Dell, I came across an instance where the update manager claims to have run out of disk space. This is almost certainly because I have mounted the VDI on a FAT32 file system. I have created a volume of max size 32 Gb volume. This will probably fail when virtual box attempts to exceed the 32 bit word size limit. Changing the filesystem to NTFS made this problem go away. I used the Microsoft utility to do this. See …Convert FAT disks… at Microsoft’s site, and External Disk on the Dell here. Originally posted on 18 Sep 2009.

Leave a Reply

Your email address will not be published. Required fields are marked *