Error: A general system error occurred: Fault cause: vim.fault.GenericVmConfigFault
YYYY-MM-DDTHH:MM:SSZ In(05) vmx 258220-auto-5j8t-h5:70047031-aa-18-569e SNAPSHOT: SnapshotGenerateDeleteDisks Failed to fetch disk tree: One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot (21)YYYY-MM-DDTHH:MM:SSZ In(05) vmx 258220-auto-5j8t-h5:70047031-aa-18-569e SNAPSHOT: SnapshotDeleteNode failed: One of the disks in this virtual machine is already in use by a virtualmachine or by a snapshot (21)
YYYY-MM-DDTHH:MM:SSZ info hostd[2100425] [Originator@6876 sub=Libs opID=md9lpiw8-261013-auto-5lee-h5:70047630-a5-53-84ad user=vpxuser:domain.local\Administrator] SNAPSHOT: SnapshotDiskTreeAddFromSnapshot: Trying to add snapshot VM-NAME-Snapshot851.vmsn to disk /vmfs/volumes<datastores>/vm-directory/vm-name.vmdk which already has snapshot VM-NAME-Snapshot850.vmsn.YYYY-MM-DDTHH:MM:SSZ info hostd[2100425] [Originator@6876 sub=Libs opID=md9lpiw8-261013-auto-5lee-h5:70047630-a5-53-84ad user=vpxuser:domain.local\Administrator] SNAPSHOT: SnapshotGenerateDeleteDisks Failed to fetch disk tree: One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot (21)
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
The vim.fault.GenericVmConfigFault error when deleting a snapshot often stems from an incorrect hierarchy in the virtual machine's .vmsd file. This file, which stores snapshot metadata, may fail to correctly associate with one or more snapshots present on the virtual machine, leading to configuration errors during snapshot operations.
Example of Incorrect .vmsd File Hierarchy:
[root@esxi2:/vmfs/volumes/<datastore_uuid>/ubuntu] cat *.vmsd.encoding = "UTF-8"snapshot.lastUID = "7"snapshot.current = "7"snapshot0.uid = "5"snapshot0.filename = "ubuntu-Snapshot5.vmsn"snapshot0.displayName = "VM Snapshot DATE, TIME"snapshot0.createTimeHigh = "408330"snapshot0.createTimeLow = "-206508375"snapshot0.numDisks = "3"snapshot0.disk0.fileName = "ubuntu.vmdk"snapshot0.disk0.node = "scsi0:0"snapshot0.disk1.fileName = "ubuntu_1.vmdk"snapshot0.disk1.node = "scsi0:1"snapshot0.disk2.fileName = "ubuntu_2.vmdk"snapshot0.disk2.node = "scsi0:2"snapshot.numSnapshots = "3"snapshot1.uid = "6"snapshot1.filename = "ubuntu-Snapshot6.vmsn"snapshot1.parent = "5"snapshot1.displayName = "VM Snapshot DATE, TIME"snapshot1.createTimeHigh = "408330"snapshot1.createTimeLow = "-200076526"snapshot1.numDisks = "3"snapshot1.disk0.fileName = "ubuntu.vmdk" <<< snapshot1.disk0.fileName should be pointing to ubuntu-000001.vmdk instead of ubuntu.vmdk ,and the same applies to the other disks as well>>>snapshot1.disk0.node = "scsi0:0"snapshot1.disk1.fileName = "ubuntu_1.vmdk"snapshot1.disk1.node = "scsi0:1"snapshot1.disk2.fileName = "ubuntu_2.vmdk"snapshot1.disk2.node = "scsi0:2"snapshot2.uid = "7"snapshot2.filename = "ubuntu-Snapshot7.vmsn"snapshot2.parent = "6"snapshot2.displayName = "VM Snapshot DATE, TIME"snapshot2.createTimeHigh = "408330"snapshot2.createTimeLow = "-191878359"snapshot2.numDisks = "3"snapshot2.disk0.fileName = "ubuntu-000002.vmdk"snapshot2.disk0.node = "scsi0:0"snapshot2.disk1.fileName = "ubuntu_1-000002.vmdk"snapshot2.disk1.node = "scsi0:1"snapshot2.disk2.fileName = "ubuntu_2-000002.vmdk"snapshot2.disk2.node = "scsi0:2"
To resolve the issue, follow the below steps:
.vmsd file.cp *.vmsd /var/core/
.vmsd file to check the snapshot chain, ensuring all snapshots are listed in the correct hierarchy.vi <file-name>.vmsd
vmsd with 3 snapshots should look something like this: [root@esxi2:/vmfs/volumes/<datastore-uuid>ubuntu] cat *.vmsd.encoding = "UTF-8"snapshot.lastUID = "7"snapshot.current = "7"snapshot0.uid = "5"snapshot0.filename = "ubuntu-Snapshot5.vmsn"snapshot0.displayName = "VM Snapshot "DATE, TIMEsnapshot0.createTimeHigh = "408330"snapshot0.createTimeLow = "-206508375"snapshot0.numDisks = "3"snapshot0.disk0.fileName = "ubuntu.vmdk"snapshot0.disk0.node = "scsi0:0"snapshot0.disk1.fileName = "ubuntu_1.vmdk"snapshot0.disk1.node = "scsi0:1"snapshot0.disk2.fileName = "ubuntu_2.vmdk"snapshot0.disk2.node = "scsi0:2"snapshot.numSnapshots = "3"snapshot1.uid = "6"snapshot1.filename = "ubuntu-Snapshot6.vmsn"snapshot1.parent = "5"snapshot1.displayName = "VM Snapshot "DATE, TIMEsnapshot1.createTimeHigh = "408330"snapshot1.createTimeLow = "-200076526"snapshot1.numDisks = "3"snapshot1.disk0.fileName = "ubuntu-000001.vmdk"snapshot1.disk0.node = "scsi0:0"snapshot1.disk1.fileName = "Bubuntu_1-000001.vmdk"snapshot1.disk1.node = "scsi0:1"snapshot1.disk2.fileName = "ubuntu_2-000001.vmdk"snapshot1.disk2.node = "scsi0:2"snapshot2.uid = "7"snapshot2.filename = "ubuntu-Snapshot7.vmsn"snapshot2.parent = "6"snapshot2.displayName = "VM Snapshot "DATE, TIMEsnapshot2.createTimeHigh = "408330"snapshot2.createTimeLow = "-191878359"snapshot2.numDisks = "3"snapshot2.disk0.fileName = "ubuntu-000002.vmdk"snapshot2.disk0.node = "scsi0:0"snapshot2.disk1.fileName = "ubuntu_1-000002.vmdk"snapshot2.disk1.node = "scsi0:1"snapshot2.disk2.fileName = "ubuntu_2-000002.vmdk"snapshot2.disk2.node = "scsi0:2"
vim-cmd vmsvc/getallvms | grep <vm-name> (this command will give the vmID)
vim-cmd vmsvc/reload <vm-id>