In what scenarios is vm.Snapshot.CurrentSnapshot nil? #3951
Replies: 1 comment
-
|
Google search for:
returns this via Google Gemini:
This seems to line up with the idea that when snapshots are being consolidated that there are snapshots, but none are current. Using the "Dive deeper in AI Mode" option yields:
A different search for
Example code provided by Google Gemini for dealing with the scenario:
and with closing comments:
Ultimately, I think this is the relevant bit:
Do I have the correct understanding? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The documentation for the field notes:
I don't fully understand what "root of the snapshot tree" means. I initially assumed this meant when someone selected the first snapshot in a list and opted to revert to that snapshot or immediately after the first snapshot was created, but I'd assume that the "current snapshot" would be either of those cases: the one you reverted to or the first snapshot created.
In short, I'm attempting to both understand the explicit meaning of that field and determine whether it should always be set when a snapshot is present for a virtual machine.
I found this simulator code which indicates that when both
vm.Snapshotandvm.Snapshot.CurrentSnapshotare non-nil then snapshots are present:govmomi/simulator/virtual_machine.go
Lines 1942 to 1946 in 55b758a
Is this reliable?
Beta Was this translation helpful? Give feedback.
All reactions