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

Announcements

VHD Expander is now VHD Resizer

Based on feedback from folks who have downloaded the Expander and our own changing needs here in the toolkit we have made some changes to the VHDExpander. First off it is now called the VHDResizer and it will do some of the things the new name implies.

The tool will now check the partitions within the VHD and provide you with sizing options (displayed as a slider) which start at the end of your partition and go up to 127 GB. This means you can technically shrink your VHD if you do some preparation work. The preparation needed is to shrink your partition, the tool will not shrink your partition for you, we want to leave that up to you (look for David to post some steps on this). However if you previously expanded your VHD and determined later that the size was too large you can now shrink that size back down if you have not already extended your partition.

Everything else from the expander remains the same. VhdResize will resize Microsoft's VHD 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. The .NET 2.0 framework is still required.

As always let us know what works and what doesn't here.

Published Wednesday, February 28, 2007 1:38 PM by paulm

Comments

 

Dugie's Pensieve said:

The boys from vmToolkit are back! The VHD Expander is now VHD Resizer. More info in their post " VHD

March 1, 2007 12:56 AM
 

theisdept said:

In keeping with your blogs/teams desire to maintain a balanced perspective, will you be making the Convertion tool work both ways and also making a resizer for vmdk's as well?

March 6, 2007 5:27 PM
 

Virtual PC Guy's WebLog said:

Those guys over at vmToolkit have released a new tool. This one allows you to resize and convert existing

March 12, 2007 11:33 PM
 

Jose Aguilar's Blog said:

I just saw over at the Virtual PC Guy’s Blog that a new tool is available that allows you resize existing...

March 13, 2007 11:38 AM
 

Canadian IT Professionals said:

I am sitting in Building 34 on the Redmond campus attending some security sessions during the MVP Summit.

March 14, 2007 2:45 PM
 

bstrange said:

It doesn't work with .net 2.0 SP1 (2.0.6129). I had to revert to just plain .net 2.0. It would be nice if it supported both...

I'm really interested in seeing the future posts on shrinking vhds!

Thanks guys!

March 15, 2007 11:01 AM
 

colaglas said:

After using VHDResizer, I couldn't boot the VHD (made with VPC2007) anymore :(

I'm glad I didn't overwrite the original VHD.

Sorry, but no VHDResizer for me. A newer version I will try ...

March 16, 2007 11:48 AM
 

paulm said:

We released a new update to the resizer.

Version 1.0.34, we made some minor UI changes and fixed an NTFS compressed disk error. The downloads page has more information.

March 22, 2007 2:34 PM
 

David Douglass said:

Learnings from Creating a Developer Virtual PC Image

April 29, 2007 10:32 AM
 

hgriffith said:

Mucho thanks.  Tool works fabulously!

June 6, 2007 4:37 PM
 

Frank74 said:

I am not able to generate booting resized disk (made with VPC2007) using VhdResizer 1.0.34.0 under Vista. :<

June 14, 2007 12:53 PM
 

quypham007 said:

Does this actually resize the file on the fly or does it resize it temporarily in another TEMP location and when finish just replaces the new resized file?  I ask because I am out of space on my drive with the VHD and if it tries to temporarily store the newly resized drive while resizing then it will fail!  My VHD is 80 GB and the physical drive it is on is 100 GB.

July 2, 2007 2:47 AM
 

AutoSponge said:

I used the tool on w2k3x64 and it worked great.  You may want to mention that users will still have to expand the partition of the new VHD.  I used VHDmount and diskpart with great success.

July 24, 2007 7:43 AM
 

iznogoud said:

Thx a lot for your tool ;-p

August 1, 2007 3:24 AM
 

roth4fun said:

I used it in Vista 32-bit to create a new VHD file from an existing one.  It would not overwrite the original or overwrite another VHD, but creating a new file it worked fine.  Then I had to use VHDMount (free and part of Virtual Server) to get it in Vista so I could extend the VHD partition to utilize the rest of the VHD after resize.  I associated this VHD back to my VPC image and I was good to go!

September 12, 2007 1:19 PM
 

J R said:

Worked great!  Thanks!  I also had to use VHDmount and diskpart.  Good stuff.

October 9, 2007 1:10 PM
 

jeff_king said:

Using VHDResize v1.0.42, I've only had success with INCREASING a vhd file, not decreasing.  This makes sense, as you can't very well truncate part of a vhd file unless you know what you're truncating (which I believe is what happens with Virtual Server's compactor tool).

There's a second issue I found with this tool.  When wanting to convert from a dynamic to fixed vhd file, the fixed vhd file would end up several GB larger than the dynamic.  For example SIZE(dynamic.vhd) = 12.8gb, SIZE(fixed.vhd) = 16.7gb.  Why is that?

All in all, I've found it useful for resizing fixed vhd files.  Fixed vhd files yield better performance than their dynamic vhd counterparts.

October 18, 2007 9:22 AM
 

Gadi's Blog said:

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

December 5, 2007 9:54 AM
 

thomforeman said:

What a great tool! So simple and so easy.

December 28, 2007 9:36 AM
 

VMblog.com - Virtualization Information said:

IT World.com shares the following 5 ways to expand a virtual hard drive. 1. Follow Benjamin Guinebertière's blog post concerning how he managed to do this. Gotta love robocopy!

December 31, 2007 9:08 AM
 

wangari said:

i think this is working.great job!

February 7, 2008 7:23 PM
 

TangibleThoughts said:

Ran across this tool today. Just used it and it works - coolies. Thanks vmtookit.com Technorati Tags:...

March 27, 2008 11:55 PM
 

TiFab said:

Still VHD Expander, not Resizer ... Great tool to expand .VHD ... but what if I need to reduce/optimize .VHD size ? Not possible with this soft.

April 4, 2008 5:58 AM
 

ernie123@gmx.de said:

WOW

cool tool

June 2, 2008 12:59 PM
 

sinclabs said:

This is a great tool. Works perfectly! This really got me out of a jam and I am very greatful. I would recommend this to anyone with space issues with their virtual servers (VHD's).

Cheers,

]R[ SincLabs

July 6, 2008 9:18 AM
 

hofwhitney said:

Quote: The tool will now check the partitions within the VHD and provide you with sizing options (displayed as a slider) which start at the end of your partition and go up to 127 GB.

But, 1.0.42.0 provides only a "New Size" option, and no sliders are available to work on the partitions within the VHD!  That would have  been the icing on the cake!

August 22, 2008 12:56 PM
 

nigel_b said:

Fantastic tool. Many thanks!

November 29, 2008 8:47 AM
 

xpvm said:

Once the Resizer is run, the file size remains the same. How do we increase the size once this tools is executed?

Thanks

December 3, 2008 1:38 PM
 

xpvm said:

Hi JR,

Could you uwalk us through how u used the vhdmount and diskpart tools?

Thanks

December 3, 2008 1:40 PM
 

sHEdON said:

"Once the Resizer is run, the file size remains the same"

same here....

My destination VHD was set to 20GB size, but after the Resizer finished, it is still 16GB. What am I doing wrong ?

I realy need it to be bigger now. Please help.

Thanks

January 7, 2009 12:15 AM
 

payne said:

Resizer did not resize.

Windows XP SP3, .NET up to 3.5;

source vhd 16GB and new destination vhd set to 40GB; process seemed to run ok but new vhd size remained at 16GB

January 21, 2009 8:26 AM
 

anantesh said:

Worked a charm for me......!!!!!!

Cheers....... :~)

January 21, 2009 4:32 PM
 

anantesh said:

Hi    sHEdON .......... after you run the resizer, u can find the that the unalocated space has increased.

use Acronis Disk Director Server and create a partition out of that unalocated space and then increase the free space of the drive that you want by taking space from the newly created drive............

hope this might solve your issue.

January 21, 2009 4:37 PM
 

csg said:

My guest OS is Win 2008 Server Enterprise. After the vhdresize, I was able to allocate all the extra space to the boot sector by using the graphical disk manager (start->rt. click Computer->Manage->Storage->Disk Management).

In fact the process of mounting the resized drive as disk2 and extending the boot sector caused my guest OS to fail to load. The testdisk utility referenced above reported the disk as consistent.

January 26, 2009 1:12 PM
 

dhanesh.mathkar said:

Guys, can't I downsize?

February 10, 2009 11:11 AM
 

VHDan said:

I found all the steps on the site but see some are posting that they're vhd isn't resized so I thought I'd reiterate the steps:

Preconditions:

A) Both .vhd files are NOT in a saved state. Shut them down.

B) Download DiskPart from MicroSoft.

Instructions:

1) Create your larger .vhd file from your SOURCE .vhd file.

2) With MS VPC, open Settings using your SOURCE .vhd.

3) In MS VPC > Settings > Setup "Hard Disk 2" > Select your LARGER .vhd

4) Start the vpc (for the SOURCE .vhd)

5) Install DiskPart on the running SOURCE .vhd

6) From RUN / cmd line, run diskpart.exe

7) In DiskPart: type "list" > enter, then "list volume" enter

8) in DiskPart: Type "select volume 1" > enter   - volume 1 (the LARGER vhd is selected)

9) In DiskPart: Type "extend" > "size = (n)" > enter.

http://technet.microsoft.com/en-us/library/cc766465.aspx has all the commands for DiskPart in case I gave incorrect information. I was able to figure this out in a short time and now my old vhd is 127 gigs!

9)

February 18, 2009 2:16 PM
 

VHDan said:

With the vhd shut down, open MS VPC.

File > Virtual Disk Wizard > Next > Edit an existing virtual disk

Browse and select your vhd > Next

Select to Compact it OR Convert to a fixed size

etc...

February 18, 2009 2:21 PM
 

Compuzed said:

I tried this tool to shrink my vhd file.....it does not do this??

February 26, 2009 9:30 AM
 

bagslead said:

this tool is very useful for my work,thank you admin.

March 29, 2009 8:33 AM
 

Charter Communications said:

It doesn't work with .net 2.0 SP1 here either. It would be nice if it supported both

I'm really interested in seeing the future posts

May 5, 2009 10:20 AM
 

Theodup said:

Doesn't shrink anything for me either. I do not even get a slider....? I have the latest version....Is this a scam or is there a slider?

July 9, 2009 7:35 AM
 

ChasPPerth said:

With the knowledge that VM's can expand dramatically during use, I intentionally created new VM's for Windows7 with a small sized Hard Drive. However I quickly ran out of room. Searching the internet I came across your vhr resizer tool and was surprised how easy and effectively this was to increase the size of the hard disk.

Not being aware of the Microsoft offering I used the freeware product EaseUs-PartitionManager to resize the disk internally once the new, larger VM was created.

Excellent product. I have Vista operating system and no problems in using your product in this environment. (I did not find the slider either - but it works and that is what is important).

November 7, 2009 7:38 AM
 

ChasPPerth said:

With the knowledge that VM's can expand dramatically during use, I intentionally created new VM's for Windows7 with a small sized Hard Drive. However I quickly ran out of room. Searching the internet I came across your vhr resizer tool and was surprised how easy and effectively this was to increase the size of the hard disk.

Not being aware of the Microsoft offering I used the freeware product EaseUs-PartitionManager to resize the disk internally once the new, larger VM was created.

Excellent product. I have Vista operating system and no problems in using your product in this environment. (I did not find the slider either - but it works and that is what is important).

November 7, 2009 7:38 AM
 

Airlizard said:

Great tool. Just for info: Should DISKPART not work on Server 2003 because of the second HD being a system one, just disable the device and re-enable it - then it should work fine - at least it did with my Virtual disk

November 8, 2009 8:45 AM
 

Amouth said:

This is an odd question - but  does this application support scsi attached VHD's (i have one i need to expand >127gb) where the limit is 2TB

November 30, 2009 2:47 PM
 

daren253 said:

There is a product available that will resize VHD, even when they have data in them without causing corruption or preventing the VHD from used as a native boot VHD.

This product is called Portlock Leap Frog.

December 3, 2009 8:24 AM
 

Pubudu said:

I need to reduce my vhd from 45 GB to 20 GB. But VHD Resizer doesnt allow to reduce size below 45GB. Is there any other way to do this? :-(

January 28, 2010 4:15 AM
Anonymous comments are disabled
Powered by Community Server, by Telligent Systems sponsored by xcarab, inc