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

Updating a standalone VM should not shut it down #2555

Open
lorenzog opened this Issue Jan 6, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@lorenzog

lorenzog commented Jan 6, 2017

Qubes OS version (e.g., R3.2):

3.2

Affected TemplateVMs (e.g., fedora-23, if applicable):

N/A


Expected behavior:

If a standalone VM was running, updating it from Qubes VM Manager should not offer to shut it down

Actual behavior:

At the end of a standalone VM update from Qubes VM Manager, the prompt on the terminal window offers to "Press Enter to shut down the template, or Ctrl-C to just close this window"

Steps to reproduce the behavior:

  1. Start a standalone VM and do some work
  2. [when an update is available] press the update button on the VM Manager (blue downward arrow)
  3. At the end of the update, press Enter
  4. The standalone VM shuts down immediately. All applications are irrevocably closed

General notes:

While the request to shut down a template is appreciated and makes sense, my understanding is that standalone VMs "ping" for updates only when in use. In this case, shutting them down makes little sense (I was Doing Stuff!).

Perhaps a way forward could be to remove the prompt to shutdown altogether for standalone VMs.


Related issues:

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jan 6, 2017

Member

While the request to shut down a template is appreciated and makes sense, my understanding is that standalone VMs "ping" for updates only when in use.

More specifically, when the StandaloneVM is running (not necessarily in use).

Perhaps a way forward could be to remove the prompt to shutdown altogether for standalone VMs.

The feature was originally intended for TemplateVMs. It's up to @marmarek to decide whether its application to StandaloneVM is over-broad or intended.

For reference, this is feature #2431.

Member

andrewdavidwong commented Jan 6, 2017

While the request to shut down a template is appreciated and makes sense, my understanding is that standalone VMs "ping" for updates only when in use.

More specifically, when the StandaloneVM is running (not necessarily in use).

Perhaps a way forward could be to remove the prompt to shutdown altogether for standalone VMs.

The feature was originally intended for TemplateVMs. It's up to @marmarek to decide whether its application to StandaloneVM is over-broad or intended.

For reference, this is feature #2431.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jan 7, 2017

Member

I'd say it depends - if you started the StandaloneVM just to update it, automatic shutdown would be desired. Maybe the criteria should not be a VM type, but if the VM was just started?

Anyway, for now, you can simply press Ctrl-C, as the message told you.

Member

marmarek commented Jan 7, 2017

I'd say it depends - if you started the StandaloneVM just to update it, automatic shutdown would be desired. Maybe the criteria should not be a VM type, but if the VM was just started?

Anyway, for now, you can simply press Ctrl-C, as the message told you.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jan 7, 2017

Member

Maybe the criteria should not be a VM type, but if the VM was just started?

I think there would still be users (like @lorenzog?) who intend to:

  1. Start the StandaloneVM.
  2. Update the StandaloneVM.
  3. Continue working in the StandaloneVM (without rebooting it).
Member

andrewdavidwong commented Jan 7, 2017

Maybe the criteria should not be a VM type, but if the VM was just started?

I think there would still be users (like @lorenzog?) who intend to:

  1. Start the StandaloneVM.
  2. Update the StandaloneVM.
  3. Continue working in the StandaloneVM (without rebooting it).
@lorenzog

This comment has been minimized.

Show comment
Hide comment
@lorenzog

lorenzog Jan 9, 2017

@marmarek I think the VM type would make more sense. As @andrewdavidwong was saying, a StandaloneVM checks for updates only when it's on; so a user would never know it needs to update one unless it was already on, in which case turning it off 'by default' seems counter-productive.

It's a minor issue in the end. If you could kindly point me at the utility that does it I can try to give it a go.

lorenzog commented Jan 9, 2017

@marmarek I think the VM type would make more sense. As @andrewdavidwong was saying, a StandaloneVM checks for updates only when it's on; so a user would never know it needs to update one unless it was already on, in which case turning it off 'by default' seems counter-productive.

It's a minor issue in the end. If you could kindly point me at the utility that does it I can try to give it a go.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jan 9, 2017

Member

It's a minor issue in the end. If you could kindly point me at the utility that does it I can try to give it a go.

The script for /etc/qubes-rpc/qubes.InstallUpdatesGUI is here.
You can check you're in standalone VM by combining existence of /var/run/qubes/this-is-appvm (template vm will have /var/run/qubes/this-is-templatevm instead).

Member

marmarek commented Jan 9, 2017

It's a minor issue in the end. If you could kindly point me at the utility that does it I can try to give it a go.

The script for /etc/qubes-rpc/qubes.InstallUpdatesGUI is here.
You can check you're in standalone VM by combining existence of /var/run/qubes/this-is-appvm (template vm will have /var/run/qubes/this-is-templatevm instead).

lorenzog added a commit to lorenzog/qubes-core-agent-linux that referenced this issue Jan 14, 2017

@lorenzog lorenzog referenced this issue in QubesOS/qubes-core-agent-linux Jan 14, 2017

Closed

Shut down after update only if it's a template. #33

@lorenzog

This comment has been minimized.

Show comment
Hide comment
@lorenzog

lorenzog Jan 14, 2017

@marmarek It's a one liner, see if you like it :)

@marmarek It's a one liner, see if you like it :)

lorenzog added a commit to lorenzog/qubes-core-agent-linux that referenced this issue Jan 14, 2017

Shut down after update only if it's a template.
As per discussion in
QubesOS/qubes-issues#2555 (comment)

Signed-off-by: Lorenzo <lorenzo.grespan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment