Windows Server 2012: Convert VHD to VHDX using Hyper-V Manager

Windows Server 2012: Convert VHD to VHDX using Hyper-V Manager

  • Comments 8
  • Likes

As you are all aware Hyper-V is Microsoft’s Virtualization platform and we use VHD as the file format for installing operating systems. VHD stands for Virtual Hard Disk. Windows Server 2012 features new file format known as VHDX.

You can read more about it over here http://technet.microsoft.com/en-us/library/hh831446.aspx 

As enterprise workloads for virtual environments grow in size and in performance demands, virtual hard disk (VHD) formats need to accommodate them. Hyper-V in Windows Server “8” Beta introduces a new version of the VHD format called VHDX, which is designed to handle current and future workloads.

VHDX has a much larger storage capacity than the older VHD format. It also provides data corruption protection during power failures and optimizes structural alignments of dynamic and differencing disks to prevent performance degradation on new, large-sector physical disks.

 

The main new features of the VHDX format are:

  • Support for virtual hard disk storage capacity of up to 64 TB.
  • Protection against data corruption during power failures by logging updates to the VHDX metadata structures.
  • Improved alignment of the virtual hard disk format to work well on large sector disks.

The VHDX format also provides the following features:

  • Larger block sizes for dynamic and differencing disks, which allows these disks to attune to the needs of the workload.
  • A 4-KB logical sector virtual disk that allows for increased performance when used by applications and workloads that are designed for 4-KB sectors.
  • The ability to store custom metadata about the file that the user might want to record, such as operating system version or patches applied.
  • Efficiency in representing data (also known as “trim”), which results in smaller file size and allows the underlying physical storage device to reclaim unused space. (Trim requires physical disks directly attached to a virtual machine or SCSI disks, and trim-compatible hardware.)

Now you may say if we have so many benefits to VHDX then what about existing VHD files. Well, you can use exiting VHD files in Windows Server 2012 for Virtualization.

HOWEVER THE INTERESTING QUESTION WOULD BE “HOW CAN I CONVERT MY VHD FILE TO VHDX FORMAT TO GET ALL THE BENEFITS?”

Well, we use the Hyper-V Manager to Edit the Virtual Hard Disk. Here is how we do that.

First open Hyper-V Manager & Click on Edit Disk

image

Now, on the Wizard click on Next and then on the next screen locate the .VHD file.

image

In the Choose Action box select the necessary action. In this case you can perform following actions Compact, Convert & Expand. Select Convert & click Next.

Note: If you want to expand the VHD file select Expand & click Next, that will help you extend the VHD file up to 2 TB.

image

Select VHDX file format & click Next

image

In the next box Choose Disk Type, select Dynamically expanding & click Next.

image

In the Configure Disk, specify the file name & click Next.

image

After seeing the Summary, click on Finish.

After that it will show you the following box stating Editing the virtual disk.

image

After few minutes (or based upon the actual VHD file size) you will see the new VHDX file will be ready to use. Enjoy.

Happy Virtualization

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Example links are broken

  • Can you have a base disk in .vhd format and a differencing disk in .vhdx format?

  • When you create a differencing disk, you must specify a parent disk image and the filename for a child disk image to contain the differences from the parent.  Both must be the same format.  Example:  Parent.vhdx, Child.vhdx.

  • If you're converting from a fixed VHD to a dynamically expanding VHDX is the VHDX file compact at that point? IE it is only utilising the space utilised?

  • After the wizard is finished converting to the new .VHDX format, does the .VHDX version of the file automatically replace the .VHD version in the VM's configuration, or do you have to manually go into the VM configuration and point to the newly generated .VHDX file?

  • Also, the VHDs are left behind in most cases, I thought they were deleted after conversion?

  • Something else to keep in mind is the physical sector size of a VHD (which is limited to 512 bytes) verse a VHDX (which can be 4096). When a VHD is converted to a VHDX, I believe the sector size remains at 512 bytes. However you may want to change this to a 4096 byte sector size via PowerShell.

  • Excellent! thank you.