Windows Vista Tips

Windows Vista Tips > Newsgroups > Virtual PC > Reducing VM drive

Reply
Thread Tools Display Modes

Reducing VM drive

 
 
JonathanL
Guest
Posts: n/a

 
      10-30-2009
I created an XP VM in VPC 2007 with the parameter of a very large C: drive. I
realize now this is way too big and I want to reduce it to a small size.

How can I reduce the size of the drive for the VM set up n VPC without
having reinstall XP and all the apps all over in a new VM?

Is there a way to take the XP install and transfer it to another VM created
with a smaller virtual C: drive?

BTW, I'm not in any way referring to the size of the VHD file or the size of
the physical drive of the host. I'm only referring to the guest in the VM.
 
Reply With Quote
 
 
 
 
Steve Jain [MVP]
Guest
Posts: n/a

 
      10-30-2009
On Fri, 30 Oct 2009 11:04:01 -0700, JonathanL
<> wrote:

>I created an XP VM in VPC 2007 with the parameter of a very large C: drive. I
>realize now this is way too big and I want to reduce it to a small size.
>
>How can I reduce the size of the drive for the VM set up n VPC without
>having reinstall XP and all the apps all over in a new VM?
>
>Is there a way to take the XP install and transfer it to another VM created
>with a smaller virtual C: drive?
>
>BTW, I'm not in any way referring to the size of the VHD file or the size of
>the physical drive of the host. I'm only referring to the guest in the VM.


The easiest way is to use partitioning software, and reduce the size
of the partition. This won't change the total size of VHD, but it
will limit the amount of space the VM can use on the physical drive.

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

 
      10-30-2009
Mark, I forgot I already had Vhd Resizer. Unfortunately it won't reduce the
size of my VHD which is fixed at 16GB. It will increase it but not decrease
it. So it looks like I need to continue my search. I'm going to try to
install a partition app in the VM and use that to reduce the size of the VM
C: drive. But that won't then shrink the size of the VHD file so I'm not sure
what do after that.

Jonathan

"Mark Rae [MVP]" wrote:

> "JonathanL" <> wrote in message
> news:3CD3444A-2CB0-4F06-948A-...
>
> > How can I reduce the size of the drive

>
> http://tinyurl.com/ygonlsj
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
>
> .
>

 
Reply With Quote
 
JonathanL
Guest
Posts: n/a

 
      10-30-2009
Doesn't seem like it's worth it to use partition software to reduce the size
of the C: drive in the VM if you can't subsequently shrink the VHD file. My
whole desire for reducing the size of the VM C: drive is to save space on the
host without having to create a new VM with a new install of XP.

Jonathan

"Steve Jain [MVP]" wrote:

> On Fri, 30 Oct 2009 11:04:01 -0700, JonathanL
> <> wrote:
>
> >I created an XP VM in VPC 2007 with the parameter of a very large C: drive. I
> >realize now this is way too big and I want to reduce it to a small size.
> >
> >How can I reduce the size of the drive for the VM set up n VPC without
> >having reinstall XP and all the apps all over in a new VM?
> >
> >Is there a way to take the XP install and transfer it to another VM created
> >with a smaller virtual C: drive?
> >
> >BTW, I'm not in any way referring to the size of the VHD file or the size of
> >the physical drive of the host. I'm only referring to the guest in the VM.

>
> The easiest way is to use partitioning software, and reduce the size
> of the partition. This won't change the total size of VHD, but it
> will limit the amount of space the VM can use on the physical drive.
>
> --
> Cheers,
> Steve Jain, Virtual Machine MVP
> http://vpc.essjae.com/
> http://smudj.wordpress.com/
> .
>

 
Reply With Quote
 
Bo Berglund
Guest
Posts: n/a

 
      10-30-2009
On Fri, 30 Oct 2009 13:18:01 -0700, JonathanL
<> wrote:

