From 7603853be5217a0530b179a000895fc1a4d6f916 Mon Sep 17 00:00:00 2001 From: Aditya Nagesh Date: Fri, 6 Sep 2024 02:17:52 +0530 Subject: [PATCH] Hibernation Cleanup: Start VM only if it is Deallocated (#3409) 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 --- microsoft/testsuites/power/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/microsoft/testsuites/power/common.py b/microsoft/testsuites/power/common.py index 242cc42dfe..61af6c0f2c 100644 --- a/microsoft/testsuites/power/common.py +++ b/microsoft/testsuites/power/common.py @@ -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")