vmtoolkit.com
The source for virtual machine tools and expertise
Welcome to vmToolkit Sign in | Join | Help
in Search

Announcements

VHD Expander Available

Here is another tool for the toolkit. This is for those of you who use Microsoft's virtualization tools. We believe you can achieve better performance using a fixed disk size rather than a dynamic disk size in Virtual Server and Virtual PC. The trouble comes when you need your fixed disk to be bigger. This is one solution.

VhdExpand will expand Microsoft's VHD format files and will also convert between Fixed and Dynamic file types. This is a sector by sector copy operation from one size/type to the other and the source file remains unaltered. VhdExpand requires the Microsoft .Net 2.0 framework available via Windows Update.

To use the tool:

  1. Run the .exe
  2. Browse to the image file you want to expand
  3. Select a name and destination for your new image
  4. Set the size you want to expand to and the type (Fixed or Dynamic)
  5. Hit expand, all this process does is expand the size of the virtual drive but not any partions within
  6. Once expanded if you previously had a partition you will need to use "diskpart" for NTFS systems or "fdisk" in linux to expand the partition to recognize the new size.

Note: When expanding to a fixed disk type the tool must allocate the disk space prior to expanding. There is no visual indicator during this process, the "expand" button will be unavailable and the progress bar will start once the tool begins to expand the image.

Published Wednesday, January 17, 2007 10:50 PM by paulm
Filed under:

Comments

 

Dugie's Pensieve said:

The lads over at vmToolkit (that delivered the fabulous Vmdk2Vhd) have come though with another...

January 18, 2007 5:17 AM
 

mcshinsky said:

How about a VHD drive shrinker.  During many migrations into the virtual environment we find that a server was given 72GB of space but only uses maybe 15GB of this.  Creating a 72GB fixed disk is just a waste of Host and Backup server resources.  We shrink the server down by mounting the source dynamic 72GB disk and a smaller 20GB fixed disk and then ghost them together.  It would be much easier with a nice tool like the VHD Expander you have created but in the opposite direction or maybe one tool to go either direction.

January 18, 2007 6:23 AM
 

colintodd said:

Very nice! Just yesterday someone asked me if we had a tool to increase the size of VHD files!

Keep up the good work!

January 18, 2007 1:47 PM
 

Lorenzo Barbieri @ UGIblogs! said:

January 18, 2007 4:47 PM
 

CoqBlog said:

Après l'outil VMDK2VHD permettant de convertir les disques virtuels VMDK (VMWare) vers le format VHD

January 27, 2007 4:00 AM
 

Bryan Corazza BizTalk said:

I've been stuck a few times over the last few years when using a VPC and running out of HD space. ...

January 28, 2007 9:48 AM
 

hansleuschner said:

This sounds like a great tool, and one that I really need.

I think I may be missing something though.  I have a vhd that I expanded from 16 Gb to 30 Gb.  the program worked fine, except that the Windows 2003 server contained inside still thinks the hard drive is 16 GB big!!

Did I miss another step or am I mis-understanding something.

p.s. I tried both dynamic to fixed or dynamic to dynamic and both give the same type of result.

January 30, 2007 5:15 PM
 

garinh77 said:

I have the same problem. does anyone know how to grow the system partion once expanded

January 31, 2007 8:39 AM
 

paulm said:

Sorry everyone, I left out some steps. I've updated the post (above) to help folks with getting the partition to recognize the new space.

January 31, 2007 6:10 PM
 

rickyam said:

Great tool. A real lifesaver! Thanks to the people at vmToolkit

February 22, 2007 4:24 AM
 

erndogg said:

I ran this tool successfully,  but I cannot extend the partition or volume on the server using diskpart.  I receive a message that "the volume that you selected cannot be extended"  There are only two volumes,  the data volume and the CD drive.  I am selecting the correct drive.  

March 21, 2007 8:43 AM
 

mdrewanz said:

Hi,

The tool ran flawlessly, but when I try to extend the partition, DiskPart signals that the volume is not valid for extending.

Further research pointed to KB article 886986 which states that DiskPart will not extent boot / system partition in Windows 2003 and in Windows XP. It also describes that DiskPart from Windows 2000 would extend the partition, but wouldn't do the same for the file system, which may result in your computer stop responding. DiskPart should be used only on data partitions. For full details see KB article at http://support.microsoft.com/kb/886986

Anyone has a clue on how to address this?

March 24, 2007 11:37 AM
 

RobG said:

Workaround for KB886986 is to mount the newly extended vhd using the old vhd as the boot disk (i.e. temporarily mount the new disk as a second drive). Diskpart will see this additional drive as a data disk and allow you to extend it. You can then shut down the vm and edit the settings to make the expanded disk the boot drive, and discard the old one.

March 28, 2007 11:17 AM
 

gjhelder said:

Thanks RobG for the tip.

Just a small tip for everyone who faces the same problem, it took me about a hour to solve it. I tried to resize a harddisk from my Windows 2003 server VHD. Everything went fine until the resize of the second VHD, I got an error that the volume is not valid for extending  error from diskPart.

Solution: Assign a drive letter to the second VHD en your problem is solved.

May 27, 2007 6:55 AM
 

My view of life said:

Se dă o mașină virtuală importantă care e rămas fără spațiu pe c:\. Se caută o soluție rapidă și elegantă

June 14, 2007 4:33 AM
 

mrweelr said:

This tool worked beautifully...thank you! Perhaps MS will include a resizer in the next iteration of VS?

August 30, 2007 2:33 PM
 

Gadi's Blog said:

אז התקדמתם, יש לכם כבר עשרות מכונות וירטואליות, שרצות על Virtual Server כמובן (אני לא יורק לבאר :) )

December 5, 2007 9:55 AM
 

Lets share Thoughts, knowledge and Experiences said:

As in my previous blog I mentioned to fix the size of virtual hard disk for Microsoft Virtual Server

September 12, 2008 5:59 AM
 

Christopher Green said:

Expand a Virtual PC hard drive

September 17, 2008 1:16 AM
 

samarsalica said:

Hi, Thanks for most of all making it freely available. thank you very much.

January 1, 2009 11:49 AM
 

Stay hungry ... stay foolish ... stay funny :) said:

Cu singuranta aceasta informatie va este cunoscuta deja, deoarece orice dezvoltator a facut la viata

January 9, 2009 1:21 AM
 

mustaque said:

its fantastic! i solve my problem with this tool.

June 14, 2009 2:58 AM
Anonymous comments are disabled
Powered by Community Server, by Telligent Systems sponsored by xcarab, inc