March 2, 2018 · Tech Tips Virtualization Virtual Machines

Converting between different virtual drive formats

I often use virtual machines for large projects so that I can create an isolated environment for them. They also make it easy for me to run many processes in their own container so they do not consume too many resources and can be ended easily if needed. I usually use Microsoft’s Hyper-V or Oracle’s VirtualBox depending on the nature of my project and where I intend on hosting the virtual machine. Occasionally I find myself needing to convert between different virtual drive formats so that I can run one virtual machine on another host.

What is a Virtual Drive?

A virtual drive is a software emulation of a physical drive that is used for virtual machines. They are usually a normal file that stores a virtual machine’s whole drive, making them quite big at times. Some formats allow these drives to grow as more files are added while others create a fixed size file initially corresponding to the size of the virtual drive that was created. These virtual drives each have their own extra features, but fundamentally they are all used to store files for a virtual machine. The problem is that almost every vendor of virtualization software has created their own format, making it a challenge to transfer a virtual machine from one vendor’s software to another.

Converting between different virtual drive formats

The software

In order to convert between different virtual drive formats, we will be using an excellent, free utility created by StarWind Software called StarWind V2V Converter.

starwind v2v converter

Downloading and installing the software is a relatively simple process. Once you have done so, you can move onto the next step where we will take a virtual drive and convert it into another format.

Converting the virtual drive

In this guide, we will be converting a local .vhdx virtual drive that was used in Microsoft Hyper-V into a format such as .vhd so that the drive can be loaded into a virtual machine in VirtualBox (VirtualBox does have partial support for the new .vhdx format, but their support for .vhd drives is considerably better). Start StarWind V2V Converter and let’s get started.

1. Select the source image location

We first need to select where the image we want to convert is located.

We first need to select where the image we want to convert is located. StarWind V2V Converter supports converting an image on a local drive as well as being able to connect to a VMware ESXi Server or Microsoft Hyper-V Server in order to retrieve a virtual disk to convert. We will be using the first option as the image I have is stored on my local machine, but the latter options can be useful in a network setup where your virtual machines are on a different server.

Select Local file and click Next >.

2. Choose the source image to convert

Since we have specified that we want to convert a local file, we are presented with a screen like the one above that lets us browse for the virtual disk file on our machine.

Since we have specified that we want to convert a local file, we are presented with a screen like the one above that lets us browse for the virtual disk file on our machine. If you chose any of the server options, you will first be prompted to for login credentials for a server that you specify before being able to select an image.

In this case I selected the .vhdx drive that I want to convert. Once I chose the image, we can see StarWind V2V Converter gives us a summary of the drive information. Take note of the size of the drive as you will need at least that much free space on whatever drive you are going to save the converted virtual disk to (even if the drive only expands as files are added).

3. Select the format you want to convert the disk to

We now have to choose which format we want the source virtual disk to be converted into.

We are know given a list of formats that we can convert the virtual drive to. Where you want to host the server and how you want the hard drive to grow will determine which file format you will want to select.

Since I want to open a growable .vhd drive in VirtualBox, I’ll select Microsoft VHD growable image and then click Next >.

4. Select where you want to save the converted image to

We can now select we want to save the converted image.

We are now given a choice as to where we want to save the converted image. Ensure that you have enough space on the drive that you wish to save the image.

In this case I will just save the image in the same location as the source drive and will later move it to the correct folder so that VirtualBox can access the drive.

5. Wait for the conversion to finish

Now we have to wait for the conversion to finish.

Now all that’s left to do is to wait for the conversion to finish. This might take a while depending on the size of your initial drive. Once it is finished, you can close the wizard and load the hard drive into your virtual machine.

Conclusion

While this is a seemingly simple task, it took me a while to find a solution that was free and worked with the formats I needed to convert between. Hopefully this guide helped you out. If you have any queries or questions, please leave them in the comments below and I will get back to you as soon as possible.

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket