Skip to content

Commit

Permalink
Hibernation Cleanup: Start VM only if it is Deallocated (microsoft#3409)
Browse files Browse the repository at this point in the history
At present Cleanup Script tries to start vm irrespective of the
current state of VM.
The change verifies if the VM is deallocated before starting
  • Loading branch information
adityagesh authored Sep 5, 2024
1 parent a104988 commit 7603853
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion microsoft/testsuites/power/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def run_network_workload(environment: Environment) -> Decimal:
def cleanup_env(environment: Environment) -> None:
remote_node = cast(RemoteNode, environment.nodes[0])
startstop = remote_node.features[StartStop]
startstop.start()
if startstop.get_status() == VMStatus.Deallocated:
startstop.start()
for node in environment.nodes.list():
kill = node.tools[Kill]
kill.by_name("iperf3")
Expand Down

0 comments on commit 7603853

Please sign in to comment.