Saturday, July 18, 2015

Windows Server 2012 R2 - Hyper-V - a look at VHD features (Part 3) - Pass-Through Disks

In my two previous posts, I examined some aspects of Hyper-V virtual disks which are essentially a file with a .vhd or .vhdx extension and can be moved from server to server (manually or using methods such as Live Migration). Operating systems installed on virtual disks constitute virtual machines (along with other "ingredients") and, being able to move from host to host,  enjoy a great deal of flexibility.

Another scenario is possible and in which a virtual machine accesses a "raw" or physical hard disk directly. There are only two reasons I am dedicating a blog post to this option. First, I have seen it addressed in test prep documentation for Microsoft certification exams. It may be useful to know something about it. Second, it is the subject of a discussion among Hyper-V users: should we use pass-through disks? Aidan Finn, Hyper-V MVP and noted author on the subject, is a critic of the pass-through disk option:

Aidan Finn blog - comments on passthrough disks

Two remarks:
  • I have seen the term written both with and without a dash.
  • Aidan refers the reader to other experts who recommend against the use of pass-through disks. There is also a discussion on the subject in the comment section.
At this point, I suppose I could end this blog post with a simple recommendation on pass-through disk use:

Just don't do it!

But just what is a pass-through disk (you may not know, after all) and how would we configure one if we had to (for a certification exam of course...).


A pass-through disk is a physical hard drive to which the virtual machine has exclusive access.

It is an entire physical hard disk (not virtual) and not just part of a physical disk (partition or volume).

Why would we even think about using a pass-through disk?

The pass-through disk is supposed to provide better performance, unhindered by the overheard of virtualization.

However, critics of the pass-through disk would argue that performance is not significantly better than that of a virtual fixed disk.

Why would we opt against using pass-through disks?

We loose the flexibility of migration from host to host (not impossible but not optimal either) and cannot use checkpoints (snapshots in VMware language).

The use of pass-through disks assumes an already existing virtual machine (guest). It is inside this virtual machine that we will add the pass-through disk.

The primary pre-requisite is the existence of a physical disk that is offline

Note: this is the view of the physical disks available on the host server (above). Disk 0 is online and besides the operating system hosts a virtual machine on the F: drive. We will start this virtual machine and add Disk 1 as a pass-through disk.

In my case, the disk in question is a SCSI (in fact SAS) disk so, when we open the properties of our virtual machine (Svr5), we must select the SCSI controller and then, in the right pane, click on the "Add" button:

Now, in Disk Management (but in the virtual machine, not the host), we must put the disk in the "online" state:

At this point, we create a volume as we would with a physical disk (which is, in fact, what we have, but managed from inside the virtual machine). A "Simple Volume" will suffice for this demonstration:

We configure the disk as we normally would (following screenshots):

This is the result in Disk Management:

And this is what we see in My Computer (or File Explorer):

So, from the guest operating system, the pass-through disk appears just like any other disk.

No comments:

Post a Comment