Posts Tagged ‘VirtualBox’

Create VHD Images Using VirtualBox

Yesterday, I wrote a post offering some VHD image files of various sizes for download. However, if you’re a bit more intrepid, you might want to create some of your own.

Despite the fact that (as far as I’m aware) you can’t create VHD image files using the GUI version of Oracle’s VirtualBox software, it is possible to create them using the command line tool ‘VBoxManage’.

Here’s how:

$ VBoxManage createhd --filename 40GB_VHD.vhd --size 40000 --format VHD --variant Standard

This command is fairly self-explanatory. Options as follows:

  • createhd (create a virtual disk image)
  • –filename [filename.vhd]
  • –size [size in MB]
  • –format [specify the new file as a VHD image]
  • –variant [‘Standard’ equates to self-expanding]

VBoxManage and other VBox command line tools are installed when you load the full version of VirtualBox (available here), so there’s nothing extra you need to load on. This command works on PC, Mac and Linux. Enjoy!

Download Blank VHD Images


VHD is the virtual hard disk file format originally used by Microsoft Virtual PC, but fully compatible with VirtualBox, Citrix and VMWare.

Despite the fact that VHD is not native to any of these VM hosts, it is actually a very useful file format, widely compatibility with (and thus portable between) various pieces of host software. There is also a broad range of useful tools for modifying and working with VHD images. I’ve recently been experimenting with the Plop VHD Loader, one such 3rd party tool which allows the user to boot a real machine from a VHD file.

Although they are VHD compatible, hosts like VirtualBox and VMWare prefer to create images in their own (.VMDK, .VDI) file formats, so I’ve created some blank VHD image files of different sizes which are available for download below:

These are all self-expanding, so the files themselves are very small (you don’t have to download a full 40GB of nothing). Hopefully these will help you get started experimenting with VHDs. Enjoy!

Booting a Virtual Machine from a USB Disk (Easily)

Virtual Machines are fantastically useful – whether you want to try out something beta, something old, run apps across platforms or in the cloud, VMs are a killer part of any power user’s repertoire.

One thing which I’ve felt has always limited their flexibility, however, is their storage mechanism, the virtual hard disk. In a previous tutorial, I used Oracle’s VirtualBox to install Ubuntu Linux to an external storage device. Out-of-the-box, however, VBox and its ilk don’t make booting from a physical disk a particularly simple process (see here, for example).

Luckily, this doesn’t need to be, thanks to the Plop Boot Manager.

This boot manager obviates the need for any command line trickery to boot your VM from USB. (This assumes you’ve already got an OS installed to a USB drive – if you don’t, have a look at this tutorial, which demonstrates how to install Ubuntu to a USB disk from within a VM).

How to:

1. Download the Plop boot manager to your host computer (here)

2. Open up your virtual machine and connect ‘plpbt.iso’ to your virtual CDROM drive.

3. Connect your USB disk to the virtual machine.

4. Boot up the VM. When the Plop boot screen appears, select USB.

The machine will now boot from the external disk. Once the OS has started loading, it’s safe to ‘remove’ the Plop image from the virtual CDROM drive.

Install Linux to and Boot from a USB Drive on Your MacBook

I, like millions of others, use Mac OS X as my main operating system. It’s fast, reliable and secure, and the computers it runs on are undeniably the best designed and built machines available on the market. There are many options available to users who need the added flexibility of running Linux or Windows alongside OS X, perhaps through SSH or by using a Virtual Machine. Sometimes, though, you need a full, non-virtualised OS environment to work in, and while Boot Camp is great it’s not ideal for someone like me who rolls with a very fast, but very small, SSD boot drive.

In this tutorial, I’ll show you how to install Linux to any external USB device and boot your Apple computer from it. I’ll be working with Ubuntu 11.04 32-bit and a MacBook Pro running Mac OS X 10.6 Snow Leopard. Guides elsewhere online seem to only help you if you happen to already have a Linux box to work with – my tutorial only requires one Macintosh computer. All the software used herein is open source and free of charge.


Vintage & Rare Part II – Windows Me Beta 1 (Georgia)

No, you read that title correctly – there actually was a beta version of Windows Me. Contrary to popular belief, Microsoft did test Me before shipping it, under the beta code name of Georgia. I loaded up Georgia 4.90.2380 on VirtualBox this week to take a look at a prerelease version of a product who’s negative reception could give Vista or Kin a run for its money any day of the week.

I decided to set my VBox ostype to ‘Windows98’ for this installation rather than ‘WindowsMe’…this is a beta version which definitely still has more in common with 98 than the final product. This VBox is equipped with a generous 128MB of RAM and a 2GB hard drive.

The Georgia CD is bootable, and immediately asks if I’d like to install Windows 98. The mislabeling of the OS on the CD is a pretty good indicator of the completeness of the CD installer – my copy didn’t even have the facility to partition and format the hard drive. Instead, I had to boot to a Windows 95  installation disk to prepare the disk. Further to this, the installer wouldn’t load automatically from the CD: even if you select ‘Start Windows Setup’ at the main menu, you are sent to a command prompt with an error message declaring that the Windows setup files cannot be found. Luckily, switching the prompt to the CD drive and typing ‘SETUP’ kicks things back into life. (more…)

VirtualBox ostype List

When you’re creating a VirtualBox VM, you need to specify an –ostype when using ‘VBoxManage createvm’. A list of these options is, bizarrely, not in the VBox documentation. You can get this list by typing ‘VBoxManage list ostypes’ at the command line, but here it is reproduced for reference.

