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:
- http://blogs.technet.com/askcore/archive/2009/02/20/adding-a-pass-through-disk-to-a-highly-available-virtual-machine.aspx
- http://blogs.technet.com/askcore/archive/2009/12/07/using-pass-through-disks-in-conjunction-with-clustered-shared-volumes-csv-in-windows-server-2008-r2-failover-clusters.aspx
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).
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image002_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image004_thumb.jpg
Step 3.
In the Failover Cluster Management snap-in, right-click on the Virtual Machine resource and choose Shut Down.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image008_thumb.jpg
NOTE: You must leave the Virtual Machine Configuration resource Online or you will not be able to access the machine settings in the Hyper-V Management snap-in.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image010_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image012_thumb.jpg
Next, add a Hard Drive to the SCSI Controller.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image014_thumb.jpg
Next, select the Pass-through disk under Physical hard disk.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image016_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image022_thumb.jpg
NOTE: The virtual machine is Saved as part of the refresh process.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image024_thumb.jpg
Once the refresh is completed, review the report that is generated to verify it was successful.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image026_thumb.jpg
Step 8 (Optional).
Examine the details of the report to see what changes were made.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image028_thumb.jpg
Step 9.
Verify the new disk has been added to the group and it is Online.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image030_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image032_thumb.jpg
Step 11.
After the partitioning and formatting of the volume is complete, refresh the display in the Failover Cluster Management snap-in.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image034_thumb.jpg
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).
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/AddingaPassthroughDisktoaHighlyAvailable_CE56/clip_image036_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image002_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image004_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image006_thumb.jpg
Since this is a LUN that the cluster has never seen before, bring the disk Online.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image008_thumb.jpg
After the disk is Online, Initialize Disk (this writes a signature so the operating system can identify it).
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image010_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image012_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image014_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image016_thumb.jpg
Select the disk that is Offline.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image018_thumb.jpg
Step 5.
After the disk is added to the cluster, verify that the new storage appears in the Available Storage group and shows Online.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image020_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image028_thumb.jpg
Viewing the Details, the error is –
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image030_thumb.jpg
The reason is also explained –
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image032_thumb.jpg
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).
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image034_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image036_thumb.jpg
Select the disk from the drop down list.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image038_thumb.jpg
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.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image040_thumb.jpg
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image042_thumb.jpg
Step 10.
Test Live Migration of the group to ensure all resources will come Online on other nodes in the cluster.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image044_thumb.jpg
After Live Migration completes, verify you have the desired configuration.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image046_thumb.jpg
Step 11.
Prepare the new storage in the VM.
http://blogs.technet.com/blogfiles/askcore/WindowsLiveWriter/UsingPassThroughDisksinConjunctionwithCl_834B/clip_image048_thumb.jpg
Community Resources
- Configuring Pass-through Disks in Hyper-V
- Microsoft Cluster Team Blog
- Virtualization TechNet Center
- Ask the Core Team Blog