Attempts to power on the VM, consolidate snapshots, or create new snapshots fail with errors similar to the following in the vSphere Client:
Operation failed!
Task name Power On virtual machine
Target example_VM
Status File system specific implementation of Ioctl[file] failed
The parent virtual disk has been modified since the child was created. The content ID of the parent virtual disk does not match the corresponding parent content ID in the child
Unable to enumerate all disks. A required file was not found
An error occurred while deleting a snapshot: A required file was not found.
Task nameRevert snapshot
Targetexample VM
StatusDetected an invalid snapshot configuration.
Task nameCreate virtual machine snapshot
Targetexample VM
StatusAn error occurred while taking a snapshot: The parent of this virtual disk could not be opened.
/var/run/log/hostd.log
) records errors such as:--> The parent virtual disk has been modified since the child was created. The content ID of the parent virtual disk does not match the corresponding parent content ID in the child
--> Cannot open the disk '/vmfs/volumes/example_VM/example_VM-000005.vmdk' or one of the snapshot disks it depends on.
--> Module 'Disk' power on failed.
--> Failed to start the virtual machine.
or:
-->OBJLIB-FILEBE : FileBEOpen: can't open '/vmfs/volumes/example_VM/example VM/example_VM-000005.vmdk' : Could not find the file
-->DISKLIB-DSCPTR: DescriptorOpenInt: failed to open '/vmfs/volumes/example_VM/example VM/example_VM-000005.vmdk' with flags 0x400001: Could not find the file
-->DISKLIB-DSCPTR: DescriptorOpen: Failed to open: The system cannot find the file specified
-->DISKLIB-LINK : DiskLinkOpen: Failed to open '/vmfs/volumes/example_VM/example VM/example_VM-000005.vmdk' : : The system cannot find the file specified
-->DISKLIB-CHAIN : DiskChainOpen: "/vmfs/volumes/example_VM/example VM/example_VM-000005.vmdk": Failed to o
pen parent "/vmfs/volumes/example_VM/example VM/example_VM-000004.vmdk": The system cannot find the file specified
-->DISKLIB-CHAIN : DiskChainOpen: "/vmfs/volumes/example_VM/example VM/example_VM-000005.vmdk": failed to open: The parent of this virtual disk could not be opened.
-->Event 353 : Failed to revert the execution state of the virtual machine example_VM on host esxi01.example.com, in compute resource esxi01.example.com to snapshot VM Snapshot DD/MM/YYYY, 10:58:03 PM, with ID 3
/var/log/vmware/vpxd/vpxd.log
) may display entries similar to the following:--> ERROR task-2115 -- -- example VM -- Drm.ExecuteVmPowerOnLRO: :vim.fault.GenericVmConfigFault
--> Result:
--> (vim.fault.GenericVmConfigFault) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = (vmodl.LocalizableMessage) [
--> (vmodl.LocalizableMessage) {
--> key = "msg.vigor.getAllDisk.error",
--> arg = <unset>,
--> message = "Unable to enumerate all disks."
--> },
--> (vmodl.LocalizableMessage) {
--> key = "msg.snapshot.error-NOTFOUND",
--> arg = <unset>,
--> message = "A required file was not found"
--> }
--> ],
--> reason = "Unable to enumerate all disks."
--> msg = "Unable to enumerate all disks."
VMware vSphere ESXi 8.x
VMware vSphere ESXi 7.x
This issue arises when there is a CID/parentCID mismatch within the virtual machine disk (VMDK) snapshot chain. In a healthy snapshot hierarchy, each snapshot descriptor file contains a unique Content ID (CID), and the subsequent snapshot points back to it through the parentCID field. If these identifiers do not align correctly—due to corruption, incomplete snapshot operations, or manual file manipulation—the snapshot chain becomes inconsistent.
When this mismatch occurs, the virtual machine may fail to power on, snapshots cannot be consolidated, and creating new snapshots may result in errors. Essentially, the VM is unable to determine the correct parent-child relationship between its disk and snapshot files, leading to operational failures until the chain is repaired.
To understand the workings of this script then some knowledge of the snapshot process can be beneficial:
Overview of virtual machine snapshots in vSphere
Best practices for using VMware snapshots in the vSphere environment
1. STEPS TO USE THE SCRIPT:
chmod +x /tmp/snapshot_chain_script.sh
/tmp/snapshot_chain_script.sh
1. Default Mode (Recommended):
Enter the number corresponding to the VM. This allows you to select a VM from the list of VMs registered on the ESXi host. Once you enter the number and press Enter, the script will automatically identify the VMDK directories based on the associated VMX file. This mode is sufficient for most cases.
2. VMX Path Mode:
To use this option, enter 0 (zero) and press Enter. The script will then prompt you to manually provide the path to the VMX file. It will use the specified VMX file to determine the related VMDK directories. This mode is useful if the VM is not registered on any ESXi host.
3. Manual Mode:
To enter this mode, type 00 (double zero) and press Enter. The script will then run directly in the current working directory. Use this mode if the VM is not registered on any ESXi host and/or the VMDKs are not referenced in a VMX file. In this case, the script must be executed from within the directory that contains the VMDKs you want it to process.
If the selected VM is not running on snapshots, or if no VMDKs are found in the directory (which itself could indicate a potential issue if the VM is expected to be running from snapshots), then this output is considered normal. After proceeding, the script will return to the main menu, allowing you to select another VM if needed.
In Manual Mode, however, the script will exit instead of returning to the menu. If further checks are required, it can be re-executed from a different directory.
In the example above, the CID in exampleVM-000004.vmdk (fffffffe
) does not match the parentCID in exampleVM-000005.vmdk (ffcffffe
). This indicates a CID/parentCID mismatch that needs to be corrected.
At this stage, you have two options:
Select 'y' to attempt an immediate repair.
Select 'n' to perform a dry run, which is the recommended approach. In this mode, the script will continue execution, report any detected discrepancies, and allow you to manually review and investigate them before rerunning the script to repair the snapshot chain if necessary.
Another possible cause of the symptoms or errors described in this KB is a missing or renamed VMDK file. The script relies on the “parentFileNameHint” value within the VMDK files in a directory to validate the snapshot chain. If a mismatch is detected between the parentFileNameHint in a VMDK descriptor and the actual name of the parent VMDK file, the script will generate the following error:
In the example above, the script has identified a missing VMDK file. The script is only able to detect this issue, it cannot automatically resolve it. To address the problem, refer to the KB article mentioned in the error message. Once the issue has been corrected, you can re-run the script to perform another scan for CID/parentCID mismatches.
Important Notes and Limitations
The script only validates CID/parentCID consistency. It cannot recreate missing VMDK descriptor files.
VMs or paths containing spaces in their names have been tested successfully.
VMs with certain special characters in their names (e.g., * , ! , $ , "
) are not supported, as these characters may be misinterpreted by bash.
Any VMDKs modified by the script are automatically backed up. The backup path will be displayed on screen—make sure to note it down.
Watch for invalid CIDs/parentCIDs. A valid identifier should be alphanumeric and exactly 8 characters long. The script does not verify this rare condition.
Outside of Manual Mode, the script uses the VMX file to identify the VMDK directories. It then scans all VMDK files within those directories and compares their CID/parentCID values. In rare cases (e.g., a stale VMDK left behind from a failed backup or snapshot consolidation), this may result in a false positive.
The script has been tested on a VM with four disks across four datastores, each having a snapshot chain six levels deep. However, it has not been tested at larger scale.
The script relies heavily on locating VMDKs via the VMX file. If there are snapshot disks not attached to the VM, you should run the script in Manual Mode.
The script has not been tested on vSAN or vVOLs, but it is expected to work.
vVOL considerations:
Understanding virtual machine snapshots within Virtual Volumes (vVols)