Compact *.vmdk does not work (for Fedora guestOS) in VmWare Player
I have a Fedora Linux Guest OS in a VmWare Player.
The hard drive on the virtual machine (*.vmdk file) got to big and I was looking for a way to Compact it.
The compact operation from VmWare Player->Virtual Machine->Edit Virtual Machine Settings->Hard Disk->Utilities->Compact did not do the trick.
The solution came from a VmWare forum thread, the 4-th post from the top:
Assuming the VmWare virtual disk is not pre-allocated and the filesystem is ext4 you will have to manually prepare it to be shrunk.
In the VM, in a Terminal become root and then copy and paste the following command, as is, and then press Enter:dd if=/dev/zero of=wipefile bs=1024x1024; rm wipefile
Wait for the command prompt to return and then shutdown the VM and then from the Virtual Machine Settings for the Hard Disk select the Compact command from the Utilities button.
The solution worked like a charm.