VMware Cloud Community

Check VMDK for Corruption

Is there a way to check the integrity of a VMDK file?  The system is reporting numerous I/O errors, and cannot be VMotion'ed to a different LUN.  Other VMS on the same LUN appear to be working normally.

3 Replies


Shut down the VM.

Then from the vSphere host command line run the vmkfstools command.

For details see here:

Vmkfstools - VI-Toolkit



| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva

If I understand your comment - you have numerous I/O generated by Disk file Smiley Happy

Please check below things before you suspect Corruption:

1)     Based on OS version - install tools to analyse the I/O from guest - like Perfmon of Windows

2)     Identify Applications at OS - which can generate I/O

3)    Once you are sure that nothing is wrong with OS - then check for Backup or AV solution problems

------------------------------------------------------------------------- Follow me @ www.vmwareguruz.com Please consider marking this answer "correct" or "helpful" if you found it useful T. Sateesh VCIX-NV, VCAP 5-DCA/DCD,VCP 6-NV,VCP 5 DCV/Cloud/DT, ZCP IBM India Pvt. Ltd
0 Kudos

There are 2 types of I/O errors that you may see in log files while attempting standard operations: physical i/o errors and logical i/o errors.
If I see this I usually first try to clone the vmdk with vmkfstools:

vmkfstools  -i disk-with-i-o-errors.vmdk fixed-disk.vmdk

If that works without vmkfstools-errors you can regard fixed-disk.vmdk as healthy.
If that fails with I/O errors again make sure that  disk-with-i-o-errors.vmdk is used readonly by adding an empty snapshot-delta to it.

vmkfstools  -i disk-with-i-o-errors-000001.vmdk fixed-disk.vmdk

If that works without vmkfstools-errors you can regard fixed-disk.vmdk as healthy.
If that again fails with I/O errors  you probably have VMFS heartbeat corruption on that volume.

Try from esxi-shell or ssh

dd if=disk-with-i-o-errors-flat.vmdk of=fixed-disk-flat.vmdk bs=1M
If that works without errors you can regard fixed-disk-flat.vmdk as healthy.

If that also fails it is time to switch to Linux for the following steps.

Use a Linux VM and connect to an ESXi host that has access to the VMFS-volume.
Connect to a second ESXi with a healthy datastore

mkdir /esxi-in
sshfs -o ro root@esxi-host:/ /esxi-in
mkdir /esxi-out

sshfs root@esxi-host:/ /esxi-out

ddrescue /esxi-in/vmfs/volumes/datastore-damaged/vm-name/disk-with-i-o-errors-flat.vmdk /esxi-out/vmfs/volumes/healthy-datastore/recovery/fixed-disk-flat.vmdk  /esxi-out/vmfs/volumes/healthy-datastore/recovery/fixed-disk-flat.vmdk.log

Make sure to create a log-file !
If this works you can regard the fixed-disk-flat.vmdk as healthy - or better - as the best you can get in this circumstances.
If this also fails you have a real problem and probably should call me or Ontrack for help.

Read the link Wil gave you - easpecially make sure you read about vmkfstools -t 0

Unfortunately ESXi itself has only diagnostic tools but can not help at all when you want to fix any serious errors.
voma may give you some results but those results are not really helpful.

DISCLAIMER: I just describe what I successfully do in such cases  - it may contradict with articles you find in the VMware KB or hear from VMware-support.


Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...