VMware Communities
Mario88
Enthusiast
Enthusiast

Workstation 11.0 AND 11.1 AND 12.0 Compacting disk does not work any more (regression from 10.0)

Hi,

in Workstation 10.0 I was used to consolidate free space on my Xubuntu 14.04 guest as follows, similar to a workaround posted in Compact/shrink *.vmdk does NOT work (for Ubuntu guestOS)

1. delete all snapshots

2. (in guest) open terminal, execute

$ cat /dev/zero > zero.file

$ rm zero.file

3. (in host) go to "VM" > "Settings..." > "Hard Disk (SCSI)" > "Compact"

This cleaned up all free space, resulting in a vmdk-file of minimal size.

In Workstation 11.0 this does not work anymore. When I click "Compact", the window "Compacting virtual disk..." shows only for a short time, then it says "The disk was successfully compacted.". However, the filesize of my vmdk-file is unchanged. And also the "Defragment" button does not reduce size. "VM" > "Manage" > "Clean Up Disks..." does not work either and had never worked for me anyway.

This is very bad, because on my virtual disk only about 3GB are actually used. Due to updates / files being created and deleted, etc. the vmdk-file size has grown to over 6GB, this means 100% overhead for unused sectors.

Any solutions for this?

7 Replies
Mario88
Enthusiast
Enthusiast

I found out that

vmware-vdiskmanager.exe -k <path-to-vmdk>

still works somehow. However, I really disapprove that you can't clean up a disk from the workstation GUI anymore and that you have to use command line utilities instead (loss of convenience). Remember, VMware is not just any product, you have to pay a lot of money for it.

I also want to remark that "VM" > "Manage" > "Clean Up Disks..." is still useless for any other file system than NTFS. I mean, come on guys, it's nearly 2015, and Linux based operating systems are way more common nowadays.

Mario88
Enthusiast
Enthusiast

This was NOT fixed in version 11.1, although it was mentioned in the changelog.

I just tried it under real circumstances.

Same result as before. When I click "Compact", the window "Compacting virtual disk..." shows only for a short time, then it says "The disk was successfully compacted." without compacting anything.

(I have installed "11.1.0 build-2496824")

Did you actually attempt to fix this issue or did you just write so in your changelog to troll your customers?

Reply
0 Kudos
Mario88
Enthusiast
Enthusiast

Still not fixed in Workstation 12.0 !!

Reply
0 Kudos
urbite
Contributor
Contributor

I can confirm that compacting linux guest disks from the WS 12 GUI *does not work*!!!

As you state, this is not an inexpensive product and it's perplexing as to why VMWare hasn't fixed it. I upgraded from WS 8 and naively assumed that it would be fixed.

I'm now running the command line tool per your suggestion (and as I had done on WS8). Hopefully it will work, as I need to reduce a 177GB vmdk file to the 80GB that actually has data in the guest (SUSE LED 11.3) OS.

WMWare - are you listening??? Do you have any plans to fix this in the WS12 GUI?

Reply
0 Kudos
amir27
Contributor
Contributor

Not sure if this helps, but I have tested compacting now a Win-2012 guest VM with Hardware version (Hardware compatibility) V9 and V10 on VM Workstation V11.1.2 build-2780323 and it worked by reclaiming unused space and reduced .vmdk file.

I used the GUI menu: VM > Settings > Hard disk > Compact

File size before compacting:

04/10/2015  12:21 8,886,550,528 Win-2012-Datacenter.vmdk

File size after compacting:

04/10/2015  13:03 8,681,226,240 Win-2012-Datacenter.vmdk

What Hardware version was your guest VM when you tried compacting ?  I'll try to test the same.

Reply
0 Kudos
chaithu4u
Enthusiast
Enthusiast

useful answer amir

Reply
0 Kudos
TroyHoffman
Contributor
Contributor

Have you tried vmware-toolbox-cmd in the Linux guest?

I did this, and it shrunk my all of my disks:

sudo vmware-toolbox-cmd disk shrinkonly

I'm not sure if sudo was necessary. It brought up a Workstation progress bar, and when it was done, my disks took up less space on my host.

Reply
0 Kudos