AppleHV: update LastUp time

LastUp now correctly reports the lastUp time for podman machine on
AppleHV, for both inspect and list.

[NO NEW TESTS NEEDED]
since this fixes an existing failing test.

Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
Ashley Cui 2024-01-12 11:43:13 -05:00
parent e06abd1840
commit f374e07fb0
1 changed files with 6 additions and 1 deletions

View File

@ -759,8 +759,13 @@ func (m *MacMachine) Stop(name string, opts machine.StopOptions) error {
logrus.Error(err)
}
}()
if err := m.Vfkit.Stop(false, true); err != nil {
return err
}
return m.Vfkit.Stop(false, true)
// keep track of last up
m.LastUp = time.Now()
return m.writeConfig()
}
// getVMConfigPath is a simple wrapper for getting the fully-qualified