Salt documentation

Hello everyone,

I would like to know if there is a more complete documentation of wht we can actually do with salt .sls files on Qubes, or a description of the qvm function and all its available parameters,

for the moment I’ve found /srv/formulas/test/qvm-formula/qvm/init.sls that covers a large variety of possibilities but I wonder if there is a doc somewhere here that details it.

Because:salt’s doc for Qubes is far too light for me, like what are the different flags we can use, how to make the vm auto start and all.

Thanks for the answers.

Edsiot

1 Like

The flags are the same as for Qubes OS command line tools:
Qubes OS CLI tool - salt states etc
qvm-prefs - qvm.prefs
qvm-service - qvm.service
qvm-features - qubes:features
qvm-tags - qvm:tags
etc

So you can read the CLI tools manual and it’ll be the same for salt.

E.g. you want to enable qube autostart, this is done by setting autostart option for the qube using qvm-prefs CLI tool. The same autostart option is used in qvm.prefs salt state.
You can read the qvm-prefs manual in dom0:

man qvm-prefs

And you can read about the autostart option there:

       autostart
              Property type: bool

              Start the VM during system startup. The default netvm is autostarted regardless of this setting.

thanks a lot, I thought it was the auto flag that was making the autostart, what is it used for then ?

Are you referring to the auto flag here?

#===============================================================================
# Run 'gnome-terminal' in VM                                             qvm-run
#
# TODO: Test auto-start
#===============================================================================
{% if 'qvm-run' in tests %}
qvm-run-id:
  qvm.run:
    - name: {{ test_vm_name }}
    - cmd: gnome-terminal
    # user: <string>
    # exclude: [sys-net, sys-firewall]
    # localcmd: </dev/null>
    # color-output: 31
    - flags:
      # quiet
      - auto
      # tray
      # all
      # pause
      # unpause
      # pass-io
      # nogui
      # filter-escape-chars
      # no-filter-escape-chars
      # no-color-output
{% endif %}

It’s a flag for qvm-run CLI tool, you can see in it’s manual:

$ man qvm-run
...
       --auto, --autostart, -a
              Ignored. Qube is autostarted by default.
1 Like