Converting a Shared Virtual Hard Disk VHDX to a VHDS Set Format #HyperV #WS2016

Introduction

Shared VHDX is a great feature that was introduced in Windows Server 2012 R2, it’s very easy to set up for guest clustering. However, when you create a guest cluster with shared VHDX you pretty much all the limitations of any other disk cluster with the exception it’s just using VHDX, but with guest clusters you cannot do host-level backup as you do with the physical clusters, you cannot do online resize for shared VHDX, you cannot do storage live migration for the shared VHDX, you cannot protect and replicate VMs with Hyper-V replica, so all these great features are not available.

In Windows Server 2016, Microsoft introduced a new virtual hard disk format called VHD Set (VHDS).

There are three big features that have been introduced with the new VHD Set format. The first one is allowing you to do host-based backup without any agent in the guest, so you can backup the guest clusters with shared virtual hard disk (Check with your backup vendor if they support this feature). The second one is, you can online resize shared virtual hard disk while the guest cluster is running (Note: you can only expand, but you cannot shrink it). The third one is the integration with Hyper-V Replica, so guest clusters can now have Shared VHDX protected by Hyper-V Replica for disaster recovery.

As of this writing, the two limitations of Shared VHD Set in Windows Server 2016 are the following:

  • Storage live migration for a VM with shared VHD Set is not supported.
  • Create a checkpoint is not supported.

The Shared (VHDX) file still exists, so if you have an existing guest clusters using (VHDX) file you can continue to use those VHDX files for guest clusters. However, you will not be able to do the online resize and host based level backup. The good news, Microsoft is providing a very quick and easy way to migrate from a shared VHDX to a VHDS file, so you can take advantage of all the new features. Check all the new features in Windows Server 2016 Hyper-V here.

In this blog post, I will share with you on how easy to convert/migrate from a Shared Virtual Hard Disk VHDX to a VHDS Set format.

Migrate a shared VHDX file to a VHD Set file

Converting or Migrating an existing shared VHDX to a VHDS requires taking the VM offline. The recommended process is the following:

  1. Shut down the VMs which are connected to the Shared VHDX.
  2. Remove the Shared VHDX from the VM settings.
  3. Convert the Shared VHDX to VHDS using Windows PowerShell.
  4. Connect the VHD Set to the VMs.
  5. Turn on the VMs which are connected to the Shared VHD Set.

All the steps that are mentioned above can be done using Hyper-V Manager console except for the VHDX conversion step. For the sake of this example, we will perform all steps using Windows PowerShell.

Shut down the VMs that you want to migrate by running the following command:

HyperV-Convert-VHDX-VHDS-02

Remove the VHDX from the VM by running the following command:

HyperV-Convert-VHDX-VHDS-03

Convert the VHDX to a VHDS by running the following command:

This script will convert all target VHDXs to VHDSs automatically.

HyperV-Convert-VHDX-VHDS-04

Add the VHDS to the VM by running the following command:

HyperV-Convert-VHDX-VHDS-05

Turn on the VMs that you migrated to Shared VHD Set by running the following command:

HyperV-Convert-VHDX-VHDS-06

Hope this helps!

Cheers,
-Ch@rbel-

About Charbel Nemnom 311 Articles
Charbel Nemnom is a Microsoft Cloud Consultant and Technical Evangelist, totally fan of the latest's IT platform solutions, accomplished hands-on technical professional with over 15 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

Leave a Reply