Saturday, February 20, 2010

Direct Booting a VHD in XenServer


I've run across several instances where I needed to direct boot a VHD in XenServer.  One example was migrating from Hyper-V to XenServer.  Another was updating the network stack, XenTools, and PVS Tools on existing vDisks.  Regardless, the following is the three-step process I took...

Step 1: Create an EXT-3 drive
The standard install of XenServer create a local storage repository using LVM format.  You can destroy this and create an EXT partition instead.  Please note, this will also destroy ANY VMs on that partition, so proceed with caution.  In my XenServer farms where I am using shared storage, I like to create at least one host with an EXT drive for flexibility.

Step 2: Import the VHD
Using WinSCP, copy your VHD files to your new EXT Storage Repository.

Step 3: Mount that Drive!
Create a new VM, note the the UUID of the drive, then kill it and rename your copied VHD to that UUID and fire it up!

Sound easy?  It is!  For more details, check out my step-by-step guide over the TheGenerationV.com! (shameless plug, I know)

Just be careful not to place the VHD file in the wrong volume, namely the root partition! (oops)

Special thanks to:
  • Duane Bradley and Geoff Green, MTM Technologies ... they helped me with a nice guide the first time I had to create an EXT-3 drive to import images. 
  • Trevor Mansell for his Citrix blog post on direct VHD boots for PVS 5.1

4 comments:

  1. How, exactly, does one "fire it up"?

    ReplyDelete
  2. If you're going to post a blog, at least put some thought into it. This was a waste of time!

    ReplyDelete
  3. It is much faster to mount a CIFS share to copy the files back and forth. It takes 1/4 the time as using WinSCP. - MK

    ReplyDelete
    Replies
    1. Hi there, I have created a CIFS share, no what? Not sure what to do, please advise?

      Delete