Hyper-V: How to Add a Pass-Through Disk on a Failover Cluster

Hyper-V: How to Add a Pass-Through Disk on a Failover Cluster

Applies to: Windows Server 2008, Windows Server 2008 R2

There is a small but crucial difference in  the way you configure a highly available virtual machine in a Windows Server 2008 Failover Cluster and Windows Server 2008 R2 (which includes Live Migration and Clustered Shared Volumes). On Server 2008, the disk is not added to the Cluster. On R2, you must add the disk to the Cluster.

Information in this article is sourced from two Ask the Core Team blog posts:

For this step-by-step, we'll show how to add a Pass-through disk to a highly available virtual machine by attaching it to a SCSI Controller in Windows Server 2008.

NOTE: SCSI controllers require the installation of Integration Components in the Guest. You can also use an IDE controller.

In Windows Server 2008 Hyper-V, using Pass-through disks allows you to bypass the Hyper-V server file system and gain faster, direct access to the disk from inside a virtual machine. However, configuration requires that the disk is Offline from the operating system perspective.  The tradeoffs include;  you must locate the virtual machine configuration file somewhere else, you lose the ability to take snapshots, and you cannot use dynamic disks or configure differencing disks.

For more information on the storage options for Hyper-V review Jose Barreto's blog.

If you add a pass-through disk to a VM in Windows Server 2008 R2 SP1, and the disk status is be displayed as read-only in the VM, see KB 2501763.

Step 1.

Open the settings for a VM running the Windows Server 2008 operating system. The VM is using a VHD for its boot disk attached to an IDE controller (because Hyper-V virtual machines can only boot from storage attached to IDE controllers).

clip_image002

Step 2.

In the Disk Management snap-in, locate the disk used to support the boot disk for the VM, and the LUN to be added as the Pass-through disk. Ensure this disk shows as Offline. If it is a new disk, you must bring it Online and Initialize it before it can be used. You must reset it to Offline before adding it to the VM.

NOTE: This disk is attached to a SCSI controller.

clip_image004

Step 3.

In the Failover Cluster Management snap-in, right-click on the Virtual Machine resource and choose Shut Down.

clip_image008

NOTE: You must leave the Virtual Machine Configuration resource Online or you will not be able to acces the machine settings in the Hyper-V Management snap-in.

clip_image010

Step 4.

Now add the Pass-through disk to the VM. In the Hyper-V Management Snap-in, start the Add Hardware wizard and choose SCSI Controller.

clip_image012

Next, add a Hard Drive to the SCSI Controller.

clip_image014

Next, select the Pass-through disk under Physical hard disk.

clip_image016

Step 5.

Complete the configuration and Start the Virtual Machine in the Failover Cluster Management interface.

Step 6.

Verify the virtual machine is started, then open the Disk Management snap-in and verify the new disk was added.

Step 7. 

In Failover Cluster Manager, click the Refresh virtual machine configuration action in the Actions pane.

clip_image022

NOTE: The virtual machine is Saved as part of the refresh process.

clip_image024

Once the refresh is completed, review the report that is generated to verify it was successful.

clip_image026

Step 8 (Optional).

Examine the details of the report to see what changes were made.

clip_image028

Step 9.

Verify the new disk has been added to the group and it is Online.

clip_image030

Step 10.

In the Failover Cluster Management snap-in, Restart the virtual machine to complete the configuration of the new storage in the virtual machine.
 

clip_image032

Step 11.

After the partitioning and formatting of the volume is complete, refresh the display in the Failover Cluster Management snap-in.

clip_image034

In the Disk Management snap-in, verify the disk now shows a Reserved status. This means it is under the control of the cluster (just like the boot disk).

clip_image036

Step 12.

Test failover to other nodes in the cluster to ensure the new configuration comes Online successfully.


Best Practices for Windows Server 2008

  • When making changes to any highly available virtual machine, you must always Refresh the virtual machine configuration in the Failover Cluster Management snap-in before attempting a failover to another node in the cluster. Ensure the generated report is free of any errors.
  • Do not take the Virtual Machine Configuration resource Offline or you will not be able to make any changes to the VM as it will be removed from display in the Hyper-V Management snap-in.
  • Do not add the Pass-through disk as a cluster physical disk resource before modifying the virtual machine configuration. Let the Refresh process take care of all of that for you.
  • The disk must be in an Offline status in Disk Manager before it can be added to the virtual machine configuration as a Pass-through disk.
  • Finally, there is one anomaly when executing this process. After you modify a VM using the information in this way, and if that VM is not the only VM on a LUN, if you were to add another VM to the same LUN and make it HA, when the operation completes, the disk corresponding to the pass-through disk will also be added as a 'dependency' to the new VM simply because it is already in the group. The dependencies will have to be manually modified by editing the property of the Virtual Machine resource.

