No description, website, or topics provided.
Python Shell Makefile
Latest commit ca9234a Jan 10, 2017 @marmarek marmarek Fix PCI devices reporting
Properly report what devices were actually added.
Permalink
Failed to load latest commit information.
_modules
_states
debian.dom0 debian: Fix broken "state.sls config" statement Dec 23, 2015
rpm_spec
tests tests: Removed unused test Oct 25, 2015
.gitignore
.travis.yml
FORMULA.dom0 version 3.2.0 Jun 7, 2016
LICENSE Initial formula package creation Jul 5, 2015
Makefile Makefile: Added a few formatting line feeds Dec 14, 2015
Makefile.builder
README.rst
version version 3.2.0 Jun 7, 2016

README.rst

QVM Formula

Salt can manage many Qubes settings via the qvm state module.

Management declarations are typically rather simple:

appvm:
  qvm.prefs
    - label: green

Also see _modules/ext_module_qvm.py for inline documentation

Available State Commands

qvm.exists

Verify the named VM is present or exists. Return True only if the named VM exists. Will not create the VM if missing.

qvm.exists:
    - name: <vmname>
        - flags:
            - quiet

qvm.missing

Verify the named VM is missing. Return True only if the named VM is missing. Will not remove the VM if present.

qvm-missing-id:
    qvm.missing:
        - name: <vmname>
        - flags:
            - quiet

qvm.running

Return True is vmname is running.

qvm-running-id:
    qvm.running:
        - name: <vmname>

qvm.halted

Return True is vmname is halted.

qvm-halted-id:
    qvm.halted:
        - name: <vmname>

qvm.start

Start vmname.

qvm-start-id:
    qvm.start:
        - name: <vmname>
        - drive: <string>
        - hddisk: <string>
        - cdrom: <string>
        - custom-config: <string>
        - flags:
            - quiet  # *** salt default ***
            - no-guid  # *** salt default ***
            - tray
            - dvm
            - debug
            - install-windows-tools

qvm.shutdown

Shutdown vmname.

qvm-shutdown-id:
    qvm.shutdown:
        - name: <vmname>
        - exclude: [exclude_list,]
        - flags:
            - quiet
            - force
            - wait
            - all
            - kill

qvm.kill

Kill vmname.

qvm-kill-id:
    qvm.kill:
        - name: <vmname>

qvm.pause

Pause vmname.

qvm-pause-id:
    qvm.pause:
        - name: <vmname>

qvm.unpause

Unpause vmname.

qvm-unpause-id:
    qvm.unpause:
        - name: <vmname>

qvm.present

Make sure the named VM is present. VM will be created if missing.

qvm-present-id:
    qvm.present:
        - name: <vmname>
        - template: fedora-21
        - label: red
        - mem: 3000
        - vcpus: 4
        - root-move-from: </path/xxx>
        - root-copy-from: </path/xxx>
        - flags:
            - proxy
            - hvm
            - hvm-template
            - net
            - standalone
            - internal
            - force-root
            - quiet

qvm.absent

Make sure the named VM is absent. VM will be deleted (removed) if present.

qvm-absent-id:
    qvm.absent:
        - name: <vmname>
        - flags:
            - just-db
            - force-root
            - quiet

qvm.clone

Clone a VM.

qvm-clone-id:
    qvm.clone:
        - name: <vmname>-clone
        - source: <vmname>
        - path: </path/xxx>
        - flags:
            - shutdown
            - quiet
            - force-root

qvm.run

Run command in virtual machine domain.

qvm-run-id:
    qvm.run:
        - name: <vmname>
        - 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

qvm.prefs

Set vmname preferences.

qvm-prefs-id:
    qvm.prefs:
        - name:               <vmname>
        - label:              orange
        - template:           debian-jessie
        - memory:             400
        - maxmem:             4000
        - include-in-backups: True
        - netvm:              sys-firewall
        - pcidevs:            ['04:00.0']
        - kernel:             default
        - vcpus:              2
        - kernelopts:         nopat iommu=soft swiotlb=8192
        - mac:                auto
        - debug:              true
        - default-user:       tester
        - qrexec-timeout:     120
        - internal:           true
        - autostart:          true
        - flags:
            - force-root

List vmname preferences.

qvm-prefs-list1-id:
    qvm.prefs:
        - name: <vmname>
        - action: list

qvm-prefs-list2-id:
    qvm.prefs:
        - name: <vmname>

Get vmname preferences.

qvm-prefs-get-id:
    qvm.prefs:
        - name: <vmname>
        - get:
            - label
            - template
            - memory
            - maxmem
            - include-in-backups

qvm.service

Manage vmname service.

qvm-service-id:
    qvm.service:
        - name: <vmname>
        - enable:
            - test
            - test2
            - another_test
            - another_test2
            - another_test3
        - disable:
            - meminfo-writer
            - test3
            - test4
            - another_test4
            - another_test5
        - default:
            - another_test5
            - does_not_exist
        # list: []
        # list: [string,]

qvm.vm

Wrapper to contain all VM state functions.

  • State:

    • exists
    • missing
    • present
    • absent
    • clone
    • prefs
    • service
  • Power:

    • running
    • halted
    • start
    • shutdown
    • kill
    • pause
    • unpause
    • run

Sample test VM creation containing all of the state actions:

qvm-vm-id:
    qvm.vm:
    - name: <vmname>
    - actions:
        - kill: pass
        - halted: pass
        - absent: pass
        - missing
        - present
        - exists
        - prefs
        - service
        - start
        - running
        - pause
        - unpause
        - shutdown
        - run
        - clone
    - kill: []
    - halted: []
    - absent: []
    - missing: []
    - present:
        - template: fedora-21
        - label: red
        - mem: 3000
        - vcpus: 4
        - flags:
            - proxy
    - exists: []
    - prefs:
        - label: green  # red|yellow|green|blue|purple|orange|gray|black
        - template: debian-jessie
        - memory: 400
        - maxmem: 4000
        - include-in-backups: false
        - netvm: sys-firewall
    - service:
        - enable:
            - test
            - test2
            - another_test
            - another_test2
            - another_test3
        - disable:
            - meminfo-writer
            - test3
            - test4
            - another_test4
            - another_test5
        - default:
            - another_test5
            - does_not_exist
    - start: []
    - running: []
    - pause: []
    - unpause: []
    - shutdown: []
    - run:
        - cmd: gnome-terminal
        - flags:
            - auto