Larry Rayl
Larry is a Senior Consultant at Catapult Systems and blogs on System Center products, Server Core, Clustering and Application Packaging. Larry currently holds certifications in Virtualization, Hosting, Enterprise Server and Desktop Administration.

How to Convert VHD virtual drives to VHDX with Windows 2012 Hyper-V Manager and System Center 2012 Virtual Machine Manager SP1   

Tags: Hyper-V, SCVMM, Windows Server 2012
Technorati Tags: , ,

Recently I was assisting with a presentation on System Center 2012 and Windows 2012 at a conference and was asked if you can convert a virtual machine disk from VHD new the new VHDX format with Windows 2012. In case you were wondering as well, the answer is yes. You can convert a VHD drive to VHDX format within the Hyper-V Manager in Windows 2012. In this post, I will go over how you convert your virtual disks with Windows 2012 Hyper-V Manager and with System Center 2012 VMM SP1 (currently in beta). With either option, you basically are creating a new VHDX disk; your original VHD disk remains intact. Make sure you have the storage available before beginning the conversion process.

Windows 2012 Hyper-V VHD to VHDX Disk Conversion

In the Hyper-V Manager, you use the Edit Disk tool for the conversion. Word of caution, do not edit a .vhd that is associated with a VM that has snapshots, replication enabled, or is associated with a chain of differencing disks. You will corrupt the .vhd file and you will lose your data.

With your host selected, select from the Actions menu Edit Disk. If you have the Actions Pane open, you can select Edit Disk there as well. The Edit Virtual Hard Disk Wizard opens.

 

Browse to the location where the .vhd file is located that you want to convert to .vhdx format, Select Next.

 

 

On the Choose Action Wizard page, select the option to Convert, and select Next. You can also Compact or Expand a virtual disk with the Edit Virtual Hard Disk Wizard.

 

 

Choose the VHDX option on the Disk Format Wizard page, select Next.

 

 

Choose the type of VHDX you would like on Choose Disk Type Wizard page; choices are Fixed Size or Dynamically expanding. For my lab, I use Dynamically expanding disks. Select Next.

 

 

On the Configure Disk Wizard page, enter in the name and location for the new .vhdx file. Select Next.

 

 

Before the process completes, you will receive a confirmation summary, select Finish to begin the conversion process.

 

 

After a couple of minutes, you have a .vhdx formatted drive from your original .vhd drive.

 

 

System Center 2012 VMM SP1

In System Center 2012 VMM SP1, you can convert Virtual Disks to .vhdx format within the properties of the virtual machine.

 

Turn off the VM that contains VHD disks. Right click the VM and select Properties

 

 

Go to the Hardware Configuration tab and locate the virtual disk. As you can see in the graphic, the disk is in .vhd format.

 

 

Select the Convert virtual disk to VHDX format check box to convert the disk.

 

 

A new .vhdx disk is created for the VM. Notice that the name of the drive is the same as the original disk.

 

Once the job completes, you can start the VM with the new .vhdx drive.

Notice in the properties of the virtual disk, the format has changed from .vhd to .vhdx.

 

 

Conclusion

The Windows 2012 Hyper-V Manager provides an option to convert VHD virtual disks to the new VHDX format. Converting to the newer VHDX format provides for enhanced resiliency from corruption along with a host of other new features. Using the Hyper-V manager takes a few more steps and you need to mount the drive separately into the virtual machine. With System Center 2012 VMM, the conversion process is a single step within the Virtual Machine properties. The major difference between the two options is the number of steps it takes to convert the disk. Either way, you do have a couple of options for converting VHD to VHDX depending on the tools you have available.

 

Update:

Ben Armstrong at Microsoft (Virtual PC Guy Blog) has on his site how to convert a VHD to VHDX using PowerShell. Here is the link to his Blog: http://blogs.msdn.com/b/virtual_pc_guy/archive/2012/10/03/using-powershell-to-convert-a-vhd-to-a-vhdx.aspx

 

 
Posted by  Larry Rayl  on  9/30/2012
1  Comment  |  Trackback Url  | 1  Links to this post | Bookmark this post with:        
 

Comments


Robert Hoskins  commented on  Monday, July 29, 2013  1:53 PM 
VHD's are left behind, do you know why? Everything I read doing the conversion in VMM is supposed to be a single step, so I didn't even tell the engineers to go back and delete the old vhd. So double space used.

Name *:
URL:
Email:
Comment:


CAPTCHA Image Validation