Expand virtual hard disk size with Hyper-V

November 9, 2009

It is easy to re-size a VHD with Hyper-V:

  • First, make sure you have the VM powered off and you do not have any snapshots associated with the machine.  Changing the VHD size will invalidate any snapshots.
  • Open the Hyper-V Manager, on the left pane, click on Edit Disk…
  • Click Next to continue pas the Before You Begin page
  • Browse to the VHD you would like to expand
  • Choose what you would like to do the VHD:
    • Compact – Shrink the VHD by removing blank space
    • Convert – Convert a dynamic VHD to a fixed VHD
    • Expand – Adds capacity to the virtual disk (what we are doing here)
  • Type in your desired size and click Next
  • Click Finish to apply your changes
  • Now power on your virtual machine
  • You can verify that the space has been added to your disk by checking Disk Management.  You should see unallocated space at the end of your disk
  • You can now extend the drive using your favorite method (2003 – diskpart, 2008 – disk management)

Hyper-V Virus Scan Exclusions

January 28, 2009

I have found that Hyper-V is easily broken by any on access virus scanning software.  To make life easier, if you are running Hyper-V, or plan to.  Put these exclusions in your vurs scanner:

  • Default VM configuration directory: C:\Program Files\Microsoft\Windows\Hyper-V
  • Custom VM configuration directory
  • Default virtual hard disk directory: C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks
  • Custom virtual hard disk directories
  • Snapshot directories
  • C:\Windows\System32\Vmms.exe
  • C:\Windows\System32\Vmwp.exe

Follow

Get every new post delivered to your Inbox.