ID:          Other
Description: Other/Unknown
ID:          Windows31
Description: Windows 3.1
ID:          Windows95
Description: Windows 95
ID:          Windows98
Description: Windows 98
ID:          WindowsMe
Description: Windows Me
ID:          WindowsNT4
Description: Windows NT 4
ID:          Windows2000
Description: Windows 2000

Porting a Virtual Machine to a VirtualBox Server

If you’re like me, you’ll have a few virtual machines in the stable on your main desktop computer, which isn’t always the best place for them. Virtual hard drives take up tons of room, and the machine itself will be a big resource drain on the host system. This task is ideally suited to a server, and if you use VirtualBox it’s easy to port your desktop VMs to the cloud, freeing up hard drive space, wiping out the resource toll and making the virtual machine accessible from any computer.

This technique is also really useful for tricky to install virtual machines, particularly those with installers requiring multiple floppy disks, which can be set up with ease on a GUI machine and then sent to the server for archiving/remote access.

i: Check Your Specs

Before opening any terminals or remote anything, you need to open VirtualBox on your desktop computer (I’m using Mac OS X but this process will be exactly the same under Windows or Linux). For this example, I’ll be porting a virtual machine containing Windows NT 4. Again, this will work fine for any guest OS.

When VirtualBox opens to the ‘VirtualBox Manager’ screen, highlight the machine you wish to port. The specs of the machine will appear in the right hand pane of the window (see fig 1).

fig. 1 – Check the specs of your VM

We need to recreate this environment as closely as possible on the server to maximise compatibility. Most of the time you’ll be using the default VBox hardware selection, but you still need to make sure that you match the other details with as much accuracy as possible.


Choosing the right Virtual OS: Windows XP vs. Windows FLP

One of my favourite things about the ubiquity of multi core CPUs, broadband and gigabytes of RAM in modern computers is that virtual operating systems are finally viable. When I was growing up, trying out another OS meant multiple hard drives, partitions and the struggle of actually tracking down discs for these exotic digital curios. (I learned the hard way about making sure you’d partitioned a drive properly when I overwrote Windows 3.1 with a copy of BeOS I got with a computer magazine sometime in the mid-90s.) Thankfully, broadband can hook you up with pretty much any *nix OS in 10 minutes flat these days, and it’s one of my favourite modern software toys which gives you a no-risk sandbox in which to experience the object of your curiosity: the virtual machine.

I wrote a post at the beginning of this year detailing how to set up a remotely accessible cloud-y virtual machine using VirtualBox 4. Covered in that tutorial were the technical instructions for actually setting up the virtual machine itself, however I didn’t go into any detail about choosing an operating system to run on your brand new VBox (mainly because I specifically needed an XP machine at the time).

To serve as an interesting comparison, and also to segue nicely into my forthcoming (I promise!) series on the ‘OS less travelled’, this post will cover the differences in functionality and performance between ‘full fat’ Windows XP Professional and ‘semi-skimmed’ Windows FLP.

Windows FLP stands for ‘Fundamentals for Legacy PCs’, and is a slimmed down install of XP specifically designed for low-spec machines. You can read up on the OS itself at Wikipedia – but is it a viable candidate for a general purpose VM?

Test Conditions

Time to get (relatively) scientific. The two machines will be set up as per my guide with identical specs: 512MB RAM, single CPU, 12GB hard drive and 8MB VRAM.

(Handy aside: to get the specs of a VirtualBox VM, type ‘VBoxManage showvminfo XP’, where XP is the name of the VM in question, at the command line)


The installer for FLP is very different from XP. At the time of its release in 2006, Vista was about to ‘replace’ XP as the computing world’s de facto operating environment. Ironically, the design language of Vista, derided for its over-emphasis on power-sucking visual trinketry, has infiltrated this ‘low power’ Microsoft OS – you can see the modern Windows flag in figure 1, for example. The installer also has a full GUI, a pioneering feature for a Microsoft OS.

fig. 1

Figure 2 shows the installation type selection – I’m going for ‘typical’ in this case. The fully-GUI installation procedure allows very easy access to advanced installation options such as unattended installations and manual TCP/IP configuration. (more…)

Setting Up a Headless VirtualBox VM in Ubuntu Server

In the past week, I’ve been asked to reinstall Windows XP onto a PC which has recently suffered a hard drive failure. One of the problems with the continuing use of this OS (which celebrates its tenth birthday this year) is its antique selection of included drivers and inability to load from anything except a floppy disk at install time – press F6, etc…

Thankfully, we have nLite, which helps the process of slipstreaming drivers written this century into an installation and creating custom media for loading the now ancient XP onto machines with such advanced features as…SATA.

This is exactly the issue I faced with this particular machine, but without a Windows machine on which to run nLite (which is sadly not available for Mac OS X or Linux) I was pretty stuck. For my own work, I never have any need to use Windows, however there is one killer application for Windows which means I do sometimes have use for it once or twice a year – repairing other Windows computers. A virtual machine is the perfect solution for this problem.

In this tutorial, I’ll show you how to set up VirtualBox on a headless Linux server and access the VM from any internet-connected computer.

(These instructions are written for Ubuntu Server 10.04, however they should work with other versions of Ubuntu and be similar to other distributions as well)


  • Oracle VirtualBox 4.0
  • Operating system installation media
  • Microsoft Remote Desktop for Mac (or equivalent)

Step 1: Installing VirtualBox

  1. Visit Oracle’s VirtualBox download page on your client machine. There is a wide range of supported Linux distributions and versions, so find the one you are running. Right-click the appropriate link and select ‘Copy Link Address’
  2. Open an SSH connection to your server and navigate to the folder you wish to download the installer to (for example /home/user/downloads). (more…)