VMware write eager zeros after disk creation
It would be nice to be able to convert a Lazy Zeroed disk to an Eager Zeroed disk after disk creation in VMware - is this possible?
I understand the basic difference between Thick Provision Lazy Zeroed and Thick Provision Eager Zeroed. I usually want to do Lazy Zero so I can create the disk faster. And the eager zeroed performance increase is not large in most circumstances.
However, it would be nice to make the disk Eager Zeroed after disk creation, perhaps as a background task.
Solution 1:
You can use the vmkfstools
with the -k option. For example:
vmkfstools -k disk.vmdk
However, you will have to shutdown the VM first and login to the ESXi Shell.
Also, to determine if a disk is zeroedthick or eagerzeroedthick, you can use the same command with the -D parameter as:
vmkfstools -D disk.vmdk
Then look for tbz 0
in the resulting output. If the value is 0 then the disk is eagerzeroedthick
, otherwise it is zeroedthick
.
Both commands are described in the follwing VMware KB article:
Determining if a VMDK is zeroedthick or eagerzeroedthick (1011170)
Solution 2:
Storage vMotion or a powered-off datastore migration will allow you to select a different disk type. Then just migrate the disk back to the original datastore, if desired.