Qubes XML specification

This is the documentation of qubes.xml autogenerated from RelaxNG source.

Quick example, worth thousands lines of specification:

<?xml version="1.0" encoding="utf-8" ?>
<qubes version="3.0">
    <properties>
        <property name="default_netvm" ref="domain-1" />
    </properties>

    <labels>
        <label id="label-1" color="#cc0000">red</label>
    </labels>

    <domains>
        <domain class="QubesVM" id="domain-1">
            <properties>
                <property name="qid">1</property>
                <property name="name">netvm</property>
                <property name="label" ref="label-1" />
            </properties>

            <features>
                <feature name="meminfo-writer"></feature>
                <feature name="qubes-firewall">1</feature>
            </features>

            <devices class="pci">
                <device backend-domain="dom0" id="01_23.4">
                  <option name="no-strict-reset">True</option>
                </device>
            </devices>
        </domain>

        <domain class="QubesVM" id="domain-2">
            <properties>
                <property name="qid">2</property>
                <property name="name">appvm</property>
                <property name="label" ref="label-1" />
            </properties>

            <tags>
                <tag name="userdef">qwe123</tag>
            </tags>
        </domain>
    </domains>
</qubes>

<!--
vim: ts=4 sw=4 et
-->

Element: device

One device. It’s identified by a pair of backend domain and some identifier (device class dependant).

Attributes

attribute

req.

type

value

description

backend-domain

yes

string

[a-z0-9_]+

Backend domain name.

id

yes

string

[0-9a-f]{2}_[0-9a-f]{2}.[0-9a-f]{1}

Child elements

element

number

option

*

Element: devices

Container for devices of particular class.

Attributes

attribute

req.

type

value

description

class

yes

pci

Class of devices in this container. Currently the only supported is pci.

Child elements

element

number

device

+

Element: domain

One Qubes domain.

Attributes

attribute

req.

type

value

description

class

yes

string

Type of the domain. This specifies Python’s class that is used for instantiation of this VM.

id

yes

string

domain-[0-9]+

XML id attribute used for cross-referencing in properties’ ref attribute.

Child elements

element

number

properties

1

features

?

tags

?

devices

*

Element: domains

Container for domains.

Child elements

element

number

domain

*

Element: feature

One feature of this domain.

Attributes

attribute

req.

type

value

description

name

yes

string

[a-z0-9_-]+

Name of the feature.

Element: features

Container for features.

Child elements

element

number

feature

+

Element: label

Label which can be used by domain. One choice of colour for padlock icon.

Attributes

attribute

req.

type

value

description

id

yes

string

label-[0-9]+

XML id attribute used for cross-referencing in properties’ ref attribute.

color

no

string

#[0-9a-f]{6}

Label’s colour, HTML-like.

Element: labels

Container for labels.

Child elements

element

number

label

+

Element: option

Options

Attributes

attribute

req.

type

value

description

name

yes

string

[a-z0-9_-]+

Option name.

Element: properties

Container for properties.

Child elements

element

number

property

*

Element: property

One property and its value specified either directly (as text contained in this tag) or as reference to another XML element in the tree (by ref= attribute). How it is saved, it depends on particular property.

Attributes

attribute

req.

type

value

description

name

yes

string

[a-z0-9_]+

Property name.

ref

no

string

Alternative property value, by reference to another XML element.

Element: qubes

This is root element of whole qubes tree.

Attributes

attribute

req.

type

value

description

version

yes

3.0

Specifies minimal Qubes OS version.

Child elements

element

number

properties

1

labels

1

domains

1

Element: tag

Tag value.

Tags are not used anywhere by qubes core, they are for users reference. In the future they will be available for use in policies.

Attributes

attribute

req.

type

value

description

name

yes

string

[a-z0-9_-]+

Name of the tag.

Element: tags

Container for user-defined tags.

Child elements

element

number

tag

+