Error: msg.snapshot.error-DUPLICATEDISK encountered while deleting or consolidating a VM snapshot.
search cancel

Error: msg.snapshot.error-DUPLICATEDISK encountered while deleting or consolidating a VM snapshot.

book

Article ID: 324324

calendar_today

Updated On: 04-10-2025

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

Symptoms:

  • Snapshot consolidation fails with an error: "An error occurred while consolidating disks: msg.snapshot.error-DUPLICATEDISK."
  • Alternate error: "A general system error occurred: Fault cause: vim.fault.GenericVmConfigFault."
  • In the vCenter UI: Some of the virtual machine's disks failed to load, and the information for these disks in the virtual machine configuration may be incomplete.
  • Remove all snapshots: "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."
  • In the vmware.log located at at /vmfs/volumes/Datastore/VMfolder, you will entries similar to:

YYYY-MM-DDTHH:MM:15.820Z| vmx| I120: SNAPSHOT: SnapshotDiskTreeAddFromSnapshot: Trying to add snapshot VMmachine.vmsn to disk /vmfs/volumes/VMmachine-000002.vmdk which already has snapshot VMmachine-Snapshot273.vmsn
YYYY-MM-DDTHH:MM:15.820Z| 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)

  • In the var/log/hostd.log on the ESXi host, you will see entries similar to:

YYYY-MM-DDTHH:MM:07.906Z 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:07.906Z 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:07.929Z 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:08.020Z 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-Snapshot455.vmsn to disk /vmfs/volumes/vsan:xxxxxxxxx/axxxxxxxxxx/VM_NAME_4.vmdk which already has snapshot VM_NAME-Snapshot421.vmsn.
YYYY-MM-DDTHH:MM:08.020Z 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:08.020Z 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:08.030Z 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 459 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:08.030Z 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:08.771Z 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-905-vim.vm.Snapshot.remove-393586 Status error

  • In the var/log/vpxa.log on the ESXi host, you will see entries similar to:

YYYY-MM-DDTHH:MM:08.778Z 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:
--> 75
--> Arg removeChildren:
--> false
--> Arg snapshot:
--> 'vim.vm.Snapshot:905-snapshot-459'
--> Arg disksToConsolidate:
--> (string) [
-->    "ds:///vmfs/volumes/vsan:xxxxxxxxxxx/axxxxxxxxxxx/VM_NAME-000001.vmdk",
-->    "ds:///vmfs/volumes/vsan:xxxxxxxxxxx/axxxxxxxxxxx0/VM_NAME-000002.vmdk",
...
-->    "ds:///vmfs/volumes/vsan:xxxxxxxxxxx/axxxxxxxxxxx/VM_NAME_5-000005.vmdk",
-->    "ds:///vmfs/volumes/vsan::xxxxxxxxxxx/axxxxxxxxxxx/VM_NAME_5.vmdk"
--> ]
--> Arg consolidate:
--> true

 

Environment

  • VMware vCenter Server 7.x
  • VMware vCenter Server 8.x
  • VMware vSphere ESXi 7.x
  • VMware vSphere ESXi 8.x

Cause

  • This issue occurs when the snapshot database file(vmsd) is corrupted

Resolution

To resolve this issue, delete the VMSN and VMSD files from the virtual machine locaiton using the steps below.

 

  1. Power off the affected virtual machine
  2. Go to the VM directory
    # cd /vmfs/volumes/Datastore Name/VM_Name/
  3. Create a temporary directory and back up the snapshot state file and snapshot database file by moving them there.
    # 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.

  4. Obtain the virtual machine ID using the vim-cmd command.
    # vim-cmd vmsvc/getallvms |grep -i VM_NAME
  5. Reload the virtual machine's VMX file using the VMID.
    # vim-cmd vmsvc/reload VMID
  6. Create a new snapshot by right-clicking the VM, selecting Snapshot, and then choosing "Take Snapshot."
  7. Use the Snapshot Manager to consolidate the disks by selecting the "Delete All" option.
  8. Verify that the VM is functioning correctly, then delete the temporary directory created in step 2.

Additional Information