Hi - I moved some large packets of data off a VM and now I’m needing to shrink the vmdk and get that space back to the host. There’s several ways to do this and I’m thinking the easiest way is to clone the VM and allocate the new storage space and then delete the old VM. Will this work safely? Thanks!
What is the guest OS?
You could do 1 of 3 things for a reliable process, depending on what data structures and permissions you may need to retain:
1. In-guest file-level backup and restore from old larger disk to new smaller disk
2. In guest file copy from old larger disk to new smaller disk
3. Use vCenter Converter Standalone to create a new VM with a smaller disk
Another possible option that I could think of, is to zero out unused space within the guest file system, and then use the vmkfstools command line utility with its --punchzero option to remove unused blocks from the .vmdk file.