Windows Vista Tips

Windows Vista Tips > Newsgroups > Virtual PC > auto-expand VHD expanded further than I wanted

Reply
Thread Tools Display Modes

auto-expand VHD expanded further than I wanted

 
 
d d
Guest
Posts: n/a

 
      01-06-2010
I recently resized a VHD that was set to auto-expand but was set to be
16GB. So the actual VHD file started out a couple of gig, and as more
and more stuff was installed/downloaded into the VM, the 16GB drive
inside got more and more full, until eventually it was. As this was
happening, the actual VHD file size reflected how much was being used of
the virtual hard drive inside. So when 10GB of 16GB was used, the VHD
was 10GB. Eventually it got full and I came here and asked how to resize
it and did that successfully. I changed the maximum size to 28GB. I then
went into Partition magic (inside the VM) and changed the size of the
drive to be 28GB. I think that was a mistake. I should have increased it
only by a gigabyte at a time as and when I needed it.

Now I have 17GB worth of files inside that 28GB drive inside the VM, but
my VHD file size has increased to 28GB. I've tried degragging the drive
in the VM, I've tried powerdefragging it (the one that uses contig from
sysinternals). I've even used partition magic to reduce the hard drive
size inside the VM to only 20GB, but still the VHD size is 28GB. Is
there any way I can make Virtual PC notice that it doesn't need to be
that big ?

It's only a minor annoyance that it's that big because at the end of
each day I make two backups of the vhd file, one to the same drive and
one to a 32GB USB stick. The bigger the file is, the longer it takes.
 
Reply With Quote
 
 
 
 
Robert Comer
Guest
Posts: n/a

 
      01-06-2010
You need to compact the disk.

Here's a pretty good step by step:

http://technolochief.wordpress.com/2...rtual-pc-2007/

--
Bob Comer



On Wed, 06 Jan 2010 11:27:23 +0100, d d <go_on_try_and_sp@m_me.com>
wrote:

>I recently resized a VHD that was set to auto-expand but was set to be
>16GB. So the actual VHD file started out a couple of gig, and as more
>and more stuff was installed/downloaded into the VM, the 16GB drive
>inside got more and more full, until eventually it was. As this was
>happening, the actual VHD file size reflected how much was being used of
>the virtual hard drive inside. So when 10GB of 16GB was used, the VHD
>was 10GB. Eventually it got full and I came here and asked how to resize
>it and did that successfully. I changed the maximum size to 28GB. I then
>went into Partition magic (inside the VM) and changed the size of the
>drive to be 28GB. I think that was a mistake. I should have increased it
>only by a gigabyte at a time as and when I needed it.
>
>Now I have 17GB worth of files inside that 28GB drive inside the VM, but
>my VHD file size has increased to 28GB. I've tried degragging the drive
>in the VM, I've tried powerdefragging it (the one that uses contig from
>sysinternals). I've even used partition magic to reduce the hard drive
>size inside the VM to only 20GB, but still the VHD size is 28GB. Is
>there any way I can make Virtual PC notice that it doesn't need to be
>that big ?
>
>It's only a minor annoyance that it's that big because at the end of
>each day I make two backups of the vhd file, one to the same drive and
>one to a 32GB USB stick. The bigger the file is, the longer it takes.

 
Reply With Quote
 
d d
Guest
Posts: n/a

 
      01-06-2010
Robert Comer wrote:
> You need to compact the disk.
>
> Here's a pretty good step by step:
>
> http://technolochief.wordpress.com/2...rtual-pc-2007/
>


Thanks, I'll report back on the results of that
 
Reply With Quote
 
d d
Guest
Posts: n/a

 
      01-06-2010
d d wrote:
> Robert Comer wrote:
>> You need to compact the disk.
>>
>> Here's a pretty good step by step:
>>
>> http://technolochief.wordpress.com/2...rtual-pc-2007/
>>
>>

>
> Thanks, I'll report back on the results of that


First attempt wasn't so successful. It reduced from 29GB to 26GB. Being
slightly confused as to why this was, I had the idea of going into the
VM and using partition magic to create a logical drive in the 8GB of
unallocated space I had (from when I reduced the disk size internally
from 28GB to 20GB). I formatted it, and then tried compacting again.
This time the vhd size reduced from 26GB down to 17GB :-)

The benefit I'm getting is that my backups of the VHD file take half as
long, and as they take up nearly half as much, I can keep more of them.

:-D
 
Reply With Quote
 
Steve Jain [MVP]
Guest
Posts: n/a

 
      01-06-2010
On Wed, 06 Jan 2010 16:42:44 +0100, d d <go_on_try_and_sp@m_me.com>
wrote:

>d d wrote:
>> Robert Comer wrote:
>>> You need to compact the disk.
>>>
>>> Here's a pretty good step by step:
>>>
>>> http://technolochief.wordpress.com/2...rtual-pc-2007/
>>>
>>>

>>
>> Thanks, I'll report back on the results of that

>
>First attempt wasn't so successful. It reduced from 29GB to 26GB. Being
>slightly confused as to why this was, I had the idea of going into the
>VM and using partition magic to create a logical drive in the 8GB of
>unallocated space I had (from when I reduced the disk size internally
>from 28GB to 20GB). I formatted it, and then tried compacting again.
>This time the vhd size reduced from 26GB down to 17GB :-)
>
>The benefit I'm getting is that my backups of the VHD file take half as
>long, and as they take up nearly half as much, I can keep more of them.
>
>:-D


it depends on your defragging, if you've got one file stuck out at the
26GB mark, the disk won't be compacted below that.

What I've done in the past is use Norton Ghost and do a disk to disk
image of the VHD. This does the defrag and compact in one step.
Not sure of other if other imaging tools have the same results...I
should give CloneZilla a try and see if that works.

--
Cheers,
Steve Jain, Virtual Machine MVP
http://vpc.essjae.com/
http://smudj.wordpress.com/
 
Reply With Quote
 
d d
Guest
Posts: n/a

 
      01-07-2010
Steve Jain [MVP] wrote:
> On Wed, 06 Jan 2010 16:42:44 +0100, d d <go_on_try_and_sp@m_me.com>
> wrote:
>
>> d d wrote:
>>> Robert Comer wrote:
>>>> You need to compact the disk.
>>>>
>>>> Here's a pretty good step by step:
>>>>
>>>> http://technolochief.wordpress.com/2...rtual-pc-2007/
>>>>
>>>>
>>> Thanks, I'll report back on the results of that

>> First attempt wasn't so successful. It reduced from 29GB to 26GB. Being
>> slightly confused as to why this was, I had the idea of going into the
>> VM and using partition magic to create a logical drive in the 8GB of
>> unallocated space I had (from when I reduced the disk size internally
>>from 28GB to 20GB). I formatted it, and then tried compacting again.
>> This time the vhd size reduced from 26GB down to 17GB :-)
>>
>> The benefit I'm getting is that my backups of the VHD file take half as
>> long, and as they take up nearly half as much, I can keep more of them.
>>
>> :-D

>
> it depends on your defragging, if you've got one file stuck out at the
> 26GB mark, the disk won't be compacted below that.
>
> What I've done in the past is use Norton Ghost and do a disk to disk
> image of the VHD. This does the defrag and compact in one step.
> Not sure of other if other imaging tools have the same results...I
> should give CloneZilla a try and see if that works.
>


I did have some files stuck out near the end of the drive (while it was
still 28GB). I tried defragging but it wouldn't move them, because they
weren't fragmented. I defragged about 7 times in a row. It all ended up
blue, just scattered about the drive. That's why I decided to reduce the
size from 28GB to 20GB (as I was only using 17GB of it anyway). I knew
this would bring all the data down together. This meant I had 8GB of
unallocated space on my 28GB drive. When I compacted using the virtual
drive tool, it was still not bringing the VHD size down. It remained at
a high 26GB. Using up that unallocated space (temporarily) to create an
8GB drive (which I formatted) did the trick. The next compact attempt
brought the VHD down to 17GB :-)

I'll now only increase the 20GB drive by a Gig at a time as I need it.

It's made a nice difference to my end-of-day backup (of the VHD files)
times, and I can now keep 4-5 days worth of backups instead of 3.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Shut down with Vista RC1 aqm_0 Windows Vista General Discussion 4 12-16-2009 02:06 PM
Re: Auto ActiveSync Paul G. Tobey [eMVP] ActiveSync 0 03-11-2008 03:24 PM
Auto log on Terry Windows Vista Administration 6 02-15-2008 02:13 PM
Auto Play and Auto Run rocknroot Windows Vista Games 4 01-30-2008 03:17 PM
How to specify period/time between two auto restore point created Onlyjamesbond007 Windows Vista Performance 0 07-10-2007 12:00 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59