Closed ricab closed 9 months ago
Hi @wolfch-elsevier, let's follow up here.
When asked to stop an instance, Multipass first tries to ssh into it to execute a wall
command, to warn any users that are logged in. It then asks the backend to shut it down.
In your case, Multipass was unable to ssh into the instance then. I am not sure why that would be, especially if you could later shell into it yourself. The POWERDOWN
event shows that Multipass asked the instance to shutdown, but if it was stuck it may have been unable to shutdown cleanly. Note that shutting down can take a while if there are unresponsive internal services, because the system can wait for a few minutes before killing them.
Once you issued the halt
command, it is expected that you couldn't connect to it. However, at that point Multipass would still see it as running until it finished shutting down completely.
When you restart the Multipass daemon, it tries to suspend running instances, to restore their running state when it comes back up. I'm not sure what could have happened with respect to suspension in your situation, but it is expected that running instances resume running state after restarts (including after machine reboots).
If you are still unable to shutdown the instance by regular means (i.e. multipass stop primary
or sudo shutdown -h now
inside the instance), you can kill the corresponding QEMU process. Something like sudo pkill -9 -f qemu-system.*primary
should do it.
FWIW, we've been flirting with the idea of a force stop for a long time, but we always have other things to work on and we haven't been able to see it through yet.
@wolfch-elsevier, I see you posted on #2784 too and eventually overcame the issue, so closing this one.
Just wondering why this issue is closed without a documented fix or workaround on MacOS? I am having this issue now. I only have three instances and only the primary is running and can't stop it.
...then I tried to use the UI icon menu to exit multipass, but that only seems to exit the UI - I still have:
Then I tried to shutdown the instance from within:
Still running! ...and then tried to get back in:
So
halt
just killed the instances'sshd
without fully shutting down the instance.So then I tried to stop/start the multipass daemon in a separate terminal:
...this caused the hanging
multipass stop primary
to output:...then I restarted the service daemon:
Then I checked the state:
Lastly I tried rebooting but that instance IS STILL RUNNING? So now what?
Originally posted by @wolfch-elsevier in https://github.com/canonical/multipass/issues/2319#issuecomment-1888897818