From 35b2d951b2f648632f4b358ddb470acd2a41483f Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Tue, 8 Mar 2022 15:44:40 -0600 Subject: 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 --- docs/source/markdown/podman-machine-rm.1.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/source/markdown/podman-machine-rm.1.md b/docs/source/markdown/podman-machine-rm.1.md index 7c9eb65c5..4eea1d2e4 100644 --- a/docs/source/markdown/podman-machine-rm.1.md +++ b/docs/source/markdown/podman-machine-rm.1.md @@ -23,9 +23,9 @@ is used. Print usage statement. -#### **--force** +#### **--force**, **-f** -Delete without confirmation +Stop and delete without confirmation #### **--save-ignition** @@ -58,6 +58,10 @@ The following files will be deleted: Are you sure you want to continue? [y/N] y ``` +``` +$ podman machine rm -f test1 +$ +``` ## SEE ALSO **[podman(1)](podman.1.md)**, **[podman-machine(1)](podman-machine.1.md)** -- cgit v1.2.3-54-g00ecf From 29e5559cbeec61951306c045c0f85763eba5f059 Mon Sep 17 00:00:00 2001 From: "Jason T. Greene" Date: Fri, 18 Mar 2022 17:29:09 -0500 Subject: Fix type-o and cleanup doc punctuation Signed-off-by: Jason T. Greene --- cmd/podman/machine/rm.go | 14 +++++++------- docs/source/markdown/podman-machine-rm.1.md | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'docs') diff --git a/cmd/podman/machine/rm.go b/cmd/podman/machine/rm.go index 3e5d5fb0b..68e55b071 100644 --- a/cmd/podman/machine/rm.go +++ b/cmd/podman/machine/rm.go @@ -26,7 +26,7 @@ var ( ) var ( - destoryOptions machine.RemoveOptions + destroyOptions machine.RemoveOptions ) func init() { @@ -37,16 +37,16 @@ func init() { flags := rmCmd.Flags() formatFlagName := "force" - flags.BoolVarP(&destoryOptions.Force, formatFlagName, "f", false, "Stop and do not prompt before rming") + flags.BoolVarP(&destroyOptions.Force, formatFlagName, "f", false, "Stop and do not prompt before rming") keysFlagName := "save-keys" - flags.BoolVar(&destoryOptions.SaveKeys, keysFlagName, false, "Do not delete SSH keys") + flags.BoolVar(&destroyOptions.SaveKeys, keysFlagName, false, "Do not delete SSH keys") ignitionFlagName := "save-ignition" - flags.BoolVar(&destoryOptions.SaveIgnition, ignitionFlagName, false, "Do not delete ignition file") + flags.BoolVar(&destroyOptions.SaveIgnition, ignitionFlagName, false, "Do not delete ignition file") imageFlagName := "save-image" - flags.BoolVar(&destoryOptions.SaveImage, imageFlagName, false, "Do not delete the image file") + flags.BoolVar(&destroyOptions.SaveImage, imageFlagName, false, "Do not delete the image file") } func rm(cmd *cobra.Command, args []string) error { @@ -64,12 +64,12 @@ func rm(cmd *cobra.Command, args []string) error { if err != nil { return err } - confirmationMessage, remove, err := vm.Remove(vmName, destoryOptions) + confirmationMessage, remove, err := vm.Remove(vmName, destroyOptions) if err != nil { return err } - if !destoryOptions.Force { + if !destroyOptions.Force { // Warn user fmt.Println(confirmationMessage) reader := bufio.NewReader(os.Stdin) diff --git a/docs/source/markdown/podman-machine-rm.1.md b/docs/source/markdown/podman-machine-rm.1.md index 4eea1d2e4..c9c68d111 100644 --- a/docs/source/markdown/podman-machine-rm.1.md +++ b/docs/source/markdown/podman-machine-rm.1.md @@ -25,15 +25,15 @@ Print usage statement. #### **--force**, **-f** -Stop and delete without confirmation +Stop and delete without confirmation. #### **--save-ignition** -Do not delete the generated ignition file +Do not delete the generated ignition file. #### **--save-image** -Do not delete the VM image +Do not delete the VM image. #### **--save-keys** @@ -42,7 +42,7 @@ deleted. ## EXAMPLES -Remove a VM named "test1" +Remove a VM named "test1": ``` $ podman machine rm test1 -- cgit v1.2.3-54-g00ecf