VirtualBox Manage Command Line

I’ve just started looking into Microsoft’s Azure Cloud Service at work as an alternative to the Amazon Web Services (AWS) cloud that we currently use [at work]. I really like AWS and may well be using it for personal projects in the not so distant future. However, as we are developing using C# .NET we wanted to see if Azure would give us anything over AWS.

I’ve only just started, but it seems that you need to create your own VM image and upload it to Azure. I already have VirtualBox installed, so I didn’t want to have to start using an alternative just for Azure.

Luckily, included with VirtualBox is the ‘VBoxManage’ command-line. This allows you to manage VirtualBox from the command-line (i.e. start, stop VMs) but it also has a very useful switch: clonehd

This switch creates a copy of the VirtualBox HDD file and allows the copy to be of a different format. In my case I need VHD. The complete command-line for this is:


VBoxManage clonehd <source .vdi> <destination .vhd> --format vhd


You’ll then end up with a cloned HDD image file of your VM. This is also the correct method, by the way, of backing up a VM. If you just copy & paste the file you’ll end up in a GUID nightmare!

For more information about VBoxManage clonehd and other VBoxManage command-lines, see the VirtualBox Manual online here.

0 Comments