Welcome to MSDN Blogs Sign in | Join | Help

Expanding Virtual Hard Disks with Hyper-V

Hyper-V adds the ability to increase the maximum size of a dynamically expanding or fixed-size virtual hard disk.  To do this you need to open the Edit Virtual Hard Disk Wizard (by selecting Edit Disk... from the Hyper-V manager), select the virtual hard disk you want to expand, select Expand on the Choose Action page and then enter the new size of the virtual hard disk that you want.

Three things to note:

  • You can't do this to a virtual hard disk that is associated with a running or saved stated virtual machine.
  • You shouldn't do this to a virtual hard disk that is associated with a virtual machine that has snapshots (as you will invalidate the snapshots).
  • After expanding the virtual hard disk there will be an empty space at the end of the virtual hard disk.  You will either need to create a new partition to use the new space, or expand an existing partition into the new space.

Cheers,
Ben

Published Wednesday, March 12, 2008 6:21 PM by Virtual PC Guy
Filed under:

Comments

Wednesday, March 12, 2008 11:15 PM by Aaron Tiensivu's Blog

# The age old problem of expanding VHDs - solved with Hyper-V

I wasn't aware of this but you can expand VHDs easily with Hyper-V. Of course, they can't be in use at the time, but afterwards a simple "diskpart" command with the VHD in question not mounted as the boot drive (i.e. You can't expand Drive C: if you boot

Thursday, March 13, 2008 10:22 AM by Richard Gadsden

# Question

Sorry to go OT from the post, but I can't find an answer to this anywhere.

Can Virtual PC run on Windows Server 2008?  I know I could use Hyper-V, but I want to run a 32-bit OS on my desktop, and Hyper-V is 64-bit only at the moment.

Thursday, March 13, 2008 1:23 PM by ITzik

# re: Expanding Virtual Hard Disks with Hyper-V

Can you reduce the VHD size the same way ?

without using the Precompact and Compact tools ?

Thursday, March 13, 2008 9:13 PM by Norman Diamond

# re: Expanding Virtual Hard Disks with Hyper-V

"You can't do this to a virtual hard disk that is associated with a running or saved stated virtual machine."

Hmm, now I need to find time for an experiment.  On a real machine, hibernate Windows XP, dd the entire drive to the front of a larger drive, swap drives, and try to resume Windows XP  ^_^

If you swap other devices while XP is hibernating then usually it handles them with no problem after resuming.  So actually I've wondered why Virtual PC requires guests to be fully shut down before making the same kinds of virtual changes.

Friday, March 21, 2008 6:13 PM by Yadong

# re: Expanding Virtual Hard Disks with Hyper-V

It seems a VM can’t be moved from one host to another, as easy as Virtual Server. I have a small VM environment, one Windows file server, store all VM images; three VM host machine, run ~5 VM on each host, all VMs run directly from file server.

From time to time, I need to switch VM to host B from Host A. In Virtual Server 2005R1 (it is a little bit slow but great and easy to use), all I need to do is unregister VM from Host A, then register it on Host B. No VM and VHD file copy is needed as every file stored on file server.

However, on Hyper-V, I have to re-create VM machine on Host B, move all VHD files to this VM machine and run it. It takes time and easy to make mistake. Is there any way “register” VM to Host B without doing lengthy import/export?

I don't use SCVMM, it is overkill for my simple environment.

Monday, March 24, 2008 4:53 AM by Carlo

# re: Expanding Virtual Hard Disks with Hyper-V

I made a mistake of doing the 2nd item on your three things to note:

"You shouldn't do this to a virtual hard disk that is associated with a virtual machine that has snapshots (as you will invalidate the snapshots)."

Is there a way to salvage the VHD and the snapshots and all the VM data? Can I revert the VHD size back to the original size?

Tuesday, March 25, 2008 8:11 AM by Bob's Nieuws

# Nieuws t/m week 11

Bron: Microsoft.com In de laatste patch ronde was er een update bij die bij veel systemen voor problemen

New Comments to this post are disabled
 
Page view tracker