multipass
multipass copied to clipboard
multipass stop --force can not stop suspended vm if it does not have a suspend tag
Describe the bug
multipass stop --force
can not stop suspended vm if it does not have a suspend tag
To Reproduce How, and what happened?
-
multipass launch -n vm1
- Manually delete the snapshot tag of the qemu image.
qemu-img snapshot -d suspend <image_path_of_the_vm>
- Run
multipass stop vm1 --force
ormultipass delete vm1 --purge
stop failed: Failed to delete suspend image: qemu-img failed (Process returned exit code: 1) with output: qemu-img: Could not delete snapshot 'suspend': snapshot not found
Expected behavior What did you expect to happen? Despite the faulty state (lacking a suspend tag but suspended) the VM is in, it should still delete or stop the VM forcefully.
Additional info
- OS: ubuntu 24.04
-
multipass version
: 1.14.0 -
multipass get local.driver
: qemu
Additional context It is a very unusual state to get into, however, it did happen. Thus, to make the code more robust, it would be nice to handle the state gracefully.