23 November 2011

Attach a physical disk to a Hyper-V virtual server

Generally speaking when referring to a virtual machine it is assumed that everything is virtual, including all the drives.  Virtual drive has a few advantages over normal drives.  They are single files that can easily be moved around, taken snap shots of etc.  The one drawback though is that your virtual drive is a single file.

You do have to option to attach a physical disk or pass through disk to your virtual machine.  This gives the VM direct access to the drive without needing to work through the hypervisor.  This in turn should you a performance advantage. On the down side you can no longer take snapshots of the VM

You cannot use removable storage as pass through disks.  So using a USB drive is not an option.

On the virtual machine host connect to the computer manager and go to the storage Manager

You need to mark the disk as offline

Now when you go to the Hyper V management console and select the setting from a stopped VM you will see the option to add the physical disk.

You can add it either to a  IDE or SCSI controller

Once nice thing is that the partitions remain as they are.  In the example below there were two partitions on the disk.

One nice advantage of this is that this is also an easier way to share data with offline machines, bring the disk on-line on the host, copy files and attach it to the VM again.

No comments:

Post a Comment