multipass icon indicating copy to clipboard operation
multipass copied to clipboard

multipass stop --force can not stop suspended vm if it does not have a suspend tag

Open georgeliao opened this issue 6 months ago • 0 comments

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?

  1. multipass launch -n vm1
  2. Manually delete the snapshot tag of the qemu image. qemu-img snapshot -d suspend <image_path_of_the_vm>
  3. Run multipass stop vm1 --force or multipass 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.

georgeliao avatar Aug 05 '24 09:08 georgeliao