Adding a Pass-through Disk to a Highly Available Virtual Machine
This blog discusses the proper way to make a configuration change to a highly available virtual machine in a Windows Server 2008 (RTM) Failover Cluster. I will demonstrate how to add a Pass-through disk to a highly available virtual machine by attaching it to a SCSI Controller. You can also use an IDE controller, but I chose to use a SCSI controller because it is not available by default and as we walk through the process, you get the added benefit of seeing how to add it (Note: SCSI controllers require the installation of Integration Components in the Guest).
There are several reason why Pass-through disks are an attractive option. The main reason is that you can bypass the Hyper-V server file system and gain faster, direct access to the disk from inside a virtual machine. To accomplish this requires the disk be Offline from the operating systems perspective. There are tradeoffs, however, some of which include having to locate the virtual machine configuration file somewhere else and 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, you can review Jose Barreto's blog on the subject.
I start off with a highly available VM running the Windows Server 2008 operating system. The VM is using a VHD for its boot disk attached to an IDE controller.
Note: Hyper-V virtual machines can only boot from storage attached to IDE controllers.
In the Disk Management snap-in, I can see the disk I am using to support the boot disk for the VM and also the LUN I will be adding as the Pass-through disk attached to a SCSI controller. The disk I will use for the Pass-through disk is Offline (must be Offline or cannot be added to the VM).
Note: A new disk must be brought Online and Initialized before it can be used. This process writes a disk signature to the disk so cluster can use it. Once the disk has been initialized, it can be placed Offline again. No partitioning is required as that will be accomplished inside the virtual machine.
In the virtual machine, only the boot disk is currently visible in the Disk Management interface.
Since I will be modifying the configuration of the virtual machine, I first need to shut it down. In the Failover Cluster Management snap-in, right-click on the Virtual Machine resource and choose Shut Down.
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.
In the Hyper-V Management Snap-in, start the Add Hardware wizard and choose to add a SCSI Controller as that is the type of interface the Pass-through disk will be attached to.
As part of the wizard, choose to add a hard drive to the SCSI Controller.
Since this will be a Pass-through disk, select the correct disk from the drop down list under Physical hard disk.
Complete the configuration and Start the Virtual Machine in the Failover Cluster Management interface.
With the virtual machine started, open the Disk Management snap-in. I can now see the new disk that was added.
However, I still do not see the new disk added to the virtual machine configuration in Failover Cluster Manager.
Since I made a change to a virtual machine that is under the control of the cluster, I need to inform the cluster service that a change has been made. I accomplish this by running the Refresh virtual machine configuration action in the right-hand pane.
The virtual machine is Saved as part of the process.
Once the refresh is completed, review the report that is generated to see if it was successful.
Examine the details of the report to see what changes were made.
Once I complete the review of the report and inspect the Failover Cluster Management snap-in, I see the new disk added to the group and it is Online.
Restart the virtual machine from the Failover Cluster Management snap-in and complete the configuration of the new storage in the virtual machine.
Once the partitioning and formatting of the volume is complete, refresh the display in the Failover Cluster Management snap-in and the information is updated for the new storage.
Back in the Disk Management snap-in, the disk now shows a Reserved status meaning it is under the control of the cluster (just like the boot disk).
All that remains is to test failover to other nodes in the cluster to ensure the new configuration comes Online successfully.
So, what is important to remember here?
- 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 blog, 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. This is a known issue and will not be fixed.
Thanks again for your attention, and I hope this information helps.
Chuck Timon
Senior, Support Escalation Engineer
Microsoft Enterprise Platforms Support
Comments
- Anonymous
January 01, 2003
I followed this process on a dev cluster that has three VMs running. I followed the process above and added a pass-thru disk to one VM. No changes were made to any of the other VMs. As stated above, I initiated a "Refresh virtual machine config...", the affect VM was placed into a Saved state, and the pass-thru disk was added to the Virtual Machine. Unfortuately, the other two VMs on the cluster were also placed into a Saved state as well. This even though no changes were made to them. To verify I restarted all VMs, made no changes and ran another refresh. Same thing, all VMs were Saved. Is this an expected response? Should all VMs be placed into a Saved state whenever a refresh config is run? - Anonymous
January 01, 2003
The comment has been removed - Anonymous
January 01, 2003
Courtesy of the Windows Server Setup / Core Team: http://blogs.technet.com/askcore/archive/2009/02/20/adding-a-pass-through-disk-to-a-highly-available-virtual-machine.asp - Anonymous
January 01, 2003
PingBack from http://bh-server.com/adding-a-pass-through-disk-to-a-highly-available-virtual-machine/ - Anonymous
January 01, 2003
HI
I have an issue with a Host of Windows server 2012 R2 data center with in a Hyper V cluster. After one of the host restart the host's Shared LUN's are disappeared, so the critical application VM's like databased server and Exchange running with pass through disk on the same host is not working. could you help me to restore the LUN's to the Host. - Anonymous
February 10, 2011
I had to add the disk to failover cluster manager before I could be successful with this. This was done by accessing storage and then going through the add disk wizard. This should not be confused with adding the storage as a cluster shared volume. - Anonymous
December 22, 2013
Pingback from SureHosting next step with Microsoft to resolve design issue in Windows 2012 and Windows 2012R2 Cluster » Network Ecosystem Blog - Anonymous
December 22, 2013
Pingback from SureHosting’s next step with Microsoft to resolve design issue in Windows 2012 and 2012 R2 Cluster » Network Ecosystem Blog - Anonymous
December 22, 2013
Pingback from SureHosting’s next step with Microsoft to resolve design issue in Windows 2012 and 2012 R2 Cluster » Network Ecosystem Blog - Anonymous
January 10, 2014
Pingback from SureHosting’s next step with Microsoft to resolve design issue in Windows 2012 and 2012 R2 Cluster » Network Ecosystem Blog - Anonymous
March 06, 2015
How is this done using virtual HBAs on 2012 R2?