Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251579

Re: VM snapshots in a datastore

$
0
0

Since the snapshot files of a VM do not necessarily need to be on the same datastore as the VM homefolder, you could just look at all snapshots and extract those that are on the specific datastore.

Something like this

 

$dsName="MyDS"

foreach($vminGet-VM){  $keys=$vm.ExtensionData.LayoutEx.Snapshot|%{$_.Disk|%{$_.Chain|%{$_.FileKey}}}  $vm.ExtensionData.LayoutEx.File|where {$keys-contains$_.Key-and$_.Name-match$dsName} |
 
Select@{N="VM";E={$vm.Name}},Name
}

Viewing all articles
Browse latest Browse all 251579


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>