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