PDA

View Full Version : Virtual PC 2004 - can't compact the disk?


Gator
03-03-05, 12:16 PM
My WinXP Virtual Harddisk is nearly 9gigs, but I deleted a bunch of files and now it's technically only using about 2 gigs. I tried to compact the disk in Virtual PC but it's the same exact size. I don't understand the instructions on this screen, I tried defraging first but it said it didn't need it and unmoveable data was at the end anyway; so then I tried Partition Magic to shrink the partition and then compact in Virtual PC but it did not help.

What am I doing wrong? I'm wasting several gigabytes of hard drive on empty space within my XP virtual disk.

http://www.nvnews.net/vbulletin/attachment.php?attachmentid=10656

retsam
03-03-05, 06:12 PM
why would you want to compact the vpc anyways ...

Gator
03-03-05, 07:23 PM
why would you want to compact the vpc anyways ...

If I'm only using 2gig for an XP virtual disk, and it's using 9gig total, 7 gig of which is unused space, it would be nice to have that space back for the rest of the hard drive to use.

ricercar
03-04-05, 04:46 AM
Do you have a tool in the guest OS to write zeros to the unused sectors? It seems from that dialog that the Virtual PC application cannot compact or shrink the virtual drive without you writing zeros to the unused sectors from within the guest OS.

PS
Have you considered VMware Workstation? Workstation doesn't require any shenanigans like that to shrink unused capacity from a virtual disk. You also may be interested to know that with the Workstation 5 Public beta, VMware has a free utility to create a VMware virtual machine from a VPC virtual machine, without changing the VPC machine (in case you want to go back to VPC).

retsam
03-04-05, 05:40 AM
it sounds like when you formated you vhd you made it 10 gigs why dont you reinstall the vpc and only use 2 gigs.

Gator
03-04-05, 08:24 AM
it sounds like when you formated you vhd you made it 10 gigs why dont you reinstall the vpc and only use 2 gigs.

It doesn't work that way, the drive is dynamically expanding. See when I first installed XP on it the file size was only about 2 or 3 gigs. Then I added a lot of files and it became 9 gigs. I've since deleted those extra files but it remains 9 gigs, meaning about 6 or 7 gigs are simply being wasted on empty space. There is a a compact method in VPC, but I can't seem to get it working hence I posted.

And to create another new image is very time consuming, I would much rather compact this if I can. Remember XP runs slower on VPC than a real machine, so a reinstall can take hours.

Gator
03-04-05, 08:28 AM
Do you have a tool in the guest OS to write zeros to the unused sectors? It seems from that dialog that the Virtual PC application cannot compact or shrink the virtual drive without you writing zeros to the unused sectors from within the guest OS...

That's what I don't understand! What program can zero unused sectors? I have no clue how to do that :(

PS
Have you considered VMware Workstation? Workstation doesn't require any shenanigans like that to shrink unused capacity from a virtual disk. You also may be interested to know that with the Workstation 5 Public beta, VMware has a free utility to create a VMware virtual machine from a VPC virtual machine, without changing the VPC machine (in case you want to go back to VPC).

Well I've been using Virtual PC for so long that I'm kinda used to it and prefer not to switch. But maybe I'll give VMWare a try sometime, it's nice to know it'll convert my VPC disks.

ricercar
03-06-05, 02:54 PM
To write zeros to all sectors, you likely need a secure re-formatting tool. These apps tend to have optiosn to write random or all zeros or all 1s to the disk. I expect that Norton disk tools must have something to do this, but I've never used it.

retsam
03-06-05, 08:25 PM
well if your used to vpc why dont you try virtual server ....

Gator
03-08-05, 02:38 PM
well if your used to vpc why dont you try virtual server ....

Why would that help me? And then it means I have to get something else.

retsam
03-08-05, 06:40 PM
did you try service pack 1 for vpc

A new Virtual Disk Precompactor. A utility that is designed to "zero out"—that is, overwrite with zeros—any available blank space on a virtual hard disk.

http://www.microsoft.com/windows/virtualpc/downloads/sp1.mspx

Gator
03-08-05, 07:24 PM
did you try service pack 1 for vpc



http://www.microsoft.com/windows/virtualpc/downloads/sp1.mspx

Thanks man! That program they add to SP1 did the trick, but alas it did not give me back as much space as I thought I would get. The file is now only 7.6gb in size, still an improvement but not as much as I expected.

I'm gonna try disabling the swap file temporarily in the image, defrag, then do the precompact and compact process again, that should win back most of the space.

Thanks again :)

retsam
03-08-05, 10:44 PM
glad i could help .... here is a usefull like if you ever have another m$ o.s problem .


www.microsoft.com/technet.... i have to say there technical site is A+ ....