All Things Tech Since 2010

Compact a VMware Player Virtual Hard Drive

Compact a VMware Player Virtual Hard Drive

Jul 12, 2012

“I have been using VMware Player on my computer to build virtual machines and play with new software and operating systems. I’ve noticed, though, that the virtual hard drive files for the virtual machines eat up more and more space on my computer’s hard drive. I don’t want to delete my virtual machines and start over. Is there anything that I can do to make their virtual hard drives smaller?”

Yes, you can. You can think of a virtual machine’s hard drive as a large database. It starts out small and grows only when you add more files to the virtual machine. However, it doesn’t shrink when you delete files, because running that kind of database maintenance while the virtual machine operates would greatly decrease its performance. Instead, when you delete a file, it creates a “hole” in the database and fills it later when you add more files — but that might not be useful for you if you have deleted a large volume of information. If this is the case, you can run a Compact operation to remove all of the “holes” and reduce the size of the virtual hard drive file.

  1. VMware Player Compact Hard DriveOpen VMware Player. If the virtual machine that you want to work with is currently in a suspended state, you can’t compact the virtual hard drive. Double-click the virtual machine to resume it, and then shut it down through the guest operating system. After doing this, you may need to open VMware Player again.
  2. Click the name of the virtual machine after shutting it down. On the right side of the window, next to State, the virtual machine should now report that it is Powered Off.
  3. Click Edit virtual machine settings. This displays a new window with a list of the virtual machine’s hardware components.
  4. Click Hard Disk on the list.
  5. Click the Utilities button on the right side of the window.
  6. VMware Player Compact Hard DiskClick Compact on the menu. You should now see a new window with the words “Compacting virtual disk.” When the status bar is full, VMware Player has removed all of the empty space from the virtual machine’s hard disk file.
  7. Click OK twice to return to the VMware Player main menu.