VMware Cloud Community
davidflt
Contributor
Contributor

vmkfstools -K for snapshots?

I have some VMs with snapshots that can't be deleted or consolidated for specific reasons. The base vmdk is thin provisioned and I have reclaimed space by running sdelete -z followed by vmkfstools -K against it, can that also be done safely on snapshots? I have one snapshot in particular that is nearly as large as the 150GB thin-provisioned size and I'm looking to optimize the VMs as much as possible.

Example

base = vmbase.vmdk, 150GB before, 30GB after

snapshot1 = vmbase-000001.vmdk, 20GB before

snapshot2 = vmbase-000002.vmdk, 17GB before

Thanks for any help.

0 Kudos
2 Replies
davidflt
Contributor
Contributor

Does anyone have any ideas here? I've found that running sdelete -z on snapshots greatly increases the size, and it does not appear that I can run vmkfstools -K against them, or even against the base VM after the first time. I get an error 0 with any attempt.

0 Kudos
a_p_
Leadership
Leadership

I'm afraid you're out of luck. As you may already have found out, running sdelete on a VM with snapshots will write the zeroes to the current snapshot .vmdk file, so that doesn't help with the base disk. Furthermore, vmkfstools -K (--punchzero) is for thin provisioned virtual disks only, not for snapshots. The difference between thin disks and snapshots is that thin provisioning uses a file system feature, and snapshots use a sparse file format, i.e. maintaining the metadata in the .vmdk file.

André

0 Kudos