Vmkfstools Windows 7
The same steps can be used to shrink a Windows drive. With Vista/2008 and newer the disk manager can be used to change the size of the partitions instead of Gparted or Gparted can be used as well. Related Articles (HowTo) Grow a VMDK with VMKFSTOOLS (HowTo) Convert a VMDK from Thick to Thin on ESX. How can I mount a VMWare Disk in Windows 7 64-Bit. Ask Question 18.
I'm facing a strange issue with my virtual machine. I have an rhel 6.1 guest os running on VMware workstation (9.0.2 build-1031769) hosted on Windows 7 Enterprise 64 bit. The size of the vmdk file is around 65 GB whereas the total size of the guest os is only 11GB. What am I missing here? [root@praveenVM praveen]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 95G 11G 79G 12% / tempfs 499M 340K 499M 1% /dev/shm /dev/sda1 124M 61M 58M 52% /boot There was some temporary files in /var (Unnecessary logs), which I have deleted now and hence the used space is around 11GB. But why is that the vmdk file is around 65GB?
Having deleted all the unnecessary files in the Guest OS, the size of the vmdk should automatically decrease right? It appears that VMware isn't able to do much to compact ext4-formatted drives. The solution is that you need to fill the drive with zeroes and then delete a file that you used to do that.
So: sudo su cat /dev/zero > wipefile; rm -f wipefile shutdown -h now Basically, you become root, you create a file filled with zeroes and then you delete it and shutdown the machine. I ran the above code a moment ago, and watched a few things as I did: • I suspected the vmdk file would grow to the size of the disk, but it didn't. It grew slightly, but not much.
This was good because my host does not have space for the full vmdk file. • I suspected drive on the guest would fill up. I watched it with: while: do du -h sleep 2 done The guest disk started at about 15% full, then climbed to 100%, at which point the cat command failed and the wipefile was rm'ed, bringing it back to 15% full.
Nikolay Gogol, a young Third Section clerk, is desperate: his own books seem shallow and mediocre, so he keeps buying entire print runs just to burn them all. Volodimir vinnichenko komedya z kostem plan. The year 1829.
I've seen a few posts that also say you should do this for /boot. Probably a good idea, but I don't think it's always necessary. Once that's complete, go into the machine's settings > Hard Disk > Utilities > Compact., and you should be all good.
Unfortunately, 64-bit Windows will restrict the ability to load 32-bit drivers, which is why the VMDK mounting utility is failing. I found that purports to be able to work around the problem by simply installing it in the Program Files directory instead of Program Files (x86), but it did not work for me; perhaps you will have better luck. You could also look for a third-party tool like, but alas, they too need to use a driver, which gets blocked—yes, even when installing/running as administrator (the for VDK is available, so someone may take up the task of updating and compiling it for 64-bits). Actually has a 64-bit version, but unfortunately it only supports read-only for VMWare disks. There are on the VMW boards about this and it seems that the just doesn't support 64-bit Windows and that a newer one is included as part of the developer tools (as though only devs would need such a utility). So your options are to use the vmware-mount utility from either the or the newer which contain a more recent copy of the mounting and disk management utilities.
(Even these install as 32-bit by default and include a zip file with 64-bit versions of a few of the files including the disk management utility, but not the mounting utility.) You can mount a VMDK file with this, but note that it mounts as read-only by default; for write capability, you must use the /m:w switch, and even then, Windows keeps giving a path not found error when trying to change/delete files on the mounted volume. VMWarePlayer has a built-in mounting ability via the hard-drive settings, but again, even setting it to not—read-only gives errors about being unable to find the file. (VMWare Workstation also does this, but VMWare Player is much smaller and free.) Update: I just discovered that you can make changes to drive mounted with vmware-mount (from the VDDK), if you do it from an admin command-prompt (e.g., e: & del /f /q pagefile.sys).