Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Hyper-V / VHD Set: Shared Virtual Disks on Hyper-V 2016

October 12, 2017 Hyper-VWindows Server 2016

VHD Set: Shared Virtual Disks on Hyper-V 2016

The next useful innovation that appeared in Windows Server 2016 is the new format of virtual disks — VHD Set (VHDS) enabling the simultaneous use of one virtual disk by multiple virtual machines. This feature is used in guest cluster scenarios (file cluster, SQL Server AlwaysOn FCI, etc.), when shared disks have to be available for all virtual machines cluster nodes. VHD Set technology is designed to replace Shared VHDX feature and also doesn’t not require the configuration of virtual HBA and SAN for the presentation of one LUN to several VMs.

In Windows Server 2012 R2 to provide guest clustering features the format of shared virtual disks, Shared VHDX, was used. However, Shared VHDX has some drawbacks:

  • no opportunity to change the size or migrate Shared VHDX
  • VHDX doesn’t support backup, checkpoints or replication

VHDS doesn’t have these restrictions, but it is available only in the VM running the guest Windows Server 2016. VHDS supports the following new features:

    1. host-level support of backup and replication
    2. VHD Set size change on-the-fly (without stopping the VM)
    3. support of hot disk migration
    4. creating checkpoints for .vhds files

To create a new VHD Set, select New -> Virtual Disk in the graphical menu of Hyper-V Manager. Specify VHD Set as disk format, then select the type of the disk (fixed or dynamic), file name, location and size.

hyper v 2016 - vhd set - new virtual disk typeYou can create the disk using PowerShell too:

New-VHD –Path c:\clusterstorage\vmstorage01\DynamicDisk.vhds -SizeBytes 40Gb -Dynamic

New-VHD create vhds disk

When creating a disk, it is enough to specify vhds file extension, and PowerShell will automatically create the VHD Set. When creating a disk of VHD Set format, two files appear:

  • .avhdx – a disk file containing data (it can be both fixed and dynamic)
  • .vhds – a small (260 KB) metadata file to coordinate the interaction between guest cluster nodes

avhdx and vhds files

Here is an example how to create a wo-node guest cluster using VHDS.

Let’s create two new VHD Sets. The first one will be a Witness disk in the cluster quorum, and the second will be the disk for data. For example, our cluster is represented by two VMs. Connect both VHD Sets on each virtual machine. You can do it either in the Hyper-V graphical interface or in PowerShell:

Add-VMHardDiskDrive -VMName VMCL01 -Path "c:\ClusterStorage\SharedDisk\VM_Quorum.vhds" -SupportPersistentReservations
Add-VMHardDiskDrive -VMName VMCL01 -Path "c:\ClusterStorage\SharedDisk\VM_Shared.vhds" -SupportPersistentReservations
Add-VMHardDiskDrive -VMName VMCL02 -Path "c:\ClusterStorage\SharedDisk\VM_Quorum.vhds" -SupportPersistentReservations
Add-VMHardDiskDrive -VMName VMCL02 -Path "c:\ClusterStorage\SharedDisk\VM_Shared.vhds" -SupportPersistentReservations

Install Failover Clustering feature on each virtual server:

Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools -ComputerName VMCL01
Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools -ComputerName VMCL02

Initialize the disks:

get-disk |? OperationalStatus -Like "Offline" | Initialize-Disk

Create NTFS partitions:

New-Volume -DiskNumber 1 -FileSystem NTFS -FriendlyName Quorum
New-Volume -DiskNumber 2 -FileSystem NTFS -FriendlyName Data

Now you have to create a cluster:

# Compatibility check
Test-Cluster VMCL01,VMCL02

# Creating cluster
New-Cluster -Name FSCluster01 -Node VMCL01,VMCL02 -StaticAddress 192.168.0.50
(Get-ClusterResource |? Name -like "Cluster Disk 1").Name="Quorum"
(Get-ClusterResource |? Name -like "Cluster Disk 2").Name="Data"

# Specify the Witness disk
Set-ClusterQuorum -DiskWitness Quorum

# Add Cluster Shared Volume
Get-ClusterResource -Name Data | Add-ClusterSharedVolume

If you have done it right, a two-node guest cluster will appear.

two-node hyperv guest cluster with shared vhd disk

You can convert Shared VHDX to VHD Set. The conversion is performed offline (the disk must not be used and must be disconnected from all VMs) using Convert-VHD cmdlet:
Convert-VHD "C:\ClusterStorage\SharedDisk\old.vhdx" "C:\ClusterStorage\SharedDisk\new.vhds"

So, VHD Set in Windows Server 2016 allows to create a MSFT guest cluster without using complex technologies, like NPIV, virtual HBA and virtual SAN network. Virtual VHDS originally supports changing size, snapshots and migration.

1 comment
0
Facebook Twitter Google + Pinterest
previous post
Recovering Files from a RAW Partition using TestDisk
next post
Run Multiple Websites on the Same Port and IP Address on IIS

Related Reading

How to Backup Hyper-V Virtual Machines?

December 10, 2019

How to Change a Network Location from Public...

December 9, 2019

Configuring Storage Replica on Windows Server 2016

December 4, 2019

How to Delete Old User Profiles Using GPO...

November 19, 2019

Using RDCMan (Remote Desktop Connection Manager)

November 11, 2019

1 comment

Alex October 12, 2017 - 6:53 am

Thanks very helpful.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Follow us

woshub.com

Recent Posts

  • How to Backup Hyper-V Virtual Machines?

    December 10, 2019
  • How to Change a Network Location from Public to Private on Windows 10/Windows Server 2016?

    December 9, 2019
  • Configuring Storage Replica on Windows Server 2016

    December 4, 2019
  • Windows 10 Install Error 0x80300024

    December 2, 2019
  • Running PowerShell Script (*.PS1) as a Windows Service

    November 27, 2019
  • Creating Multiple Partitions on a USB Drive in Windows 10

    November 26, 2019
  • VMWare vSphere: Failed to Upload Files to Datastore

    November 21, 2019
  • How to Delete Old User Profiles Using GPO and PowerShell?

    November 19, 2019
  • Get-ADUser: Getting Active Directory Users Info via Powershell

    November 18, 2019
  • How to Recover Deleted Files from a TRIM-Enabled SSD?

    November 14, 2019
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Stop a Hung Virtual Machine on Hyper-V 2016
  • Hyper-V PowerShell Direct in Windows Server 2016
  • How to Install Hyper-V Role in Windows 10 VM under VMWare ESXi
  • Configuring Hyper-V Live Migration without Failover Clustering
  • Production Checkpoint in Hyper-V 2016
  • Using Differencing Disks in Hyper-V for Quick VM Deployment
  • Detecting Memory Overcommitment in the Guest OS
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top