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

Free ebook: Introducing Windows Server 2012 R2 Preview Release

Microsoft just announce another free ebook offering from Microsoft Press. Introducing Windows Server 2012 R2 Preview Release (ISBN 9780735682931), by Mitch Tulloch with the Windows Server Team, introduces new features and capabilities, with scenario-based advice on how the platform can meet the needs of your business. Get the high-level overview you need to begin preparing your deployment now. This book is based on the Preview release and will be updated to cover Windows Server 2012 R2 RTM. 6153.9780735682931x_5EFBD7BF

Download the PDF version of this title here (108 pages, 5 MB). UPDATE: The EPUB format is here and the MOBI format is here .

Watch for the lengthier RTM edition of this ebook later this year!

Cheers,


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