Windows Server 2008 R2 includes support for Live Migration of highly available virtual machines between nodes in a Failover Cluster. Clustered Shared Volumes (CSV) is also supported. You can use both CSV with Live Migration, and still take advantage of pass-through disks in a virtual machine configuration. 

This step-by-step for Windows Server 2008 R2 shows how to configure a highly available virtual machine that is using a CSV volume for storing configuration files and the boot VHD, while still taking advantage of a pass-through disk for data storage.
clip_image002

Step 1.

 
Verify that the virtual machine has already been made highly available using a CSV volume to store the configuration file and the base OS vhd and Live Migration has already been tested and is working properly.
clip_image004

Step 2.

 
Prepare a new LUN to the cluster to be used as a pass-through disk.  In the Disk Management interface verify the LUN status shows Offline.
clip_image006
Since this is a LUN that the cluster has never seen before, bring the disk Online.
clip_image008
After the disk is OnlineInitialize Disk (this writes a signature so the operating system can identify it).
clip_image010

NOTE:
  The cluster uses the disk signature as one attribute for uniquely identifying storage that it controls.  You can verify that cluster has control of the disk when 
disk status shows as Reserved.
clip_image012
Step 3.
 
After the disk has been initialized, take the disk Offline.  There is no need to partition the drive as that will be done by the OS running in the virtual machine.
clip_image014

Step 4.

 
In order for the disk to be used by a highly available virtual machine, it must be under control of the cluster.  In the Failover Cluster Management snap-in, Add a disk to the cluster.
clip_image016
Select the disk that is Offline.
clip_image018

Step 5.

 
After the disk is added to the cluster, verify that the new storage appears in the Available Storage group and shows Online.
clip_image020
 
NOTE: Pass-through disks cannot be added to a CSV namespace because the drive must be Offline in preparation for being configured in a VM.  If the disk is Offline, the partition information cannot be read and CSV has a requirement for an NTFS partition. 
If you were to try and configure the virtual machine to use a disk that is not under the control of the cluster, you would see this pop-up when the virtual machine configuration is refreshed by the cluster.
clip_image028
Viewing the Details, the error is –
clip_image030
The reason is also explained –
clip_image032

Step 6.

 
Verify the disk shows added as a cluster resource and Online in the Available Storage group.

 
Step 7.

 
Right-click
on the virtual machine resource and selecting Settings (or select Settings in the lower right-hand Actions Pane).
clip_image034
NOTE: You cannot hot-add a hard disk to a VM using an IDE Controller if the virtual machine is running. You must first Shut Down the virtual machine. 

Step 8.

 
Click the SCSI Controller and then select Hard Drive and Add.
clip_image036
Select the disk from the drop down list.
clip_image038

Step 9.

 
Verify the refresh of the virtual machine completes successfully and the new disk will is added to the group containing the Virtual Machine.
clip_image040
 clip_image042

Step 10.

Test Live Migration of the group to ensure all resources will come Online on other nodes in the cluster.
clip_image044
After Live Migration completes, verify you have the desired configuration.
clip_image046

Step 11.

 
Prepare the new storage in the VM.

clip_image048


Community Resources

 
Leave a Comment
  • Please add 2 and 8 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Richard Mueller edited Revision 34. Comment: Removed (en-US) from title

  • tonysoper_MSFT edited Revision 31. Comment: +kb

  • Ed Price - MSFT edited Revision 29. Comment: TOC

  • Ed Price - MSFT edited Revision 22. Comment: Cleaning up the formatting. Making the Step subtitles consistent and bold, with white space above and below, indenting images, etc.

  • Ed Price - MSFT edited Revision 20. Comment: Formatting

Page 1 of 1 (5 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Ed Price - MSFT edited Revision 20. Comment: Formatting

  • Ed Price - MSFT edited Revision 22. Comment: Cleaning up the formatting. Making the Step subtitles consistent and bold, with white space above and below, indenting images, etc.

  • Ed Price - MSFT edited Revision 29. Comment: TOC

  • tonysoper_MSFT edited Revision 31. Comment: +kb

  • Richard Mueller edited Revision 34. Comment: Removed (en-US) from title

Page 1 of 1 (5 items)