一般来讲,增大很容易,但缩小比较麻烦。
听说那个命令行工具也不很靠谱。
我没有测试成功。
找来找去,还是VMware Converter成功率最大。
参考文档:
Thin provisioned disks grow up with the time. When you work with a thin disk provisionned VM, you are copying new files into a VM, then deleting them, again and again, this process grow the thin disks over time. If you delete files from within the VM wanting to gain the space back, it just don’t work. The VMDK grows, but don’t shrink. While from within the quest OS in the VM you see that you’re getting more space, from the vSphere client the disk shows the same size. Natively from within vSphere client it is not possible to shrink VMDK disk files.
With VMware Converter standalone the process will actually do a clone of the original VM. But you’ll need enough space on your storage somewhere and enough time outside of business hours, because the process operates when the VM is shut down. In my test that you’ll be able to follow through the screenshots below, it took 36 min to do the V2V conversion process.