Highly Available Hyper-V Virtual Disks

TONYSO talks about planning VHD strategies when setting up highly available Hyper-V VM’s (using Windows clustering services).

First off, MS only supports Pass Through disks and fixed size VHD’s in production so forget about using differencing disks.

The VM will usually be on a LUN of it’s own.  So you need to allocate a LUN from your cluster’s shared storage for each VM.  (Note: Shared storage will be used in Windows Server 7 Hyper-V thanks to a new cluster file system that allows simultaneous multiple host access).  You’ll want to save space on this LUN so you need to size it correctly.  Here’s how I size a dedicated LUN or volume for storing a VHD:

LUN Size = (VM RAM + VHD Size) * 1.1

This works out as:

  • VM RAM: The amount of RAM assigned to the virtual machine, e.g. 2GB RAM.  This is required to allow the VM to save state, e.g. during host shutdown or for quick migration.
  • VHD Size: The amount of disk assigned to the virtual machine, e.g. 40GB.
  • 1.1: This allows for 10% free space on the volume.  You need to allow free disk space for a healthy volume.

Given these numbers:

LUN Size = (2 + 40) * 1.1

LUN Size = 46.2GB

This figure will be rounded out as 47GB because your SAN management software probably won’t handle decimal points for the GB allocation.

The VM will probably not be able to do snapshots with this calculation.  Note that MS does not support snapshots in production – according to PSS.  They want you to use backup tools with Hyper-V VSS support instead for state saves.  If you do want to do snapshots then you need to allocate more disk.  How much … who knows!  Snapshots are done using differencing disks, e.g. anything done after the snapshot is saved in a differencing disk (hence the lack of production support from PSS?).  This differencing disk will grow as time passes so you need to allocate disk for this.  I’d recommend a central store for saved states.  You can configure this on a per VM basis.  This means the VM LUN doesn’t need to be expanded to allow for snapshots.  Forget shrinking the VM disk if you expand it for snapshots.  I’ve tested that with a HP EVA and it screwed up the file system/VM.

Credit: TONYSO.

EDIT:

You might want to add 5GB of disk space to the above if you want to leave room for an ISO image if using VMM 2008.  Remember that VMM 2008 cannot share ISO’s from the library so you have to copy them … that copies them to the VM’s LUN.  You’ll also need more space if you want to use snapshots.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.