Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] vcsim: virtualMachine.RootSnapshot is not updated when snapshot is created #2912

Closed
Syuparn opened this issue Jul 23, 2022 · 0 comments · Fixed by #2913
Closed

[BUG] vcsim: virtualMachine.RootSnapshot is not updated when snapshot is created #2912

Syuparn opened this issue Jul 23, 2022 · 0 comments · Fixed by #2913

Comments

@Syuparn
Copy link
Contributor

Syuparn commented Jul 23, 2022

Describe the bug

When a new snapshot is created for a virtual machine in vcsim, RootSnapshot is not updated and remains null.

To Reproduce
Steps to reproduce the behavior:

  1. execute vcsim without any options
  2. run commands below
# create a new snapshot
$ govc snapshot.create -vm DC0_H0_VM0 my-snapshot
# check the snapshot is created
$ govc snapshot.tree -i -vm DC0_H0_VM0
[snapshot-67]  my-snapshot
[snapshot-67]  .
# show RootSnapshot
$ govc vm.info -json DC0_H0_VM0 | jq .VirtualMachines[].RootSnapshot

Expected behavior
A clear and concise description of what you expected to happen.

RootSnapshot contains a moid of the snapshot.

$ govc vm.info -json DC0_H0_VM0 | jq .VirtualMachines[].RootSnapshot
[
  {
    "Type": "VirtualMachineSnapshot",
    "Value": "snapshot-67"
  }
]

Affected version
Please provide details on the version used, e.g. release tag, commit, module version, etc.

  • vcsim 0.29.0

Screenshots/Debug Output
If applicable, add screenshots or debug output to help explain your problem.

RootSnapshot is null.

$ govc vm.info -json DC0_H0_VM0 | jq .VirtualMachines[].RootSnapshot
null

Additional context
Add any other context about the problem here.

VirtualMachine.Snapshot.RootSnapshotList has root snapshot moids as expected.

$ govc vm.info -json DC0_H0_VM0 | jq .VirtualMachines[].Snapshot.RootSnapshotList[].Snapshot
{
  "Type": "VirtualMachineSnapshot",
  "Value": "snapshot-67"
}
Syuparn added a commit to Syuparn/govmomi that referenced this issue Jul 24, 2022
Closes: vmware#2912
Signed-off-by: syuparn <s.hello.spagetti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant