VMware Communities > VMTN > Desktop Products > VMware Fusion (for the Mac) > Discussions

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
5 Replies Last post: Apr 13, 2009 10:46 AM by RDPetruska
Reply

Reducing the size of a virtual machine

Apr 11, 2009 7:45 PM

Click to view Guille779's profile Novice Guille779 3 posts since
Apr 11, 2009

Hey guys,

Is there a way I can reduce the size of a disk image? I have a Windows XP image that started at around 4GB, I've installed only a couple of apps and it's been increasing in size ever since I created it. It's now at 9GB. Why is this?

Reply Re: Reducing the size of a virtual machine Apr 11, 2009 11:18 PM
Click to view mikelane's profile Hot Shot mikelane 240 posts since
May 14, 2007
What size are the apps that you installed?

Do you have Windows set to update automatically?

Are you surfing the internet on the machine or downloading files?

The 9GB of usage just reflects the size of the files that your windows installation is using.

You might also check Event Viewer for errors to see if you have problems that are being logged?

How much RAM do you have assigned to the virtual machine? This will also be reflected in a file in your virtual machine directory as will any snapshots of the virtual machine that you have taken

Without more details it's hard to tell ...

Reply Re: Reducing the size of a virtual machine Apr 12, 2009 8:06 AM
in response to: mikelane
Click to view Guille779's profile Novice Guille779 3 posts since
Apr 11, 2009

Well, let's see:

The Apps only account for about 700MB (the size of the Program Files directory)

My User profile is 18MB in size.

No, Windows update is disabled.

I am using it for browsing, mainly to test websites in IE7

Virtual Memory is at 1.5GB

Only 512MB of RAM are asigned.

The weird thing is that Windows only reports 6GB of used hard drive space, so where the heck are the other 3GB?

I don't have any snapshots created.

Reply Re: Reducing the size of a virtual machine Apr 13, 2009 8:01 AM
in response to: Guille779
Click to view RDPetruska's profile Guru RDPetruska 15,853 posts since
Jan 11, 2005
Moderator

The weird thing is that Windows only reports 6GB of used hard drive space, so where the heck are the other 3GB?

ANY disk activity is a write. ANY disk writes to a growable virtual disk will expand it. Even a "delete" is NOT a delete - just an update to the directory entry for the file. For at least a short while, the actual bits of the file still exist on the hard disk (until they become overwritten by some other file). Note that this is exactly the same as a physical hard disk... just that you don't see it expand so you don't realize that it is happening.

To reclaim the space on your host which your virtual disk is using, you need to run the Shrink command within the VMware Tools for your guest.

Reply Re: Reducing the size of a virtual machine Apr 13, 2009 10:23 AM
in response to: RDPetruska
Click to view davidb2's profile Enthusiast davidb2 72 posts since
Jul 30, 2007
RDPetruska wrote:

The weird thing is that Windows only reports 6GB of used hard drive space, so where the heck are the other 3GB?

ANY disk activity is a write. ANY disk writes to a growable virtual disk will expand it. Even a "delete" is NOT a delete - just an update to the directory entry for the file. For at least a short while, the actual bits of the file still exist on the hard disk (until they become overwritten by some other file). Note that this is exactly the same as a physical hard disk... just that you don't see it expand so you don't realize that it is happening.

To reclaim the space on your host which your virtual disk is using, you need to run the Shrink command within the VMware Tools for your guest.

Maybe this explains why my disk also grew when I used System Tools>Disk Cleanup in XP Pro SP3 to compress old files? (I asked this in another thread I started a few days ago but got no answer.) By the way, subsequently running Shrink didn't reclaim the increased size.

David
Reply Re: Reducing the size of a virtual machine Apr 13, 2009 10:46 AM
in response to: davidb2
Click to view RDPetruska's profile Guru RDPetruska 15,853 posts since
Jan 11, 2005
Moderator

davidb2 wrote:
Maybe this explains why my disk also grew when I used System Tools>Disk Cleanup in XP Pro SP3 to compress old files? (I asked this in another thread I started a few days ago but got no answer.) By the way, subsequently running Shrink didn't reclaim the increased size.

David

Possibly. But, if your guest OS has used most of the space you've allocated for it (and hence why you'd want to run the Disk Cleanup utility in the guest), then there aren't many sectors left in the virtual drive containing deleted data which needs to be zeroed by the Shrink utility. Therefore, very little space available to be reclaimed.


Robert
http://communities.vmware.com/servlet/JiveServlet/download/38-20628/vExpert_logo_150x75.jpg

Actions