mirror of
https://github.com/containers/podman.git
synced 2025-06-01 01:00:22 +08:00
machine rm -f stops and removes machine
If you want to remove a running machine, you can now pass the --force/-f to podman machine rm and the machine will be stopped and removed without confirmations. Fixes: #13448 [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -679,7 +679,7 @@ func (v *MachineVM) Remove(name string, opts machine.RemoveOptions) (string, fun
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
if running {
|
||||
if running && !opts.Force {
|
||||
return "", nil, errors.Errorf("running vm %q cannot be destroyed", v.Name)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user