Configuring a Shared Virtual Hard Disk

Starting in Windows Server 2012 R2 Preview, Hyper-V makes it possible to share a virtual hard disk file between multiple virtual machines. Sharing a virtual hard disk file (.vhdx) provides the shared storage that is necessary for a Hyper-V guest failover cluster.

Using a shared virtual hard disk is ideal for the following situations:

· SQL Server database files.

· File server services running within a virtual machine.

· Database files that reside on shared disks.

Create and enable a shared virtual hard disk on a virtual machine

Open Hyper-V Manager if it is not already open. (From Server Manager, click Tools and then click Hyper-V Manager.)

Under Virtual Machines, select the virtual machine that you want to configure with a shared virtual hard disk..

In the Actions pane, click Settings.

clip_image002

Click SCSI Controller.

On the left pane, under SCSI Controller, click Add.

clip_image004[4]

On the left pane, under Hard Drive, click New to start the New Virtual Hard Disk Wizard..

clip_image006

On the Before You Begin page, click Next

clip_image008

On the Choose Disk Format, accept the default VHDX. Click Next.

clip_image010

On the Choose Disk Type Page, accept the default Dynamic Expanding. Click Next.

clip_image012

On the Specify Name and Location page, enter the name of your shared virtual hard disk..

On the Specify Name and Location page, click Browse. Navigate to your shared storage location. (Cluster Shared Volumes (CSV) or on a Scale-Out File Server Cluster with SMB 3.0). 

Click Select Folder. Click Next

clip_image014

On the Configure Disk page, verify the size of the new virtual hard disk and alter to desired size or accept default. Click Next

clip_image016

On the Completing the New Virtual Hard Disk Wizard, review your configuration and Click Finish

clip_image018

The new virtual hard disk is now created and needs to be enabled as a shared virtual hard disk. Click the Hard Drive you just created under SCSI Controller

Click the “+” symbol next to the hard disk. 

clip_image020

Click Advanced Features.

On the right hand size, under Virtual hard disk sharing, click Enable virtual hard disk sharing

Click OK. The shared virtual hard disk is now created and enabled. 

Resuming

Sharing a virtual hard disk file (.vhdx) means that you can create and manage a guest failover cluster to protect the application services running inside your virtual machines. Before Windows Server 2012 R2 Preview, if you wanted to create a Hyper-V guest failover cluster, you needed to expose your storage topology to the virtual machine.

Starting in Windows Server 2012 R2 Preview, you can deploy a Hyper-V guest failover cluster that is no longer bound to your storage topology. You can implement a guest failover cluster by using a shared virtual hard disk, Fibre Channel, Server Message Block (SMB), Storage Spaces, or iSCSI storage options. Shared virtual hard disks are only available in Windows Server 2012 R2 Preview. Hyper-V makes it possible to share a virtual hard disk file between multiple virtual machines. Sharing a virtual hard disk file (.vhdx) provides the shared storage that is necessary for a Hyper-V guest failover cluster.

Cheers,


Marcos Nogueira
http://blog.marcosnogueira.org
Twitter: @mdnoga

Marcos Nogueira

With more than 18 years experience in Datacenter Architectures, Marcos Nogueira is currently working as a Principal Cloud Solution Architect. He is an expert in Private and Hybrid Cloud, with a focus on Microsoft Azure, Virtualization and System Center. He has worked in several industries, including Aerospace, Transportation, Energy, Manufacturing, Financial Services, Government, Health Care, Telecoms, IT Services, and Gas & Oil in different countries and continents. Marcos was a Canadian MVP in System Center Cloud & Datacenter Managenment and he has +14 years as Microsoft Certified, with more than 100+ certifications (MCT, MCSE, and MCITP, among others). Marcos is also certified in VMware, CompTIA and ITIL v3. He assisted Microsoft in the development of workshops and special events on Private & Hybrid Cloud, Azure, System Center, Windows Server, Hyper-V and as a speaker at several Microsoft TechEd/Ignite and communities events around the world.

One Reply to “Configuring a Shared Virtual Hard Disk”

Leave a Reply

Your email address will not be published. Required fields are marked *