How can I check whether a VM snapshot has linke… |VMware Communities

I have a powercli script that creates linked clones from a set of master VMs, and another powercli script that removes snapshots older than 5 days on the set of master VMs.


Sometimes the cleanup script would delete snapshots that still has linked clones created from it. Everything will still work: the master VM would show that the snapshot has been deleted, and the linked clones would still run. However, when I go into the storage, the actual snapshot vmdk file still exists (which explains why the linked clone can still run). But the problem is that, even when the linked clone is deleted, this snapshot vmdk file continues to exist! There doesn’t seem to be any way to delete it unless I make sure there are no more linked clones and do a “delete all” of the snapshots.


So I am thinking, is there a way to get my cleanup script to check whether there are any linked clones that are dependent on a snapshot before I delete it.


Alternatively, is there a way (preferably via powercli) to trigger vsphere to can for redundant snapshot files, so that I can clean them up using the snapshot “consolidation” feature?

Source link


To see the full content, share this page by clicking one of the buttons below

Related Articles

Leave a Reply