Skip to content

Conversation

palnabarun
Copy link
Contributor

@palnabarun palnabarun commented Sep 4, 2025

Description

When a snapshot is created with memory, the snapshot's state should reflect
the VM's power state at the time of snapshot creation, and when snapshot
is create without memory, the state should be powered off. The simulator
was not setting this state correctly, leading to inconsistencies.

Closes: #(issue-number)

How Has This Been Tested?

Unit tests are added in simulator/virtual_machine_test.go

Manually tested by using the changes against vmware-tanzu/vm-operator#1146

Guidelines

Please read and follow the CONTRIBUTION guidelines of this project.

When a snapshot is created with memory, the snapshot's state should reflect
the VM's power state at the time of snapshot creation, and when snapshot
is create without memory, the state should be powered off. The simulator
was not setting this state correctly, leading to inconsistencies.

Signed-off-by: Nabarun Pal <[email protected]>
@akutz akutz enabled auto-merge September 4, 2025 16:48
Copy link
Member

@akutz akutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks @palnabarun !

Copy link
Contributor

@lubronzhan lubronzhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@akutz akutz merged commit 3676bbf into vmware:main Sep 4, 2025
12 of 13 checks passed
@palnabarun palnabarun deleted the vcsim/support-memory branch September 4, 2025 16:56
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 this pull request may close these issues.

3 participants