Booting HYPER-V Guest from an an iSCSI LUN (Pass through disk)

This is a another cool feature in virtualization I wanted to try out and see some significant advantages in production environment. In this scenario instead of assigning a virtual hard disk file a to a guest operating system we’re allowing it to access the raw disk in a SAN directly or it can be a raw disk internally in the system. (Sometimes this is referred as LUN passthrough) To do this first in the iSCSI storage you need to create a LUN and assign some disk space. Then in the HYPER-V host computer under the disk management you will be able to see the disk. But the important thing is not to let host PC to initialize the disk and keeping it offline. If the host machine take over the control of the disk then we won’t be able to allow guest PC to directly take control and write into that disk thus guest PC will be fail to start. Once LUN setup properly it’ll be looks like the way it shows in the picture,

Passthrough disk

After that you can go to HYPER-V management console and start creating a new disk. When it comes to assigning a VHD skip the process and create the Virtual machine configuration file. After that got to the settings on configuration file go to disk controller and select add disk. Instead of creating or adding existing VHD files select the Physical hard disk and select the correct disk number. In my demonstration scenario it will be Disk 2. Below picture demonstrate how we can mount the pass though disk.

image

So after that you’ll be able to start the VPC and carry on the preferred Operating System installation. One main advantage is disk will give you improved disk I/O performance since VPC directly accessing the raw disk in the SAN environment. If you’re planning to host disk I/O intensive application in virtualized environment (Eg: SQL database, Exchange, SAP…etc) this would be a good option to consider.

Well another advantage that strikes to my mind is this will prevent the waste of usable disk capacity. Take a scenario like this, when you create a 100 GB disk portion in a raw disk and format it with NTFS you will get around 95GB or less due to the file system. Inside that when you try to create a fix hard disk it will also consume some disk space. But allowing the guest OS to take the direct control over the raw disk that disk space wastage will be minimize. So why I’m concern about this to put over here is I actually experience this barrier in hard way and lean the lesson Smile

Some disadvantages are you won’t be able to take snapshotting, won’t be able to create dynamic expanding disks of the guest operating system. The main reason being is host VSS won’t be able to capture the raw disk. You’ll have to consider using DPM or third party backup solution  backup and recover the VPC. Of course that would be a another topic to discuss which will come very soon Smile

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s