krunvm icon indicating copy to clipboard operation
krunvm copied to clipboard

Add -f / --force option to delete

Open c3d opened this issue 2 years ago • 1 comments

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

c3d avatar Jul 06 '23 15:07 c3d

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

Lyamc avatar Feb 11 '24 23:02 Lyamc