>Doesn't seem like it's worth it to use partition software to reduce the size
>of the C: drive in the VM if you can't subsequently shrink the VHD file. My
>whole desire for reducing the size of the VM C: drive is to save space on the
>host without having to create a new VM with a new install of XP.
>
>Jonathan


Just to make me understand what you are doing:
Did you select a fixed size VHD when you created the guest (this is
not the default)???? If so why?

I always create my guests with something like 80-100 Gb size disks but
I let it be a dynamically expanding disk. This way the VHD file only
grows on the host as data are added inside the guest and it does not
fill up so I have no more space either.
Best of two worlds.

If you have a fixed size type VHD then I guess what you could do is to
create a new empty VHD disk (using the disk manager in VPC2007) and
set it as dynamically expanding and 80 Gb or so in size.
Then you attach it to the XP guest (while it is shut down) in the
guest settings and start the guest up. It will be like you added a new
disk to your physical computer.
Next inside the guest download the trial of Acronis and install it,
then use it to clone the system disk to the new drive.
When this is done shut down the guest and then in the settings of the
guest remove the old disk #1 and instead set the newly created drive
as the first disk.
Then start the guest again and uninstall the Acronis trial.

Now you will have a disk in the guest which is 80 Gb but residing on a
VHD file that is something like 3-4 Gb (depending on what software you
had installed on it).

--

Bo Berglund (Sweden)
 
Reply With Quote
 
Steve Jain [MVP]
Guest
Posts: n/a

 
      10-30-2009
On Fri, 30 Oct 2009 13:18:01 -0700, JonathanL
<> wrote:

>Doesn't seem like it's worth it to use partition software to reduce the size
>of the C: drive in the VM if you can't subsequently shrink the VHD file. My
>whole desire for reducing the size of the VM C: drive is to save space on the
>host without having to create a new VM with a new install of XP.
>
>Jonathan


You can shrink a VHD, but if you have 16GB of data on your VHD, you
can't make it smaller.

VHD resizer can indeed make a VHD smaller, but not if the VHD is full.

Simplest way to save space is to use NTFS compression on your VHD,
that will reduce it 40-60%.

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

 
      10-30-2009
I followed most, but not all of what you said.

Another question now comes to my mind. If I install partitioning software in
the VM and reduce the size of the VM's C: drive from say 200GB to 100GB, what
happens to the other 100GB? Can it be reclaimed somehow or does that not have
any bearing on the size of the VHD file?

"Bo Berglund" wrote:

> On Fri, 30 Oct 2009 13:18:01 -0700, JonathanL
> <> wrote:
>
> >Doesn't seem like it's worth it to use partition software to reduce the size
> >of the C: drive in the VM if you can't subsequently shrink the VHD file. My
> >whole desire for reducing the size of the VM C: drive is to save space on the
> >host without having to create a new VM with a new install of XP.
> >
> >Jonathan

>
> Just to make me understand what you are doing:
> Did you select a fixed size VHD when you created the guest (this is
> not the default)???? If so why?
>
> I always create my guests with something like 80-100 Gb size disks but
> I let it be a dynamically expanding disk. This way the VHD file only
> grows on the host as data are added inside the guest and it does not
> fill up so I have no more space either.
> Best of two worlds.
>
> If you have a fixed size type VHD then I guess what you could do is to
> create a new empty VHD disk (using the disk manager in VPC2007) and
> set it as dynamically expanding and 80 Gb or so in size.
> Then you attach it to the XP guest (while it is shut down) in the
> guest settings and start the guest up. It will be like you added a new
> disk to your physical computer.
> Next inside the guest download the trial of Acronis and install it,
> then use it to clone the system disk to the new drive.
> When this is done shut down the guest and then in the settings of the
> guest remove the old disk #1 and instead set the newly created drive
> as the first disk.
> Then start the guest again and uninstall the Acronis trial.
>
> Now you will have a disk in the guest which is 80 Gb but residing on a
> VHD file that is something like 3-4 Gb (depending on what software you
> had installed on it).
>
> --
>
> Bo Berglund (Sweden)
> .
>

 
Reply With Quote
 
