An error occurred while consolidating disks: msg.snapshot.error-DUPLICATEDISK
."A general system error occurred: Fault cause: vim.fault.GenericVmConfigFault.
""An error occurred while deleting a snapshot. One of the disks in this virtual machine is already in use by another virtual machine or snapshot."
YYYY-MM-DDTHH:MM:SS | vmx| I120: SNAPSHOT: SnapshotDiskTreeAddFromSnapshot: Trying to add snapshot VMmachine.vmsn to disk /vmfs/volumes/VMmachine-000002.vmdk which already has snapshot VMmachine-SnapshotNNN.vmsn
YYYY-MM-DDTHH:MM:SS | vmx| I120: SNAPSHOT: SnapshotConsolidateWorkItemArrayGet failed: 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:SS verbose hostd[2108658] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/vsan:xxxxxxxxx/xxxxxxx/VM_NAME.vmx opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] Remove snapshot request received: VM Snapshot DD%2fMM%2fYYYY, HH:MM:SS, 0
YYYY-MM-DDTHH:MM:SS info hostd[2108658] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/vsan:xxxxxxx/xxxxxxxxxxxx/VM_NAME.vmx opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] State Transition (VM_STATE_OFF -> VM_STATE_REMOVE_SNAPSHOT)
YYYY-MM-DDTHH:MM:SS info hostd[2108658] [Originator@6876 sub=Libs opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] SNAPSHOT: SnapshotDeleteWork '/vmfs/volumes/vsan:xxxxxxxxxxx/axxxxxxxxxx/VM_NAME.vmx' : 459
YYYY-MM-DDTHH:MM:SS info hostd[2108658] [Originator@6876 sub=Libs opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] SNAPSHOT: SnapshotDiskTreeAddFromSnapshot: Trying to add snapshot VM_NAME-SnapshotNNN.vmsn to disk /vmfs/volumes/vsan:xxxxxxxxx/axxxxxxxxxx/VM_NAME_4.vmdk which already has snapshot VM_NAME-Snapshot421.vmsn.
YYYY-MM-DDTHH:MM:SS info hostd[2108658] [Originator@6876 sub=Libs opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] 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:SS info hostd[2108658] [Originator@6876 sub=Libs opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] SNAPSHOT: SnapshotDeleteNode failed: 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:SS verbose hostd[2108658] [Originator@6876 sub=Vigor.Vmsvc.vm:/vmfs/volumes/vsan:xxxxxxxxx/axxxxxxxxx/VM_NAME.vmx opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] Delete snapshot NNN message: An error occurred while deleting a snapshot: One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot.
-->
YYYY-MM-DDTHH:MM:SS warning hostd[2108658] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/vsan:xxxxxxxx/axxxxxxxx/VM_NAME.vmx opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] Failed to remove snapshot(s): N3Vim5Fault20GenericVmConfigFault9ExceptionE(Fault cause: vim.fault.GenericVmConfigFault
--> )
...
YYYY-MM-DDTHH:MM:SS info hostd[2108658] [Originator@6876 sub=Vimsvc.TaskManager opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca-9894 user=vpxuser:DOMAIN\USERNAME] Task Completed : haTask-xxx-vim.vm.Snapshot.remove-nnnnn Status error
YYYY-MM-DDTHH:MM:SS info vpxa[2114725] [Originator@6876 sub=Default opID=lv43qwff-1812160-auto-12u9t-h5:70148401-60-ca] [VpxLRO] -- ERROR task-4005 -- vpxa -- vpxapi.VpxaService.removeSnapshot: vmodl.fault.SystemError:
--> Result:
--> (vmodl.fault.SystemError) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> reason = "Fault cause: vim.fault.GenericVmConfigFault
--> "
--> msg = "A general system error occurred: Fault cause: vim.fault.GenericVmConfigFault
--> "
--> }
--> Args:
-->
--> Arg vmid:
--> NN
--> Arg removeChildren:
--> false
--> Arg snapshot:
--> 'vim.vm.Snapshot:NNN-snapshot-NNN'
--> Arg disksToConsolidate:
--> (string) [
--> "ds:///vmfs/volumes/vsan:xxxxxxxxxxx/axxxxxxxxxxx/VM_NAME-00000N.vmdk",
--> "ds:///vmfs/volumes/vsan:xxxxxxxxxxx/axxxxxxxxxxx0/VM_NAME-00000N.vmdk",
...
--> "ds:///vmfs/volumes/vsan:xxxxxxxxxxx/axxxxxxxxxxx/VM_NAME_N-00000N.vmdk",
--> "ds:///vmfs/volumes/vsan::xxxxxxxxxxx/axxxxxxxxxxx/VM_NAME_N.vmdk"
--> ]
--> Arg consolidate:
--> true
To resolve this issue, delete the VMSN and VMSD files from the virtual machine locaiton using the steps below.
# cd /vmfs/volumes/Datastore Name/VM_Name/
# mkdir delete-later
# mv *.vmsn ./delete-later
# mv *.vmsd ./delete-later
Note: If you are not seeing the ".vmsn" file (in step# 2) is that you haven't taken a snapshot that includes the active state of the VM.
To clarify: If you took a snapshot with the option below checked, you would see the ".vmsn" file. If the option was unchecked and snapshot taken which means offline snapshot, then ".vmsn" file will not be generated.
Memory file:
A .vmsn file that includes the active state of the virtual machine. Capturing the memory state of the virtual machine lets you revert to a turned on virtual machine state. With nonmemory snapshots, you can only revert to a turned off virtual machine state. Memory snapshots take longer to create than nonmemory snapshots. The time the ESXi host takes to write the memory onto the disk depends on the amount of memory the virtual machine is configured to use.
# vim-cmd vmsvc/getallvms |grep -i VM_NAME
# vim-cmd vmsvc/reload VMID