Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows XP with Virtual PC - windows xp out of disk space

Status
Not open for further replies.

lgtektips

Technical User
Jul 29, 2005
4
US
I am a newbe...in the Virtual PC arena so here goes:

My work PC has an XP operating system with a Virtual PC that has older copies of software for VB and Access.

The space on my C drive of the laptop has been loosing space for a while and I have deleted and moved almost all programs/apps to network share. While the Virtual PC C drive is listing 50G of free space.

How can I recover some of the space for my C drive on the laptop?

Any suggestions are welcome and very appreciated.
 
The first crazy thing to say when you are trying to reduce space taken by files is "take a full backup!". You have been warned.

You could first perform the usual housekeeping functions within the virtual machine - disk cleanup, removal of unnecessary programs and documents/ backups/ logfiles etc. CCleaner is recommended by many people.

Old restore points, recycle bins for individual logons within the VM, old chkdsk/scandisk files should be removed. Uninstall backups for windows updates which are likely to never be needed. Old, or unused user accounts could be removed.

Clean up internet history, cookies, temporary web files, offline web pages, images.

Manually remove help files, unnecessary language files, unused images (wallpaper, screensavers) etc.

Turn off the virtual machine's Hibernation if enabled to recover a large chunk of space taken up by hiberfil.sys, do a startup disk check, run the cleaner again to remove any files orphaned or created by the disk check, and finally boot to a command prompts and perform a command-line defragmentation.

None of this will have yet changed the virtual disk size.

In order to reduce the size of a virtual hard disk you will need to compact it, which is basically a form of compression, especially of the empty space.

Where files have been written and deleted or moved from, the old data remains written to the virtual disk file, and cannot be effectively compressed without precompaction, which is a process of overwriting all the empty space with blank characters, or "zeroing out" any sectors with data written to them. Zeroed sectors can be very efficiently compressed.

It is not clear which virtualization program you are using, but in Microsoft Virtual PC 2007 and 2004, and Windows Virtual PC for Windows 7 Professional and Ultimate there is a CD image file called Precompact.iso (Virtual Disk Precompactor.iso) in the Integration Components (Virtual Machine Additions) folder under (Microsoft Virtual PC)Windows Virtual PC in Program Files.

From the settings for the virtual machine, you need to attach the precompactor cd image as a virtual cd for the virtual machine and either autorun or set up the precompaction preparation. It takes a while to run.

When it is finished, you should shut down the VM, and then in the host, from the settings for the VM's hard disk, choose modify and compact the virtual hard disk. This also takes a time.

Convert the virtual disk to a fixed size, and manage its growth with external storage in future.


 
I cannot thank you enough for this..in the past months I have asked for help from a number of IT folks and they tried but none have succeeded...I will begin to process the steps you have outlined ...may I repost to this area and keep you posted? When I look at the Help on the Virtual PC : Microsoft Virtual PC 6.0.156.0

The backup step: will a backup of the vhd file be enough or should take a backup of the information inside the Virtual PC?
 
Thanks for the version info. This is the 2007 version before the SP1, and the latest Windows Virtual PC for Windows 7 Pro and Ult only.

Before you get too deeply into this, a few questions.

The size of the VHD on the host laptop's disk is...? (the path for the vhd should be found in the settings for the VM usually under Hard disk 1.

Are there other substantial-sized files related to this VM? (VSV - "saved state" memory snapshot I think, VMC - "settings" configuration file), or any other VHDs?

Do they approach the 50GB of space on the guest VM system, or is this merely virtual space too?

How much disk space is occupied on the VM by OS, data and programs combined?

How much (guest)C:\ drive space does the VM require to do what you need it to?

In terms of backup - you must preserve the data and the means to access it if the modified (i.e. shrunk) VHD fails to be operable.

How you do this is your choice, as long as you can reproduce your system without compromising your data retrieval or any licensing terms of the OS or application software.

The problem is always finding enough space on a reliable backup medium, and testing the backup.

It may be possible to create a Windows Image (.wim) file from the VHD. Wim files are very economical on space - this may be an ideal backup format, which may be re-expanded to a VHD format.





 
Thank you for helping me thru out this...your help enabled me to learn more about the VPC application. I followed your instructions about backing up / defragging / precompation.iso but it was still too large to process a VPC compact thru the wizard. I forwarded the test processes to the IT group and they are reviewing it...again thankyou very much ...I have a deadline to meet and this helped me quickly report what the issue was to..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top