JonathanL
Guest
Posts: n/a

 
      10-30-2009
What I'm looking at is a VM with a 200GB C: drive that I want so shrink to
100GB. Only 50GB is used and I know that it will never exceed the 100GB or
get close to it.

So if I shrink the C: drive from 200 to 100GB using partition software, what
happens to the now unused 100GB? Would that shrink the VHD or would it even
affect it at all?

"Steve Jain [MVP]" wrote:

> On Fri, 30 Oct 2009 13:18:01 -0700, JonathanL
> <> wrote:
>
> >Doesn't seem like it's worth it to use partition software to reduce the size
> >of the C: drive in the VM if you can't subsequently shrink the VHD file. My
> >whole desire for reducing the size of the VM C: drive is to save space on the
> >host without having to create a new VM with a new install of XP.
> >
> >Jonathan

>
> You can shrink a VHD, but if you have 16GB of data on your VHD, you
> can't make it smaller.
>
> VHD resizer can indeed make a VHD smaller, but not if the VHD is full.
>
> Simplest way to save space is to use NTFS compression on your VHD,
> that will reduce it 40-60%.
>
> --
> Cheers,
> Steve Jain, Virtual Machine MVP
> http://vpc.essjae.com/
> http://smudj.wordpress.com/
> .
>

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

 
      10-30-2009
On Fri, 30 Oct 2009 15:16:01 -0700, JonathanL
<> wrote:

>What I'm looking at is a VM with a 200GB C: drive that I want so shrink to
>100GB. Only 50GB is used and I know that it will never exceed the 100GB or
>get close to it.
>
>So if I shrink the C: drive from 200 to 100GB using partition software, what
>happens to the now unused 100GB? Would that shrink the VHD or would it even
>affect it at all?


What VM software are you using? VPC doesn't allow VHDs over 127GB.

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

 
      10-30-2009
On Fri, 30 Oct 2009 15:16:01 -0700, JonathanL
<> wrote:

>What I'm looking at is a VM with a 200GB C: drive that I want so shrink to
>100GB. Only 50GB is used and I know that it will never exceed the 100GB or
>get close to it.
>
>So if I shrink the C: drive from 200 to 100GB using partition software, what
>happens to the now unused 100GB? Would that shrink the VHD or would it even
>affect it at all?
>

Since you stated that you have a 200 Gb VHD drive (strange, I thought
that the max size VPC2007 actually allows is something like 128 Gb)
and it onlu uses 50 Gb of data and you want to shrink the VHD file *on
the host*, then I must assume you are using a *fixed* size VHD drive.
No matter what you do the VHD file will stay the same size on the
host!
If you use partitioning software to shrink the C: partition inside the
guest then what will happen is that the 200 Gb drive will contain one
partition of 100 Gb contianing 50 Gb of data plus an empty space which
you can use for another partition as usual. But the VHD file on the
host won't change one bit.

I am still saying that the problem you are seeing is because you
changed the default from the default dynamically expanding to fixed
when you created the virtual disk originally. This makes VPC2007
allocate *all* of the needed space at creation time, which makes the
VHD file become the full size and it won't change one bit
afterwards....
And you cannot do anything about it either except as I described the
procedure....
Maybe VHDResizer is able to create a copy in a dynamically expanding
virtual disk, though. You should try that first if you already have
that program.

--

Bo Berglund (Sweden)
 
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
Windows Vista and Hard drive recognition. 1maintenance Windows Vista Hardware 5 01-20-2008 01:52 PM
Dual boot Vista & XP cant read xp drive Rick Windows Vista Installation 17 08-20-2007 11:31 PM
how to change hard drives with windows vista. bsantanu Windows Vista Performance 5 05-19-2007 02:13 AM
Vista drive partition designations - Excel acegap Windows Vista File Management 2 02-24-2007 07:12 PM
Partitioning Hard Drive #2 Travis King Windows Vista General Discussion 6 03-14-2006 04:07 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