Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -f / --force option to delete #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

c3d
Copy link

@c3d c3d commented Jul 6, 2023

There are cases where krunvm fails to delete a VM, e.g. because the corresponding container no longer exists. Add a --force (or -f) option to the delete subcommand that forces deletion of the VM configuration in that case.

Fixes: #42

There are cases where krunvm fails to delete a VM, e.g. because the
corresponding container no longer exists. Add a `--force` (or `-f`)
option to the `delete` subcommand that forces deletion of the VM
configuration in that case.

Fixes: containers#42

Signed-off-by: Christophe de Dinechin <[email protected]>
@Lyamc
Copy link

Lyamc commented Feb 11, 2024

Btw I've tested this, and it worked, although for some reason it creates an error twice:

root@macbookair:~/Build/krunvm/target/release# ./krunvm delete asahi-krun
Error: error unmounting container asahi-krun-working-container: container not known
buildah returned an error: 
root@macbookair:~/Build/krunvm/target/release# ./krunvm delete -f asahi-krun
Error: error unmounting container asahi-krun-working-container: container not known
buildah returned an error: 
Error: removing container "asahi-krun-working-container": container not known
buildah returned an error: 
root@macbookair:~/Build/krunvm/target/release# ./krunvm delete -f asahi-krun
No VM found with that name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to delete a VM
2 participants