11/22/2009

Booting HYPER-V Guest from an an iSCSI LUN

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 :)

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 :)

How to extend trial period of Windows 2008, Windows Vista and Windows 7 products

WindowsServer2008 windows-7-logo  windows-vista-logo-1

Most of the time I use Windows 2008 products for video recordings and customer site demonstrations. During this period I use TechNet subscription materials for this purpose. Once issue I have been facing is when I want to do another demo after few weeks time the VPC cannot be used do the trial period of the product has been expired! Registering the demonstration purpose operating systems frequently is not an easy option either (Even though I create a set of VPC like that once)

With Windows 2008 you’re getting trial period of 30 days. But if you’re smart enough now there is  way to extend that period for 180 or more. This is really valuable because that means we can keep the vpc’s running properly under trail period for nearly 6 months! (For me that is more than enough!) Good news is this trial extend work around is working for Vista and Windows 7 as well. ok so let’s get start how to extend the trial period.

What we have to do is run a script in the windows\system32 folder called slmgr.vbs

  1. Bring up a Command Prompt.
  2. Type slmgr.vbs –rearm, and press ENTER.
  3. Restart the computer.

You computer has now extended the evaluation period 60 days!  You can run the same command in the same system for 3 times up giving you an activation-free trial period of a total of 240 days!

To find out how many days remain in the trial period you can use the following command.

  1. Type slmgr.vbs -dli, and the current status of the evaluation period is displayed.

Be curious and check out additional commands available in the slmgr.vbs