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

[lxd] Multipass not reacting correctly with internally shut down instances #2672

Closed
townsend2010 opened this issue Jul 19, 2022 · 0 comments · Fixed by #2684
Closed

[lxd] Multipass not reacting correctly with internally shut down instances #2672

townsend2010 opened this issue Jul 19, 2022 · 0 comments · Fixed by #2684
Assignees
Labels
Milestone

Comments

@townsend2010
Copy link
Contributor

if you don't use multipass stop, then it's really hard for multipassd to know the state of a VM. That said, we could probably be better at detecting instance states that are modified outside of Multipass when using the LXD driver.

@townsend2010 are you aware that multipass stop --all is not enough to prevent instances from auto-booting the next time the host boots?

Example:

  • An instance is powered off internally, using a command like poweroff
  • multipass stop --all is run on the host machine.
  • Host machine is rebooted, and the instance (unfortunately!) auto-boots, despite both above attempts to prevent that :/

(This should be easily fixable, no?)

PS This is separate from the question as to whether or not Multipass will one day act like a modern BIOS:

there really should be a Multipass/LXD option (rather like in a PC's BIOS/firmware) allowing you to toggle between either of these 2 choices:

  1. Auto-boot VM's/instances after power failure / glitch / etc.
  2. Do NOT auto-boot VM's/instances after power failure / glitch / etc.

Originally posted by @holta in #2610 (comment)

@townsend2010 townsend2010 changed the title [lxd] Multipass not reacting correctly with internally shutdown instances [lxd] Multipass not reacting correctly with internally shut down instances Jul 19, 2022
@townsend2010 townsend2010 added this to the 1.11.0 milestone Jul 19, 2022
@sharder996 sharder996 self-assigned this Jul 22, 2022
bors bot added a commit that referenced this issue Aug 9, 2022
2684: Fix LXD not updating state r=andrei-toterman a=sharder996

LXD instances do not update instance state within multipass when they are externally shutdown (ie. `sudo poweroff` within the instance) and so will reboot them when the daemon restarts. To fix this, we force multipass to update the state of LXD instances before shutting down to ensure that they are put into the correct state when multipass reboots.

Fixes #2672 

Co-authored-by: sharder996 <[email protected]>
bors bot added a commit that referenced this issue Aug 9, 2022
2684: Fix LXD not updating state r=andrei-toterman a=sharder996

LXD instances do not update instance state within multipass when they are externally shutdown (ie. `sudo poweroff` within the instance) and so will reboot them when the daemon restarts. To fix this, we force multipass to update the state of LXD instances before shutting down to ensure that they are put into the correct state when multipass reboots.

Fixes #2672 

Co-authored-by: sharder996 <[email protected]>
bors bot added a commit that referenced this issue Aug 9, 2022
2684: Fix LXD not updating state r=andrei-toterman a=sharder996

LXD instances do not update instance state within multipass when they are externally shutdown (ie. `sudo poweroff` within the instance) and so will reboot them when the daemon restarts. To fix this, we force multipass to update the state of LXD instances before shutting down to ensure that they are put into the correct state when multipass reboots.

Fixes #2672 

Co-authored-by: sharder996 <[email protected]>
@bors bors bot closed this as completed in becdbe0 Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants