Last week I had a customer with a VM that required virtual disk consolidation, however when he attempted to perform this from the vSphere client it would run for hours and unfortunately fail:
The virtual disk is either corrupted or not a supported format.
I waited till we could get a service window on the VM, performed a shutdown and re-ran the disk consolidation. Still the same error message!
I then used command vim-cmd vmsvc/getallvms to quickly locate the volume containing the VM:
Then checked if there was any locks on the vmdk file:
I have highlighted the line showing us there is a RO (Read-Only) lock on the VMDK file. This is most likely what is causing the disk consolidation to fail. The last part of the line 0026b9564d86 is the mac address of the host locking the file.
Lets lookup if the host running the VM currently is also the host locking the file:
The mac address matched up and a quick Google search revealed the following VMware Knowledge Base article.
As suggested in the article I then performed a vMotion of the VM to a different host and re-tried the disk consolidation.
Finally it finished without errors!
As always, if this helped you please leave a comment! 🙂
Incoming search terms:
- An error occurred while consolidating disks: msg fileio lock
- An error occurred while consolidating disks: msg snapshot error-DISKLOCKED
- msg fileio lock
- msg snapshot error-DISKLOCKED
- virtual machine disks consolidation is needed
- the virtual disk is either corrupted or not a supported format
- An error occurred while consolidating disks: msg snapshot error-NOTFOUND
- an error occurred while consolidating disks msg fileio lock
- An error occurred while consolidating disks: Failed to lock the file