VMware Cloud Community
ColinM_42
Contributor
Contributor
Jump to solution

Snapshots unable to be deleted

I have a FreeNAS iSCSI target for my ESX home lab and for the past 6 months there have been no issues.   FreeNAS has a connection to vcenter, snapshots are created and deleted without issue, at least until a day or so ago.

The following appears in the log files:

2020-05-02T02:39:26.136Z| vmx| I125: SNAPSHOT: SnapshotDiskTreeAddFromSnapshot: Trying to add snapshot Zoneminder-Snapshot795.vmsn to disk /vmfs/volumes/5c16a659-4a9c6db4-1f67-0026552a4480/Zoneminder/Zoneminder.vmdk which already has snapshot Zoneminder-Snapshot794.vmsn.

2020-05-02T02:39:26.136Z| vmx| I125: 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)

2020-05-02T02:39:26.136Z| vmx| I125: SNAPSHOT: SnapshotDeleteNode failed: One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot (21)

2020-05-02T02:39:26.136Z| vmx| I125: SNAPSHOT: Snapshot_Delete failed: One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot (21)

2020-05-02T02:39:26.136Z| vmx| I125: VigorTransport_ServerSendResponse opID=58ae3542-46d2-4edc-9737-bc6879965ac0-178647-h5c:70019940-2d-b5-37c2 seq=15840737: Completed Snapshot request.

The message:  Trying to add snapshot to disk which already has snapshot...  Does this mean that the snapshot has already been consolidated and the snapshot file hasn't been removed correctly?  I can create new snapshots, but cannot delete them.

I've looked through the vmsd file and matched all the snapshot names, everything seems to line up.  Now I'm stuck with two VM's with about 15 un-removable snapshots on each.

Not quite sure where to go next and would appreciate a little assistance.

Thanks!

Tags (1)
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

The below assumes that you don't want/need the snapshots anymore, and that you want to preserve the VM's current state. Furthermore, I assume that there's sufficient free disk space on the datatore to delete/consolidate the snapshots.

  1. in case you are using VM based backup software, ensure that there's no "hanging" open task, and that the VM's virtual disk is not attached (hot-added) to one of the backup server's proxies.
  2. shutdown the VM
  3. open the console, or a putty session to the host
  4. verify that the VM's configuration (.vmx) file doesn't contain multiple entries for the same virtual disk (e.g. base, as well as a snapshot)
  5. delete, or rename the VM's .vmsd file
  6. reload the VM (follow steps 2+3 from https://kb.vmware.com/s/article/1026043)
  7. create another snapshot
  8. if that works - run "Delete All" from the Snapshot Manager to merge all deltas into the VM's base disk.
  9. once done you may cleanup/delete any remaining "Zoneminder-Snapshot*.*" files from the VM's folder

Please note, that you cannot power on the VM while the snapshot deletion is in progress. If you need to have the VM up, and running, power it on after creating the snapshot (step 7).

In doubt, feel free to ask before proceeding with the next steps.

André

View solution in original post

4 Replies
RajeevVCP4
Expert
Expert
Jump to solution

You required to validate parent id and child id of all disk.

Follow this KB

VMware Knowledge Base

Rajeev Chauhan
VCIX-DCV6.5/VSAN/VXRAIL
Please mark help full or correct if my answer is use full for you
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

The below assumes that you don't want/need the snapshots anymore, and that you want to preserve the VM's current state. Furthermore, I assume that there's sufficient free disk space on the datatore to delete/consolidate the snapshots.

  1. in case you are using VM based backup software, ensure that there's no "hanging" open task, and that the VM's virtual disk is not attached (hot-added) to one of the backup server's proxies.
  2. shutdown the VM
  3. open the console, or a putty session to the host
  4. verify that the VM's configuration (.vmx) file doesn't contain multiple entries for the same virtual disk (e.g. base, as well as a snapshot)
  5. delete, or rename the VM's .vmsd file
  6. reload the VM (follow steps 2+3 from https://kb.vmware.com/s/article/1026043)
  7. create another snapshot
  8. if that works - run "Delete All" from the Snapshot Manager to merge all deltas into the VM's base disk.
  9. once done you may cleanup/delete any remaining "Zoneminder-Snapshot*.*" files from the VM's folder

Please note, that you cannot power on the VM while the snapshot deletion is in progress. If you need to have the VM up, and running, power it on after creating the snapshot (step 7).

In doubt, feel free to ask before proceeding with the next steps.

André

ColinM_42
Contributor
Contributor
Jump to solution

Thank you!  That did the trick. 


I just moved the uneeded files to a temp folder for now, but the VM came up without issue.

Now on to determining the root cause of all this.  vCenter, or FreeNAS?

Thanks again!

0 Kudos
rajmellvin
Contributor
Contributor
Jump to solution

Hi,

 

I had the same issue. I powered off the VM. Did a storage Vmotion to another datastore. Then took a manual snapshot. And deleted all snapshots from UI and was able to get my disk consolidation completed.

Thanks

Raj

0 Kudos