VMware Cloud Community
dinghui
Contributor
Contributor

Why vmdk (create with thin, lazy zeroed thick or eager zeroed thick) has rubbish data

I have more than 3 ESXi hosts with different version(5.5 and 6.0) with specific disk had this problem

I create VM with 4G lazy zeroed vmdk, then I use a Linux LiveCD boot the VM, and hexdump /dev/sda

it shows all 0, this fine

but after I dd if=/dev/zero of=/dev/sda bs=1 count=1,

hexdump /dev/sda show

00000000 0000 0000 0000 0000 0000 0000 0000 0000

*

00001000 rubbish data

...

00100000 0000 0000 0000 0000 0000 0000 0000 0000

*

The rubbish data is other deleted VM has writen to the disk

I known VMFS block size is 1M, and I thought the correct behavior should be zeroed the entire block size

then, I tried thin VMDK, it has same problem

then, I tried eager zeroed thick, when LiveCD is started, directly hexdump /dev/sda, it shows rubbish data, unbelievable!

0 Kudos
1 Reply
dinghui
Contributor
Contributor

I found the reason

Some storage report VAAI Block Zeroing support, so host use VAAI to set zero, but the storage actually did not set zero

0 Kudos