Headshot-color me@jbrains.ca Find out where I'm appearing

Rescuing disk space from Parallels

I use Parallels to run Windows under my MacBook Pro which has a 93 GiB hard disk. Since I also live a flight away from the nearest authorized Apple reseller, I find it difficult to buy a new hard disk whenever I need one. These reasons form the constraints under which I spent much of a recent afternoon reclaiming disk space, rather than focusing on real work. Since I have more than a neophyte’s, but less than an expert’s, knowledge of UNIX, I needed to look up the command to show me how to ask UNIX how much disk space folders used. I invoked this command

$ du -h -d 1

This command tells me how much space each immediate folder (-d 1 means “depth of one”) takes up in human-readable (-h) form. This gave me a report like the following

....other folders....
 24M	./Applications
 24K	./bin
7.3M	./Desktop
2.5G	./Documents
....yet other folders....

Since I want to focus on the really big folders, I looked for a way to do that. I decided to grep for a “G” in the fourth position.

mel:~ jbrains$ du -d 1 -h | grep ^...G.*$
2.5G	./Documents
 20G	./Library
1.0G	./Movies
5.8G	./Music
3.3G	./Pictures
3.3G	./Workspaces
 36G	.

Since I plan to use this command frequently, I added it to ~/.profile

alias find_big_folders="du -d 1 -h | grep ^...G.*$"

I found that Library took up the most space, and within it Parallels took up over 20 GiB on its own. I searched the web and learned that Parallels has a “Compressor Tool” that compresses hard disk images, but when I tried to use it, it failed, telling me I had snapshots or had enabled “disk undo”. Since neither condition held true, I searched further and saw that Parallels has a long-standing defect (back to July 2007 at least) that causes this problem. Fortunately, the same search gave me a solution: MakeVM.

MakeVM creates disk images for Parallels and VMWare, and although it cost USD 19.99, it appeared to solve my problem, so I decided to try it. I installed it on the Windows XP image running under Parallels and found the “Custom Clone” feature ridiculously easy to use. Since I had no experience with this tool and wanted to recover from each step, I did the following

  1. Back up my entire Parallels virtual machine image by tar-ing it to an external disk.
  2. Back up my second Parallels hard disk image (disk2.hdd).
  3. Choose “Custom Clone” under MakeVM to clone my second hard drive (not the “Virtual Hard Disk” feature, which wants to clone a hard disk image), writing the clone to my external hard disk, since I had little space on the internal disk. When asked whether I wanted to compact the cloned disk, I naturally chose “yes”.
  4. Shut down my virtual Windows XP.
  5. Edit the Windows XP virtual machine settings, removing the existing “Hard Disk 2” image and adding the newly-cloned disk image as “Hard Disk 2”. Windows XP should treat these disks as identical.
  6. Start my virtual Windows XP and judge the results. Although I had to re-install Java to make Eclipse work, everything else appeared all right.
  7. Shut down my virtual Windows XP.
  8. Remove the old Hard Disk 2 image from my internal disk and copy the newly-cloned Hard Disk 2 image to my internal disk, updating the virtual machine preferences accordingly.
  9. Back up my entire Windows XP virtual machine image again, repeating the rest of the process for Hard Disk 1.

This entire process took about a half day, so it helped that I had another computer in the room on which to continue working. Once I completed the process, my Windows XP virtual machine image folder reduced in size from about 22 GiB to its current 9.2 GiB. That rectified my disk space problems. I now have over 16 GiB of breathing room, which means I don’t have to upgrade my hard disk, but rather I can wait to upgrade my entire machine. That makes me happy.

If you have disk space problems, or even if you simply want to save disk space, and you run Parallels or VMWare, I recommend MakeVM to safely compact your disk images. I found it well worth the USD 19.99 I paid for it. If this helps you, then please use the “Discuss” link below to comment.

May 30, 2008 03:00 mac
blog comments powered by Disqus