summaryrefslogtreecommitdiff
path: root/pkg/machine/config.go
diff options
context:
space:
mode:
authorAshley Cui <acui@redhat.com>2021-04-28 14:18:28 -0400
committerAshley Cui <acui@redhat.com>2021-04-28 15:09:10 -0400
commit53057d5c20b2abf7ffc672972cbc83018ba0ed6c (patch)
treee0dbb98e5d80dc8726d5bf5ad8640be5edc60f02 /pkg/machine/config.go
parent476c76f580d5cd092ff958765af36857b2a68d6c (diff)
downloadpodman-53057d5c20b2abf7ffc672972cbc83018ba0ed6c.tar.gz
podman-53057d5c20b2abf7ffc672972cbc83018ba0ed6c.tar.bz2
podman-53057d5c20b2abf7ffc672972cbc83018ba0ed6c.zip
Check if another VM is running on machine start
Only one VM can be up at a time. If another VM is running, or the current VM is running, error out on a podman machine start [NO TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r--pkg/machine/config.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/machine/config.go b/pkg/machine/config.go
index 32b3b5c2b..652229963 100644
--- a/pkg/machine/config.go
+++ b/pkg/machine/config.go
@@ -30,6 +30,8 @@ var (
DefaultIgnitionUserName = "core"
ErrNoSuchVM = errors.New("VM does not exist")
ErrVMAlreadyExists = errors.New("VM already exists")
+ ErrVMAlreadyRunning = errors.New("VM already running")
+ ErrMultipleActiveVM = errors.New("only one VM can be active at a time")
)
type Download struct {