Thursday, January 10, 2013

VMWare Player 5 and Drive Shrinking

It's been a while since I play with VMWare at desktop level. Since I need a Delphi development environment that I could easy transfer between two machines, I thought to give it a try.

VMWare Player just rocks on the new i5 processors. Creating the Virtual Machine and playing around was really easy, until I get into VMWare Tools.

I remember that there was a control panel applet to start VMtools. There isn't any more. I google around for a couple of hours, and I get no information about this. And googling for "Shrink VMWare Disk" always mention the VMTools applet.

I run into the uninstall / install process for some times, until I give up. Something should be really wrong.

Finally I noticed that the applet is not available since version whatever.  You need to use the command line tools. On a Windows 7 guest this is as easy as opening a command line with administrator rights, and invoke the VMWareToolBoxCmd.exe utility.

But before you use the shrink option, you should "zeroing" the hard disk. You can do this using SDelete utility from windows sysutils: download it here.

Use SDelete with -z parameter on each drive before you run the shrink utility. Something like:

sdelete -z C:\

After it, you are ready to go:

<Open Administrator Command Line>
cd "\Program Files\VMWare\VMWare Tools"

This will show you some interesting information:
VMwareToolboxCmd help disk

but if you just want to shrink all disks just run:
VMwareToolboxCmd disk shrinkonly

SDelete it. Shrink it. Stay Free.

2 comments:

  1. I've run this multiple times - and each time it says it's completed successfully - but VMWare Player still says that the size virtual drive is the same as it always was. Is there a second (or a zeroth) step?

    ReplyDelete
    Replies
    1. I just update the post - use the sdelete tool before you shrink the drive.

      Delete