summaryrefslogtreecommitdiff
path: root/pkg/machine/config.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2022-01-12 14:48:40 -0600
committerBrent Baude <bbaude@redhat.com>2022-01-12 14:51:25 -0600
commitb7fe25dc2829aee80f02ff625bfc5ae8f6858578 (patch)
treeed78572f6272b4aa0a4bedffcf4ad5996855c15e /pkg/machine/config.go
parent4db1affda6267fc664941691fa4c724f953448ba (diff)
downloadpodman-b7fe25dc2829aee80f02ff625bfc5ae8f6858578.tar.gz
podman-b7fe25dc2829aee80f02ff625bfc5ae8f6858578.tar.bz2
podman-b7fe25dc2829aee80f02ff625bfc5ae8f6858578.zip
Wait for podman stop to complete
if users run podman machine stop && podman machine ls, the status of the machine in the subsequent ls command would running. now we wait for everything to complete for stop so that scripting is more accurate. Fixes: #12815 [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r--pkg/machine/config.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/machine/config.go b/pkg/machine/config.go
index 33a352898..252ad9768 100644
--- a/pkg/machine/config.go
+++ b/pkg/machine/config.go
@@ -29,6 +29,15 @@ type InitOptions struct {
ReExec bool
}
+type QemuMachineStatus = string
+
+const (
+ // Running indicates the qemu vm is running
+ Running QemuMachineStatus = "running"
+ // Stopped indicates the vm has stopped
+ Stopped QemuMachineStatus = "stopped"
+)
+
type Provider interface {
NewMachine(opts InitOptions) (VM, error)
LoadVMByName(name string) (VM, error)