Our configuration and requirements before we begin the Guest SQL 2014 Cluster with Shared VHDX on a Hyper-V Cluster :
- Microsoft Hyper-V 2012 R2 Cluster is running with Cluster Shared Volumes.
- We made Two virtual Machines with Microsoft Windows Server 2012 R2 called SQL01 and SQL02
- Networking Two NICS : One on the Production Switch and NIC two on the Heart Beat Switch.
This step shows how to create and then share a virtual hard disk that is in the .vhdx file format. Repeat this step for each shared .vhdx file that you want to add. For example, you may want to add one or more shared disks that will act as data disks, and a separate shared disk that you can designate as the disk witness for the guest failover cluster.
- In Failover Cluster Manager, expand the cluster name, and then click Roles.
- In the Roles pane, right-click the virtual machine on which you want to add a shared virtual hard disk, and then click Settings.
- In the virtual machine settings, under Hardware, click SCSI Controller.
- In the details pane, click Hard Drive, and then click Add.
- In the Hard Drive details pane, under Virtual hard disk, click New.The New Virtual Hard Disk Wizard opens.
- On the Before You Begin page, click Next.
- On the Choose Disk Format page, accept the default format of VHDX, and then click Next.
Note To share the virtual hard disk, the format must be .vhdx.
- On the Choose Disk Type page, select Fixed size or Dynamically expanding, and then click Next.
Note A differencing disk is not supported for a shared virtual hard disk.
- On the Specify Name and Location page, do the following:
- In the Name box, enter the name of the shared virtual hard disk.
- In the Location box, enter the path of the shared storage location.For Scenario 1, where the shared storage is a CSV disk, enter the path:C:\ClusterStorage\VolumeX, where C:\ represents the system drive, and X represents the desired CSV volume number.
For Scenario 2, where the shared storage is an SMB file share, specify the path:
\\ServerName\ShareName, where ServerName represents the client access point for the Scale-Out File Server, and ShareName represents the name of the SMB file share.
- Click Next.
- On the Configure Disk page, accept the default option of Create a new blank virtual hard disk, specify the desired size, and then click Next.
- On the Completing the New Virtual Hard Disk Wizard page, review the configuration, and then click Finish.
Important If the virtual machine is running, do not click Apply in the virtual machine settings before you continue to the next procedure. If you do click Apply on a running virtual machine, you will need to stop the virtual machine or remove and then add the virtual hard disk without clicking Apply.
- In the virtual machine settings, under SCSI Controller, expand the hard drive that you created in the previous procedure.
- Click Advanced Features.
- In the details pane, select the Enable virtual hard disk sharing check box.
Note If the check box appears dimmed and is unavailable, you can do either of the following:
- Remove and then add the virtual hard disk to the running virtual machine. When you do, ensure that you do not click Apply when the New Virtual Hard Disk Wizard completes. Instead, immediately configure sharing in Advanced Features.
- Stop the virtual machine, and then select the Enable virtual hard disk sharing check box.
- Click Apply, and then click OK.
- Add the virtual hard disk to each virtual machine that will use the shared .vhdx file. When you do, repeat this procedure to enable virtual hard disk sharing for each virtual machine that will use the disk.
|To share a virtual hard disk by using Windows PowerShell, use the Add-VMHardDiskDrive cmdlet with the –ShareVirtualDisk parameter. You must run this command as an administrator on the Hyper-V host for each virtual machine that will use the shared .vhdx file. For example, the following command adds a shared virtual hard disk (Data1.vhdx) on volume 1 of CSV to a virtual machine that is named VM1.
For the Second Guest clusternode you will add the same VHDX files you created on the first Guest clusternode and share them also like on the first clusternode.
So now we have a Shared Quorum Disk and a Shared Data Disk
The next steps :
- Bring the disks Online on the first Guest node with Disk Management
- Install Failover Cluster on both nodes.
- Make a two node Cluster
- Install a Microsoft SQL 2014 Guest Cluster.
Install Microsoft Failover Cluster.
Install Microsoft SQL 2014 Server for Clustering.
Microsoft SQL 2014 Server is installed on the Guest Cluster on top of an Hyper-V 2012 R2 Cluster
Guest SQL 2014 Cluster is running on Hyper-V 2012 R2.
So now we are ready for installing Microsoft SPF and Windows Azure Pack for Windows Server 2012 R2 🙂