ESXI VM SNAPSHOTS REMOVAL HANGS AT 99%

Sharing is caring!

1. Make sure SSH service is running on the ESXi host
Navigate to configuration -> security profile -> services -> Click on Properties
Once SSH is enabled, connect to the ESXi host using your favorite ssh client.

2. Run -> vim-cmd vmsvc/getallvms

Find the vmid of the virtual machine, e.g 14.
3. Now run -> vim-cmd vmsvc/get.tasklist 14

4. Find the removeallsnapshots task # then run:
vim-cmd vimsvc/task_info 185720854 If you see:  “The object has already been deleted or has not been completely created” or similar, your snapshot removal is probably frozen, but in order to be sure, let’s look at the file sizes and make sure nothing is changing.

5. cd into the datastore where the vm is located.
The path is /vmfs/volumes/datastore-name/vm-name

6. Now Run ->  watch -d ‘ls -lut | grep -E “delta|flat|sesparse”‘
Take notice on the file sizes and make sure they stay the same. If they are changing, the snapshot removal process is still working and I would just wait it out. Don’t risk data loss!
7. If the data file sizes doesn’t change for a long time ( 1-2 hours, just to be safe)
Restart the vpxa service on the ESXi host.
Configuration -> security profile -> services -> properties -> vpxa ->options ->restart

OR RUN following command to restart management services
 /sbin/services.sh restart

Note: You will lose connectivity with the host from vCenter, just reconnect after a minute.

8. Go back to the SSH terminal and re-run the command:
watch -d ‘ls -lut | grep -E “delta|flat|sesparse”‘

-this>

2 comments

  1. Yes data can corrupt if you disrupt snapshot but you may can look under the hood to create storage level snapshot or duplicate particular data store or drive to avoid data corruption

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.