Merge pull request #21246 from ashley-cui/lastupapplehv

AppleHV: update LastUp time
This commit is contained in:
openshift-merge-bot[bot] 2024-01-12 19:41:40 +00:00 committed by GitHub
commit 17831420a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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