Skip to content

Applying the States

Skyper edited this page Apr 2, 2018 · 7 revisions

All the commands described in this page must be applied from dom0's console.

Applying all the States

To apply all the states contained in the formula:

sudo qubesctl --all state.highstate

Applying only one Specific State

To apply only one specific state, it is needed to use state.sls instead of state.highstate:

sudo qubesctl --all state.sls <SLS filename>

For example:

sudo qubesctl --all state.sls my-config.vim

The above command will apply the state my-config.vim to all VMs (including dom0) regardless of the top file. To apply a state file to only some specific VMs, you need to use the --skip-dom0 and the --targets options (see the Selecting your Target(s) section).

Displaying the Output

By default, no output will be displayed when a state is applied to a VM. To display the output, the --show-output option must be used:

sudo qubesctl --show-output --all state.highstate

Selecting your Target(s)

You can specify your targets with the --targets option (comma separated list):

sudo qubesctl --targets custom-untrusted,custom-work state.highstate

Note that dom0 is always targeted except if you use the --skip-dom0 option. Also, if you don't use neither the --all nor the --targets option, only dom0 will be targeted.