mirror of
https://github.com/containers/podman.git
synced 2025-11-01 10:45:52 +08: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:
@ -285,8 +285,8 @@ func CheckExclusiveActiveVM(provider vmconfigs.VMProvider, mc *vmconfigs.Machine
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if state == machineDefine.Running {
|
if state == machineDefine.Running || state == machineDefine.Starting {
|
||||||
return fmt.Errorf("unable to start %q: machine %s already running", mc.Name, name)
|
return fmt.Errorf("unable to start %q: machine %s: %w", mc.Name, name, machineDefine.ErrVMAlreadyRunning)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user