mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-10 16:07:38 +00:00
pkg/machine: CheckExclusiveActiveVM should also check for starting
Also make the error message there better. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
1ca93f3fb6
commit
412648207d
1 changed files with 2 additions and 2 deletions
|
|
@ -285,8 +285,8 @@ func CheckExclusiveActiveVM(provider vmconfigs.VMProvider, mc *vmconfigs.Machine
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if state == machineDefine.Running {
|
||||
return fmt.Errorf("unable to start %q: machine %s already running", mc.Name, name)
|
||||
if state == machineDefine.Running || state == machineDefine.Starting {
|
||||
return fmt.Errorf("unable to start %q: machine %s: %w", mc.Name, name, machineDefine.ErrVMAlreadyRunning)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue