Error when trying to power ON the VM running on snapshot: "Unable to enumerate all disks. A required file was not found"
Following message is seen on the VM summary tab: "Some of the disks of the virtual machine failed to load. The information present for them in the virtual machine configuration may be incomplete"
The hard disk shows 0 MB under edit settings of the VM:
The VM's base disk descriptor file (.vmdk) is missing from the VM folder due to which the VM fails to power ON.
This can be verified using the command to list the VM's vSAN objects: esxcli vsan debug object list --all | less
Path: /vmfs/volumes/vsan:########/########/###.vmdk (Missing)
Group UUID: ####
Directory Name: N/A
To resolve the issue, follow the below steps:
Create the descriptor file:
Command: cmmds-tool find -t DOM_OBJECT -f json -u <UUID>
Copy the "addressSpace" details from the output.
Command to create a descriptor file: vmkfstools -c <addressSpace> VM_name.vmdk
Command to create a backup of the vmdk which can be deleted later: cp VM_name.vmdk VM_name.vmdk.bak
Execute the below steps:
Check the snapshot file details and note the parentCID: cat VM_name-snapshot.vmdk
parentCID="###"
Command to fetch the UUID and path of the virtual object (.vmdk): esxcli vsan debug object list --all |less
Output:
Object UUID:"###"
Change the CID and path UUID on the base disk file from the output in step 1 and step 2: vi VM_name.vmdk
Command to update the Path Attribute using an "objtool setAttr" (Object Tool Set Attribute): /usr/lib/vmware/osfs/bin/objtool setAttr -u <Object UUID> -d <Path to VMDK>
Output: Object set attribute succeeded
Command to check the consistency of the snapshot chain on the VM: vmkfstools -e VM_name.vmdk
Output: Disk chain is consistent.