ansible-collections / community.vmware

Ansible Collection for VMware
GNU General Public License v3.0
352 stars 336 forks source link

vmware_guest_snapshot_info shoult return Snapshotsize #1699

Open RalfAlbers opened 1 year ago

RalfAlbers commented 1 year ago
SUMMARY

The module vmware_guest_snapshot_info shout return an VMware.VimAutomation.ViCore.Types.V1.VM.Snapshot object (https://developer.vmware.com/docs/powercli/latest/vmware.vimautomation.core/structures/vmware.vimautomation.vicore.types.v1.vm.snapshot/) like it the get-snapshot PowerCLI command does. The you can get for example also the size of each snapshot.

ISSUE TYPE
COMPONENT NAME

vmware_guest_snapshot_info

goland10 commented 10 months ago

Any progress ?

mariolenz commented 10 months ago

I don't find anything in the API to get the snapshot size. I've no idea where the UI or PowerCLI get this information :-/

ihumster commented 10 months ago

@mariolenz I believe you need to start from the size in vim.vm.FileLayoutEx.FileInfo of each delta file from vm_moref.config.layoutEx.file. The file type must be 'snapshotData' (from vim.vm.FileLayoutEx.FileType).

Unfortunately, I now do not have access to my VI laboratory and will not be able to write working code without it.