From a0fe2794d84710839aefb4806b686625bc13c3dc Mon Sep 17 00:00:00 2001 From: Raj Chaudhuri Date: Tue, 15 Jun 2021 10:58:40 +0530 Subject: [PATCH] Corrected bug in machine status while getting machine properties --- machine.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/machine.go b/machine.go index 7a27299..c4becb2 100644 --- a/machine.go +++ b/machine.go @@ -296,6 +296,10 @@ func (vh *Machine) get() error { return fmt.Errorf("machine %s not found", vh.name) } + // If machine properties could be retrieved, assume the machine is in + // Stopped state. Parsing the properties may change this. + vh.status = drivercore.MachineStatusStopped + if output != "" { vh.parseProps(output) }