Attempting to consolidate a snapshot comes back with error message "An error occurred while consolidating disks: msg.snapshot.error-DUPLICATEDISK"
search cancel

Attempting to consolidate a snapshot comes back with error message "An error occurred while consolidating disks: msg.snapshot.error-DUPLICATEDISK"

book

Article ID: 324324

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
Snapshot consolidation fails with error "An error occurred while consolidating disks: msg.snapshot.error-DUPLICATEDISK"
 
You see these errors in the vmware.log file under /vmfs/volumes/Datastore/VMfolder:
 
016-11-15T20:28: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.
2016-11-15T20:28: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)
 


Environment

VMware vSphere ESXi 6.0
VMware vSphere ESXi 5.1
VMware vSphere ESXi 6.5
VMware vSphere ESXi 5.5
VMware vSphere ESXi 5.0

Cause

Snapshot database file vmsd corruption.
 

Resolution

To resolve this issue perform below steps.

  1. Create a temporary folder under VM running datastore.

    mkdir /vmfs/volumes/Datastore Name/temp
     
  2. Navigate to VM folder and backup snapshot state file and snapshot database file by moving to temp folder.

    cd /vmfs/volumes/Datastore Name/VM folder name

    mv vmname-Snapshot#.vmsn /vmfs/volumes/Datastore Name/temp

    mv vmname.vmsd /vmfs/volumes/Datastore Name/temp

     
  3. Get virtual machine ID by using vim-cmd command.

    vim-cmd vmsvc/getallvms
     
  4. Reload the vmx file of the virtual machine with vmid.

    vim-cmd vmsvc/reload vmid
     
  5. Take new snapshot by right clicking on the VM > Snapshot >Take Snapshot.
     
  6. Use snapshot manager to consolidate the disks by clicking Delete All option.