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

reinstall template documentation: recommend qubesctl state.highstate #2157

Open
adrelanos opened this Issue Jul 7, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@adrelanos
Member

adrelanos commented Jul 7, 2016

https://www.qubes-os.org/doc/reinstall-template/ - Please consider adding the following.

sudo qubesctl state.highstate

That would invoke salt.
https://www.qubes-os.org/doc/salt/

And thereby in case of Whonix (which is currently used as an example in the replace template documentation) create a TemplateBased ProxyVM sys-whonix.

@andrewdavidwong andrewdavidwong added this to the Documentation/website milestone Jul 9, 2016

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jul 9, 2016

Member

I haven't had a chance to learn how to use salt yet. Is it simply a matter of adding that one line somewhere? Would you consider submitting a PR?

Member

andrewdavidwong commented Jul 9, 2016

I haven't had a chance to learn how to use salt yet. Is it simply a matter of adding that one line somewhere? Would you consider submitting a PR?

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Jul 9, 2016

Member

Can do. Before doing so, I would like to appreciate feedback if this is a sane idea.

It would be the last command to run, i.e. 7.. As far as I understand, it cannot hurt either way.

Do you think this is a sane idea? @marmarek

Member

adrelanos commented Jul 9, 2016

Can do. Before doing so, I would like to appreciate feedback if this is a sane idea.

It would be the last command to run, i.e. 7.. As far as I understand, it cannot hurt either way.

Do you think this is a sane idea? @marmarek

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jul 9, 2016

Member

qubesctl state.highstate will apply whatever configuration is enabled - most likely what was set in firstboot. For example if someone initially created sys-usb, but later removed it, it will be recreated. Same applies to default VMs and others. It will not remove any data (we don't have any formula removing VMs, but technically it would be possible).
So, before running, I'd advise to review what is enabled:

qubesctl top.enabled

And if necessary, disable unneeded entries with qubesctl top.disable.

Member

marmarek commented Jul 9, 2016

qubesctl state.highstate will apply whatever configuration is enabled - most likely what was set in firstboot. For example if someone initially created sys-usb, but later removed it, it will be recreated. Same applies to default VMs and others. It will not remove any data (we don't have any formula removing VMs, but technically it would be possible).
So, before running, I'd advise to review what is enabled:

qubesctl top.enabled

And if necessary, disable unneeded entries with qubesctl top.disable.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jul 10, 2016

Member

So, that step would have to say something like:

Run qubesctl top.enabled to see the current configuration. If it looks good, then run qubesctl state.highstate to apply it. If there are unneeded entries, use qubesctl top.disable to disable them.

Right?

The problem I foresee is that most users won't know (at least one of) the following:

  • How to read the output of qubesctl top.enabled
  • How to read the files in /srv/salt/_tops/base/
  • Whether the current configuration is correct for their needs
  • Whether any entries are unneeded and should be disabled

We shouldn't expect users to know these things without giving them any way to learn. So, first, we need to document Salt itself from a user's perspective (#1983), or at least point them to some existing documentation elsewhere (does any exist?).

Member

andrewdavidwong commented Jul 10, 2016

So, that step would have to say something like:

Run qubesctl top.enabled to see the current configuration. If it looks good, then run qubesctl state.highstate to apply it. If there are unneeded entries, use qubesctl top.disable to disable them.

Right?

The problem I foresee is that most users won't know (at least one of) the following:

  • How to read the output of qubesctl top.enabled
  • How to read the files in /srv/salt/_tops/base/
  • Whether the current configuration is correct for their needs
  • Whether any entries are unneeded and should be disabled

We shouldn't expect users to know these things without giving them any way to learn. So, first, we need to document Salt itself from a user's perspective (#1983), or at least point them to some existing documentation elsewhere (does any exist?).

@tasket

This comment has been minimized.

Show comment
Hide comment
@tasket

tasket Aug 8, 2016

@adrelanos I reinstalled Whonix from the testing repo, but did not use qubesctl state.highstate to avoid problems with my customizations. There should be a more specific script or entrypoint somewhere that accomplishes the same task for Whonix; I would change the setup instructions to use that approach instead.

tasket commented Aug 8, 2016

@adrelanos I reinstalled Whonix from the testing repo, but did not use qubesctl state.highstate to avoid problems with my customizations. There should be a more specific script or entrypoint somewhere that accomplishes the same task for Whonix; I would change the setup instructions to use that approach instead.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 8, 2016

Member

@ttasket See #2173 . In short, in R3.2 after installation all those states are disabled (after applying the configuration). So if you later run qubesctl state.highstate it will no longer revert any of your changes. If you want to enable creation of Whonix VMs, you need to enable those states explicitly:

qubesctl top.enable qvm.sys-whonix
qubesctl top.enable qvm.anon-whonix
qubesctl state.highstate

But in R3.1, all the states are left enabled after installation.

Member

marmarek commented Aug 8, 2016

@ttasket See #2173 . In short, in R3.2 after installation all those states are disabled (after applying the configuration). So if you later run qubesctl state.highstate it will no longer revert any of your changes. If you want to enable creation of Whonix VMs, you need to enable those states explicitly:

qubesctl top.enable qvm.sys-whonix
qubesctl top.enable qvm.anon-whonix
qubesctl state.highstate

But in R3.1, all the states are left enabled after installation.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Oct 19, 2017

Member

In Qubes R4 it should be the default and recommended way to install Whonix using salt - otherwise the dom0 setup of Qubes updates proxy qrexec policy gets too cumbersome for most users.

Member

adrelanos commented Oct 19, 2017

In Qubes R4 it should be the default and recommended way to install Whonix using salt - otherwise the dom0 setup of Qubes updates proxy qrexec policy gets too cumbersome for most users.

@tasket

This comment has been minimized.

Show comment
Hide comment
@tasket

tasket Oct 19, 2017

Re-reading this thread, questions come to mind:

Are the VM setup procedures necessary in a template re-installation guide? Or is this recommendation for the sake of completeness in the case that the setup hasn't been done yet (noting also that the Whonix install doc shows manual setup not qubesctl)? Should both docs be changed?

tasket commented Oct 19, 2017

Re-reading this thread, questions come to mind:

Are the VM setup procedures necessary in a template re-installation guide? Or is this recommendation for the sake of completeness in the case that the setup hasn't been done yet (noting also that the Whonix install doc shows manual setup not qubesctl)? Should both docs be changed?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Oct 19, 2017

Member

Well, since template reinstall is currently completely broken on R4 (#3169), it is hard to say. Depending on how reinstall will work. If it will only replace root (and private?) volume, but preserve other settings - which is how I see it currently, then no.

Member

marmarek commented Oct 19, 2017

Well, since template reinstall is currently completely broken on R4 (#3169), it is hard to say. Depending on how reinstall will work. If it will only replace root (and private?) volume, but preserve other settings - which is how I see it currently, then no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment