D'Arcy from Winnipeg
Solution Architecture, Business & Entrepreneurship, Microsoft, and Adoption

All I Want Is To Resize My VHD...

Monday, April 28, 2008 10:56 PM

So I tried to build a VPC to mess around with Biz Talk with, but I made one crucial error:

(Windows Server 2003 + Extra Windows Components + Visual Studio 2005 + SQL Server 2005 + Biz Talk 2006 R2 + .NET Framework 2.0 + .NET Framework 3.0) = just under 10 GB

Unfortunately, I WAY underestimated the amount of space and set my VHD size to...you guessed it...10 GB.

No worries, I'm sure there's a way to magically resize my...oh...there isn't? I CAN'T resize it? Hmm...

But then I found VHD Resizer. This is a tool that will supposedly resize VHD's. Wonderful, sounds like what I need!

Unfortunately I'm not sure if the tool actually worked. See, I can't just use this new VHD as my *new* hard drive off the bat. Even though the physical drive may be larger, the partition isn't. So it still reads as a 10 GB drive.

I found some blog posts that walk you through how to get around this, but it involves assigning your larger disk to the secondary drive slot of your VPC. No problem right? Well, problem: for whatever reason, and I triple checked my settings, my second hard drive never shows up!

At this point, I'm thinking that I'm just going to have to start over (it wasn't that much time, but it is annoying as hell), unless someone out there can shed some light on this?



# re: All I Want Is To Resize My VHD...


Ran into the same issue. Take a look at this.

http://stevepietrek.com/2007/08/07/expand-vhd-file/ 4/29/2008 7:06 AM | Steve Pietrek

# re: All I Want Is To Resize My VHD...

Uninstall Biz and SQL Server, create a second VHD and install them there. Problem solved.

4/29/2008 9:07 AM | William

# re: All I Want Is To Resize My VHD...

I can't help you with the resizing. But if you do start over I'd recommend you just use dynamically expanding VHD's...much more convenient. 4/29/2008 10:39 AM | Dylan Smith

# re: All I Want Is To Resize My VHD...

Well, it is a dynamically expanding VHD...but what's happening is that I'm trying to install a necessary service pack for SQL Server, but it checks the available space before hand (which is sitting at 1GB) and won't go through with it because of a lack of space...it doesn't *know* that the disk will expand when required to.

D 4/29/2008 10:41 AM | D'Arcy from Winnipeg

# re: All I Want Is To Resize My VHD...

Your problem is precisely what you found out: it doesn't expand the partition size to fill the VHD. Try looking at Gparted to expand the partition.

Geoff 7/1/2009 5:50 PM | Geoffrey J Gowey

# re: All I Want Is To Resize My VHD...

You can use any partition manager program to resize the partition inside the VPC. Several are available for free, but this one worked well for me:
http://download.cnet.com/Easeus-Partition-Master-Home-Edition/3000-2248_4-10863346.html 11/5/2009 2:47 PM | street

# re: All I Want Is To Resize My VHD...

Same problem, got a nice solution for you.


BTW check out contig to defragment the VHD file.
1/21/2010 4:52 AM | javier

# re: All I Want Is To Resize My VHD...


I have a question for really experts.
I boot directly from vhd (windows 7 ultimate) without any other system installed. I divided my hdd 320 gb into two partitions/volumes 100 gb and 197 gb

(remaining place 23 gb may be used by fat). the vhd was set to (i do not remember in detail) - i think - to 97 gb. after some updates for windows the blue

screen of death appeared with "VHD you must have enough capacity on the underlying disk to fully expand the VHD". so i did a look on the facts. booting with

dos showed me the the vhd is about 18 gb large. i changed the two volume sizes with acronis disk director suite to 150 gb and 147 gb. after that the pc

started up normal without blue creen of death. then i opened the windows explorer and look at the free and occupied space of the started vhd and the two

volumes. and here i found something very interesting:

started vhd: free 78,4 gb /total 95,7 gb which compares to 100.000.000 mb which had to be set in diskpart
volume 1: free 47,5 gb / total 148 gb
volume 2: free 142 gb / total 149 gb

now my question: under dos the vhd only occuppy 18 gb which expand after starting from it to the set 95,7 gb,. that is ok. but on volume 1, where the vhd

lies, the started vhd uses 100,5 gb (148-47,5=100,5)!!! and 100,5 gb is larger than my set 100 gb for volume 1. that should be the reason for the blue

screen. but what i not understand is:

why expand the vhd over 100 gb when there is only 18 gb occupied under dos. i expected that the vhd file expands when the 95,7 gb runs full, not that it

expands when nearly 80 gb are free in the vhd. can someone explain this because this is not the purpose of a vhd?

another questions is: where are the 4,8 gb, difference between 100,5 gb (if vhd is startet, occupied on volume 1) and the shown size of 95,7 gb of vhd in

windows explorer? or i misunderstood something or mismatch some figures.

if someone can explain me this facts this may help a lot of other people to set the size of the vhd more sensible.

with kind regards

Rainer 8/30/2011 1:02 PM | rainer

Post a comment