Wednesday, April 11, 2012

Expanding Virtual Hard Disks with Hyper-V

One of the most frequent questions How do I expand the virtual hard disk to make room for additional data? Luckily for us, with Microsoft Hyper-V on Windows Server 2008, this is now possible. Hyper-V now adds the ability to increase the maximum size of a virtual hard disk.  Expanding the disk increases the storage capacity of a dynamically expanding virtual hard disk or a fixed virtual hard disk.
Problem: Virtual machine degradation in a virtualized environment can occur in a few different ways, such as a sharp decline in application or server response times. The challenge is determining when the problems started and the cause.

Solution: VM monitoring software will enable you to look at the changes that were made over time and so you can pinpoint & diagnose past performance issues in your virtualized infrastructure.
Before using the ability to expand the VHD hard disk you must take the following issues into consideration:
  • You must first completely shut down the virtual machine. You cannot expand a virtual hard disk that is associated with a running or saved stated virtual machine.
  • If you expand a virtual hard disk that is associated with a virtual machine that has snapshots, these snapshots will be invalidated. If you need the snapshots, you'd better make sure you plan ahead of time, and/or create new snapshots after performing the expansion of the hard disk.
                       Make sure no snapshots are associated with this VM.

  • After expanding the virtual hard disk there will be an empty space at the end of the virtual hard disk, just like not using the entire disk when you've originally created partitions in it.  You will either need to create a new partition to use the new space, or expand an existing partition into the new space.

Follow these steps to expand VHD hard disks:
  1. Open the Hyper-V management tool from the Administrative Tools folder (or by typing virtmgmt.msc in the Run command).
  2. Start the Edit Virtual Hard Disk wizard by selecting Edit Disk... 
  1. If the before you begin window appears, click Next.
  1. Select the virtual hard disk you want to expand. Click Open and then Next.
  1. Select Expand on the Choose Action page and then press Next.
  1. Enter the new size of the virtual hard disk that you want and then press Next.
  1. In the final screen, press Finish.
  1. Wait till the operation finishes, which should be quite fast.
Next, after booting the VM, use Disk Management snap-in from the Computer Management tool.

No comments:

Post a Comment