2011-08-13 01:33:15 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
|
|
<!-- domain-related definitions used in multiple grammars -->
|
|
|
|
<include href='basictypes.rng'/>
|
|
|
|
<include href='storageencryption.rng'/>
|
|
|
|
<include href='networkcommon.rng'/>
|
|
|
|
|
|
|
|
<!--
|
2012-02-01 13:03:49 +00:00
|
|
|
description and title element, may be placed anywhere under the root
|
2011-08-13 01:33:15 +00:00
|
|
|
-->
|
|
|
|
<define name="description">
|
|
|
|
<element name="description">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-02-01 13:03:49 +00:00
|
|
|
<define name="title">
|
|
|
|
<element name="title">
|
|
|
|
<data type="string">
|
|
|
|
<!-- Use literal newline instead of \n for bug in libxml2 2.7.6 -->
|
|
|
|
<param name="pattern">[^
|
|
|
|
]+</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
We handle only document defining a domain
|
|
|
|
-->
|
|
|
|
<define name="domain">
|
|
|
|
<element name="domain">
|
|
|
|
<ref name="hvs"/>
|
|
|
|
<ref name="ids"/>
|
|
|
|
<interleave>
|
2012-02-01 13:03:49 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="title"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="description"/>
|
|
|
|
</optional>
|
2012-01-24 02:26:18 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="metadata"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="cpu"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="sysinfo"/>
|
|
|
|
</optional>
|
|
|
|
<ref name="os"/>
|
|
|
|
<ref name="clock"/>
|
|
|
|
<ref name="resources"/>
|
|
|
|
<ref name="features"/>
|
|
|
|
<ref name="termination"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="devices"/>
|
|
|
|
</optional>
|
2012-08-15 22:10:36 +00:00
|
|
|
<zeroOrMore>
|
2011-08-13 01:33:15 +00:00
|
|
|
<ref name="seclabel"/>
|
2012-08-15 22:10:36 +00:00
|
|
|
</zeroOrMore>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='qemucmdline'/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="seclabel">
|
|
|
|
<element name="seclabel">
|
2011-12-23 00:47:46 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='model'>
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<!-- with dynamic label (default), relabel must be yes, baselabel
|
|
|
|
is optional, and label and imagelabel are output-only -->
|
|
|
|
<optional>
|
|
|
|
<attribute name='type'>
|
|
|
|
<value>dynamic</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='relabel'>
|
|
|
|
<value>yes</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name='label'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='imagelabel'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='baselabel'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<!-- with static label, relabel can be either format (default
|
|
|
|
no), label is required, imagelabel is output-only, and no
|
|
|
|
baselabel is present -->
|
|
|
|
<attribute name='type'>
|
|
|
|
<value>static</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='relabel'>
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<element name='label'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name='imagelabel'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
Add two new security label types
Curently security labels can be of type 'dynamic' or 'static'.
If no security label is given, then 'dynamic' is assumed. The
current code takes advantage of this default, and avoids even
saving <seclabel> elements with type='dynamic' to disk. This
means if you temporarily change security driver, the guests
can all still start.
With the introduction of sVirt to LXC though, there needs to be
a new default of 'none' to allow unconfined LXC containers.
This patch introduces two new security label types
- default: the host configuration decides whether to run the
guest with type 'none' or 'dynamic' at guest start
- none: the guest will run unconfined by security policy
The 'none' label type will obviously be undesirable for some
deployments, so a new qemu.conf option allows a host admin to
mandate confined guests. It is also possible to turn off default
confinement
security_default_confined = 1|0 (default == 1)
security_require_confined = 1|0 (default == 0)
* src/conf/domain_conf.c, src/conf/domain_conf.h: Add new
seclabel types
* src/security/security_manager.c, src/security/security_manager.h:
Set default sec label types
* src/security/security_selinux.c: Handle 'none' seclabel type
* src/qemu/qemu.conf, src/qemu/qemu_conf.c, src/qemu/qemu_conf.h,
src/qemu/libvirtd_qemu.aug: New security config options
* src/qemu/qemu_driver.c: Tell security driver about default
config
2012-01-25 14:12:52 +00:00
|
|
|
<group>
|
2012-02-04 14:01:56 +00:00
|
|
|
<!-- with none, relabel must be no if present -->
|
Add two new security label types
Curently security labels can be of type 'dynamic' or 'static'.
If no security label is given, then 'dynamic' is assumed. The
current code takes advantage of this default, and avoids even
saving <seclabel> elements with type='dynamic' to disk. This
means if you temporarily change security driver, the guests
can all still start.
With the introduction of sVirt to LXC though, there needs to be
a new default of 'none' to allow unconfined LXC containers.
This patch introduces two new security label types
- default: the host configuration decides whether to run the
guest with type 'none' or 'dynamic' at guest start
- none: the guest will run unconfined by security policy
The 'none' label type will obviously be undesirable for some
deployments, so a new qemu.conf option allows a host admin to
mandate confined guests. It is also possible to turn off default
confinement
security_default_confined = 1|0 (default == 1)
security_require_confined = 1|0 (default == 0)
* src/conf/domain_conf.c, src/conf/domain_conf.h: Add new
seclabel types
* src/security/security_manager.c, src/security/security_manager.h:
Set default sec label types
* src/security/security_selinux.c: Handle 'none' seclabel type
* src/qemu/qemu.conf, src/qemu/qemu_conf.c, src/qemu/qemu_conf.h,
src/qemu/libvirtd_qemu.aug: New security config options
* src/qemu/qemu_driver.c: Tell security driver about default
config
2012-01-25 14:12:52 +00:00
|
|
|
<attribute name='type'>
|
|
|
|
<value>none</value>
|
|
|
|
</attribute>
|
2012-02-04 14:01:56 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='relabel'>
|
|
|
|
<value>no</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
Add two new security label types
Curently security labels can be of type 'dynamic' or 'static'.
If no security label is given, then 'dynamic' is assumed. The
current code takes advantage of this default, and avoids even
saving <seclabel> elements with type='dynamic' to disk. This
means if you temporarily change security driver, the guests
can all still start.
With the introduction of sVirt to LXC though, there needs to be
a new default of 'none' to allow unconfined LXC containers.
This patch introduces two new security label types
- default: the host configuration decides whether to run the
guest with type 'none' or 'dynamic' at guest start
- none: the guest will run unconfined by security policy
The 'none' label type will obviously be undesirable for some
deployments, so a new qemu.conf option allows a host admin to
mandate confined guests. It is also possible to turn off default
confinement
security_default_confined = 1|0 (default == 1)
security_require_confined = 1|0 (default == 0)
* src/conf/domain_conf.c, src/conf/domain_conf.h: Add new
seclabel types
* src/security/security_manager.c, src/security/security_manager.h:
Set default sec label types
* src/security/security_selinux.c: Handle 'none' seclabel type
* src/qemu/qemu.conf, src/qemu/qemu_conf.c, src/qemu/qemu_conf.h,
src/qemu/libvirtd_qemu.aug: New security config options
* src/qemu/qemu_driver.c: Tell security driver about default
config
2012-01-25 14:12:52 +00:00
|
|
|
</group>
|
2011-12-23 00:47:46 +00:00
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
seclabel: extend XML to allow per-disk label overrides
When doing security relabeling, there are cases where a per-file
override might be appropriate. For example, with a static label
and relabeling, it might be appropriate to skip relabeling on a
particular disk, where the backing file lives on NFS that lacks
the ability to track labeling. Or with dynamic labeling, it might
be appropriate to use a custom (non-dynamic) label for a disk
specifically intended to be shared across domains.
The new XML resembles the top-level <seclabel>, but with fewer
options (basically relabel='no', or <label>text</label>):
<domain ...>
...
<devices>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='no'/> <!-- override for just this disk -->
</source>
...
</disk>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='yes'> <!-- override for just this disk -->
<label>system_u:object_r:shared_content_t:s0</label>
</seclabel>
</source>
...
</disk>
...
</devices>
<seclabel type='dynamic' model='selinux'>
<baselabel>text</baselabel> <!-- used for all devices without override -->
</seclabel>
</domain>
This patch only introduces the XML and documentation; future patches
will actually parse and make use of it. The intent is that we can
further extend things as needed, adding a per-device <seclabel> in
more places (such as the source of a console device), and possibly
allowing a <baselabel> instead of <label> for labeling where we want
to reuse the cNNN,cNNN pair of a dynamically labeled domain but a
different base label.
First suggested by Daniel P. Berrange here:
https://www.redhat.com/archives/libvir-list/2011-December/msg00258.html
* docs/schemas/domaincommon.rng (devSeclabel): New define.
(disk): Use it.
* docs/formatdomain.html.in (elementsDisks, seclabel): Document
the new XML.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml:
New test, to validate RNG.
2011-12-23 00:47:49 +00:00
|
|
|
<define name="devSeclabel">
|
|
|
|
<element name="seclabel">
|
|
|
|
<!-- A per-device seclabel override is more limited, either
|
|
|
|
relabel=no or a <label> must be present. -->
|
|
|
|
<choice>
|
|
|
|
<group>
|
2012-08-15 22:10:36 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='model'>
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<attribute name='relabel'>
|
|
|
|
<value>no</value>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name='model'>
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
seclabel: extend XML to allow per-disk label overrides
When doing security relabeling, there are cases where a per-file
override might be appropriate. For example, with a static label
and relabeling, it might be appropriate to skip relabeling on a
particular disk, where the backing file lives on NFS that lacks
the ability to track labeling. Or with dynamic labeling, it might
be appropriate to use a custom (non-dynamic) label for a disk
specifically intended to be shared across domains.
The new XML resembles the top-level <seclabel>, but with fewer
options (basically relabel='no', or <label>text</label>):
<domain ...>
...
<devices>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='no'/> <!-- override for just this disk -->
</source>
...
</disk>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='yes'> <!-- override for just this disk -->
<label>system_u:object_r:shared_content_t:s0</label>
</seclabel>
</source>
...
</disk>
...
</devices>
<seclabel type='dynamic' model='selinux'>
<baselabel>text</baselabel> <!-- used for all devices without override -->
</seclabel>
</domain>
This patch only introduces the XML and documentation; future patches
will actually parse and make use of it. The intent is that we can
further extend things as needed, adding a per-device <seclabel> in
more places (such as the source of a console device), and possibly
allowing a <baselabel> instead of <label> for labeling where we want
to reuse the cNNN,cNNN pair of a dynamically labeled domain but a
different base label.
First suggested by Daniel P. Berrange here:
https://www.redhat.com/archives/libvir-list/2011-December/msg00258.html
* docs/schemas/domaincommon.rng (devSeclabel): New define.
(disk): Use it.
* docs/formatdomain.html.in (elementsDisks, seclabel): Document
the new XML.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml:
New test, to validate RNG.
2011-12-23 00:47:49 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='relabel'>
|
|
|
|
<value>yes</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-08-15 22:10:36 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name='label'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
seclabel: extend XML to allow per-disk label overrides
When doing security relabeling, there are cases where a per-file
override might be appropriate. For example, with a static label
and relabeling, it might be appropriate to skip relabeling on a
particular disk, where the backing file lives on NFS that lacks
the ability to track labeling. Or with dynamic labeling, it might
be appropriate to use a custom (non-dynamic) label for a disk
specifically intended to be shared across domains.
The new XML resembles the top-level <seclabel>, but with fewer
options (basically relabel='no', or <label>text</label>):
<domain ...>
...
<devices>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='no'/> <!-- override for just this disk -->
</source>
...
</disk>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='yes'> <!-- override for just this disk -->
<label>system_u:object_r:shared_content_t:s0</label>
</seclabel>
</source>
...
</disk>
...
</devices>
<seclabel type='dynamic' model='selinux'>
<baselabel>text</baselabel> <!-- used for all devices without override -->
</seclabel>
</domain>
This patch only introduces the XML and documentation; future patches
will actually parse and make use of it. The intent is that we can
further extend things as needed, adding a per-device <seclabel> in
more places (such as the source of a console device), and possibly
allowing a <baselabel> instead of <label> for labeling where we want
to reuse the cNNN,cNNN pair of a dynamically labeled domain but a
different base label.
First suggested by Daniel P. Berrange here:
https://www.redhat.com/archives/libvir-list/2011-December/msg00258.html
* docs/schemas/domaincommon.rng (devSeclabel): New define.
(disk): Use it.
* docs/formatdomain.html.in (elementsDisks, seclabel): Document
the new XML.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml:
New test, to validate RNG.
2011-12-23 00:47:49 +00:00
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="hvs">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>qemu</value>
|
2011-11-28 14:26:57 +00:00
|
|
|
<value>kqemu</value>
|
|
|
|
<value>kvm</value>
|
|
|
|
<value>xen</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
<value>lxc</value>
|
2011-11-28 14:26:57 +00:00
|
|
|
<value>uml</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
<value>openvz</value>
|
|
|
|
<value>test</value>
|
2011-11-28 14:26:57 +00:00
|
|
|
<value>vmware</value>
|
|
|
|
<value>hyperv</value>
|
|
|
|
<value>vbox</value>
|
|
|
|
<value>phyp</value>
|
2012-08-13 15:50:14 +00:00
|
|
|
<value>parallels</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
<define name="os">
|
|
|
|
<choice>
|
|
|
|
<ref name="osxen"/>
|
|
|
|
<ref name="oshvm"/>
|
|
|
|
<ref name="osexe"/>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
<define name="osxen">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<ref name="bootloader"/>
|
|
|
|
</optional>
|
|
|
|
<element name="os">
|
|
|
|
<ref name="ostypexen"/>
|
|
|
|
<ref name="osbootkernel"/>
|
|
|
|
</element>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<ref name="bootloader"/>
|
|
|
|
<optional>
|
|
|
|
<element name="os">
|
|
|
|
<ref name="ostypexen"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="osbootkernel"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
<define name="oshvm">
|
|
|
|
<element name="os">
|
|
|
|
<ref name="ostypehvm"/>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="loader">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-06-15 02:34:04 +00:00
|
|
|
<optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<ref name="osbootkernel"/>
|
2012-06-15 02:34:04 +00:00
|
|
|
</optional>
|
|
|
|
<optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="osbootdev"/>
|
|
|
|
</zeroOrMore>
|
2012-06-15 02:34:04 +00:00
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="bootmenu">
|
|
|
|
<attribute name="enable">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="smbios"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="bios"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="ostypexen">
|
|
|
|
<element name="type">
|
|
|
|
<optional>
|
|
|
|
<attribute name="arch">
|
|
|
|
<choice>
|
|
|
|
<value>i686</value>
|
|
|
|
<value>x86_64</value>
|
|
|
|
<value>ia64</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="machine">
|
|
|
|
<choice>
|
|
|
|
<value>xenpv</value>
|
|
|
|
<value>xenner</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<choice>
|
|
|
|
<value>xen</value>
|
|
|
|
<value>linux</value>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="ostypehvm">
|
|
|
|
<element name="type">
|
|
|
|
<optional>
|
|
|
|
<choice>
|
|
|
|
<ref name="hvmx86"/>
|
|
|
|
<ref name="hvmmips"/>
|
|
|
|
<ref name="hvmsparc"/>
|
|
|
|
<ref name="hvmppc"/>
|
2011-12-01 17:45:55 +00:00
|
|
|
<ref name="hvmppc64"/>
|
2012-06-29 15:02:06 +00:00
|
|
|
<ref name="hvms390"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</optional>
|
|
|
|
<value>hvm</value>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="hvmx86">
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="arch">
|
|
|
|
<choice>
|
|
|
|
<value>i686</value>
|
|
|
|
<value>x86_64</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="machine">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-zA-Z0-9_\.\-]+</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</define>
|
|
|
|
<define name="hvmmips">
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="arch">
|
|
|
|
<value>mips</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="machine">
|
|
|
|
<value>mips</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</define>
|
|
|
|
<define name="hvmsparc">
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="arch">
|
|
|
|
<value>sparc</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="machine">
|
|
|
|
<value>sun4m</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</define>
|
|
|
|
<define name="hvmppc">
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="arch">
|
|
|
|
<value>ppc</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="machine">
|
|
|
|
<choice>
|
|
|
|
<value>g3beige</value>
|
|
|
|
<value>mac99</value>
|
|
|
|
<value>prep</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</define>
|
2011-12-01 17:45:55 +00:00
|
|
|
<define name="hvmppc64">
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="arch">
|
|
|
|
<value>ppc64</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="machine">
|
|
|
|
<choice>
|
|
|
|
<value>pseries</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</define>
|
2012-06-29 15:02:06 +00:00
|
|
|
<define name="hvms390">
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="arch">
|
|
|
|
<choice>
|
|
|
|
<value>s390</value>
|
|
|
|
<value>s390x</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="machine">
|
|
|
|
<choice>
|
|
|
|
<value>s390-virtio</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="osexe">
|
|
|
|
<element name="os">
|
|
|
|
<element name="type">
|
2012-03-26 17:11:09 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="arch">
|
|
|
|
<choice>
|
|
|
|
<value>i686</value>
|
|
|
|
<value>x86_64</value>
|
|
|
|
<value>ppc</value>
|
|
|
|
<value>ppc64</value>
|
|
|
|
<value>mips</value>
|
|
|
|
<value>sparc</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<value>exe</value>
|
|
|
|
</element>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="init">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-03-26 17:09:31 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="initarg">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
The Identifiers can be:
|
|
|
|
- an optional id attribute with a number on the domain element
|
|
|
|
- a mandatory name
|
|
|
|
- an optional uuid
|
|
|
|
-->
|
|
|
|
<define name="ids">
|
|
|
|
<optional>
|
|
|
|
<attribute name="id">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<element name="name">
|
|
|
|
<ref name="domainName"/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name="uuid">
|
|
|
|
<ref name="UUID"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
Resources usage defines the amount of memory (maximum and possibly
|
|
|
|
current usage) and number of virtual CPUs used by that domain.
|
|
|
|
We can't check here the rule that currentMemory <= memory
|
|
|
|
-->
|
|
|
|
<define name="resources">
|
|
|
|
<interleave>
|
|
|
|
<element name="memory">
|
2012-03-05 21:52:07 +00:00
|
|
|
<ref name='scaledInteger'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name="currentMemory">
|
2012-03-05 21:52:07 +00:00
|
|
|
<ref name='scaledInteger'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="memoryBacking">
|
|
|
|
<optional>
|
|
|
|
<element name="hugepages">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- The Blkio cgroup related tunables would go in the blkiotune -->
|
|
|
|
<optional>
|
|
|
|
<element name="blkiotune">
|
2011-11-08 11:00:33 +00:00
|
|
|
<interleave>
|
|
|
|
<!-- I/O weight the VM can use -->
|
|
|
|
<optional>
|
|
|
|
<element name="weight">
|
|
|
|
<ref name="weight"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="device">
|
|
|
|
<interleave>
|
|
|
|
<element name="path">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
<element name="weight">
|
|
|
|
<ref name="weight"/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- All the memory/swap related tunables would go in the memtune -->
|
|
|
|
<optional>
|
|
|
|
<element name="memtune">
|
|
|
|
<!-- Maximum memory the VM can use -->
|
|
|
|
<optional>
|
|
|
|
<element name="hard_limit">
|
2012-03-05 21:52:07 +00:00
|
|
|
<ref name='scaledInteger'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!-- Minimum memory ascertained for the VM during contention -->
|
|
|
|
<optional>
|
|
|
|
<element name="soft_limit">
|
2012-03-05 21:52:07 +00:00
|
|
|
<ref name='scaledInteger'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!-- Minimum amount of memory required to start the VM -->
|
|
|
|
<optional>
|
|
|
|
<element name="min_guarantee">
|
2012-03-05 21:52:07 +00:00
|
|
|
<ref name='scaledInteger'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!-- Maximum swap area the VM can use -->
|
|
|
|
<optional>
|
|
|
|
<element name="swap_hard_limit">
|
2012-03-05 21:52:07 +00:00
|
|
|
<ref name='scaledInteger'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<element name="vcpu">
|
2012-03-08 13:36:26 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="placement">
|
|
|
|
<choice>
|
|
|
|
<value>static</value>
|
|
|
|
<value>auto</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="cpuset">
|
|
|
|
<ref name="cpuset"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="current">
|
|
|
|
<ref name="countCPU"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<ref name="countCPU"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- All the cpu related tunables would go in the cputune -->
|
|
|
|
<optional>
|
|
|
|
<element name="cputune">
|
|
|
|
<optional>
|
|
|
|
<element name="shares">
|
|
|
|
<ref name="cpushares"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="period">
|
|
|
|
<ref name="cpuperiod"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="quota">
|
|
|
|
<ref name="cpuquota"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-08-21 09:18:42 +00:00
|
|
|
<optional>
|
|
|
|
<element name="emulator_period">
|
|
|
|
<ref name="cpuperiod"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="emulator_quota">
|
|
|
|
<ref name="cpuquota"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="vcpupin">
|
|
|
|
<attribute name="vcpu">
|
|
|
|
<ref name="vcpuid"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="cpuset">
|
|
|
|
<ref name="cpuset"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2012-08-21 09:18:32 +00:00
|
|
|
<optional>
|
|
|
|
<element name="emulatorpin">
|
|
|
|
<attribute name="cpuset">
|
|
|
|
<ref name="cpuset"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- All the NUMA related tunables would go in the numatune -->
|
|
|
|
<optional>
|
|
|
|
<element name="numatune">
|
|
|
|
<optional>
|
|
|
|
<element name="memory">
|
numad: Set memory policy from numad advisory nodeset
Though numad will manage the memory allocation of task dynamically,
it wants management application (libvirt) to pre-set the memory
policy according to the advisory nodeset returned from querying numad,
(just like pre-bind CPU nodeset for domain process), and thus the
performance could benefit much more from it.
This patch introduces new XML tag 'placement', value 'auto' indicates
whether to set the memory policy with the advisory nodeset from numad,
and its value defaults to the value of <vcpu> placement, or 'static'
if 'nodeset' is specified. Example of the new XML tag's usage:
<numatune>
<memory placement='auto' mode='interleave'/>
</numatune>
Just like what current "numatune" does, the 'auto' numa memory policy
setting uses libnuma's API too.
If <vcpu> "placement" is "auto", and <numatune> is not specified
explicitly, a default <numatume> will be added with "placement"
set as "auto", and "mode" set as "strict".
The following XML can now fully drive numad:
1) <vcpu> placement is 'auto', no <numatune> is specified.
<vcpu placement='auto'>10</vcpu>
2) <vcpu> placement is 'auto', no 'placement' is specified for
<numatune>.
<vcpu placement='auto'>10</vcpu>
<numatune>
<memory mode='interleave'/>
</numatune>
And it's also able to control the CPU placement and memory policy
independently. e.g.
1) <vcpu> placement is 'auto', and <numatune> placement is 'static'
<vcpu placement='auto'>10</vcpu>
<numatune>
<memory mode='strict' nodeset='0-10,^7'/>
</numatune>
2) <vcpu> placement is 'static', and <numatune> placement is 'auto'
<vcpu placement='static' cpuset='0-24,^12'>10</vcpu>
<numatune>
<memory mode='interleave' placement='auto'/>
</numatume>
A follow up patch will change the XML formatting codes to always output
'placement' for <vcpu>, even it's 'static'.
2012-05-08 16:04:34 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>strict</value>
|
|
|
|
<value>preferred</value>
|
|
|
|
<value>interleave</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name='placement'>
|
|
|
|
<value>static</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='nodeset'>
|
|
|
|
<ref name='cpuset'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<attribute name='placement'>
|
|
|
|
<value>auto</value>
|
|
|
|
</attribute>
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
<define name="clock">
|
|
|
|
<optional>
|
|
|
|
<element name="clock">
|
|
|
|
<choice>
|
2012-02-06 13:59:16 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="offset">
|
|
|
|
<choice>
|
|
|
|
<value>localtime</value>
|
|
|
|
<value>utc</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='adjustment'>
|
|
|
|
<choice>
|
|
|
|
<ref name='timeDelta'/>
|
|
|
|
<value>reset</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="offset">
|
|
|
|
<value>timezone</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="timezone">
|
|
|
|
<ref name="timeZone"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="offset">
|
|
|
|
<value>variable</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="adjustment">
|
|
|
|
<ref name="timeDelta"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-02-06 13:59:16 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="basis">
|
|
|
|
<choice>
|
|
|
|
<value>utc</value>
|
|
|
|
<value>localtime</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="timer"/>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
<define name="timer">
|
|
|
|
<element name="timer">
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>platform</value>
|
2012-01-27 13:49:51 +00:00
|
|
|
<value>hpet</value>
|
|
|
|
<value>kvmclock</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
<value>pit</value>
|
|
|
|
<value>rtc</value>
|
|
|
|
<value>tsc</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="track">
|
|
|
|
<choice>
|
|
|
|
<value>boot</value>
|
|
|
|
<value>guest</value>
|
|
|
|
<value>wall</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="tickpolicy">
|
|
|
|
<choice>
|
|
|
|
<value>delay</value>
|
|
|
|
<value>catchup</value>
|
|
|
|
<value>merge</value>
|
|
|
|
<value>discard</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="catchup"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="frequency">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>auto</value>
|
|
|
|
<value>native</value>
|
|
|
|
<value>emulate</value>
|
|
|
|
<value>paravirt</value>
|
|
|
|
<value>smpsafe</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="present">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="catchup">
|
|
|
|
<element name="catchup">
|
|
|
|
<optional>
|
|
|
|
<attribute name="threshold">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="slew">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="limit">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
A bootloader may be used to extract the OS information instead of
|
|
|
|
defining the OS parameter in the instance. It points just to the
|
|
|
|
binary or script used to extract the data from the first disk device.
|
|
|
|
-->
|
|
|
|
<define name="bootloader">
|
|
|
|
<interleave>
|
|
|
|
<element name="bootloader">
|
|
|
|
<choice>
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
<empty/>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name="bootloader_args">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
<define name="osbootkernel">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="kernel">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="initrd">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="root">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="cmdline">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
<define name="osbootdev">
|
|
|
|
<element name="boot">
|
|
|
|
<attribute name="dev">
|
|
|
|
<choice>
|
|
|
|
<value>hd</value>
|
|
|
|
<value>fd</value>
|
|
|
|
<value>cdrom</value>
|
|
|
|
<value>network</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="diskspec">
|
2011-11-15 09:02:46 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="driver"/>
|
|
|
|
</optional>
|
blockjob: enhance xml to track mirrors across libvirtd restart
In order to track a block copy job across libvirtd restarts, we
need to save internal XML that tracks the name of the file
holding the mirror. Displaying this name in dumpxml might also
be useful to the user, even if we don't yet have a way to (re-)
start a domain with mirroring enabled up front. This is done
with a new <mirror> sub-element to <disk>, as in:
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/original.img'/>
<mirror file='/var/lib/libvirt/images/copy.img' format='qcow2' ready='yes'/>
...
</disk>
For now, the element is output-only, in live domains; it is ignored
when defining a domain or hot-plugging a disk (since those contexts
use VIR_DOMAIN_XML_INACTIVE in parsing). The 'ready' attribute appears
when libvirt knows that the job has changed from the initial pulling
phase over to the mirroring phase, although absence of the attribute
is not a sure indicator of the current phase. If we come up with a way
to make qemu start with mirroring enabled, we can relax the xml
restriction, and allow <mirror> (but not attribute 'ready') on input.
Testing active-only XML meant tweaking the testsuite slightly, but it
was worth it.
* docs/schemas/domaincommon.rng (diskspec): Add diskMirror.
* docs/formatdomain.html.in (elementsDisks): Document it.
* src/conf/domain_conf.h (_virDomainDiskDef): New members.
* src/conf/domain_conf.c (virDomainDiskDefFree): Clean them.
(virDomainDiskDefParseXML): Parse them, but only internally.
(virDomainDiskDefFormat): Output them.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: New test file.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml: Likewise.
* tests/qemuxml2xmltest.c (testInfo): Alter members.
(testCompareXMLToXMLHelper): Allow more test control.
(mymain): Run new test.
2012-03-29 00:10:18 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='diskMirror'/>
|
|
|
|
</optional>
|
2011-11-15 09:02:46 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="diskAuth"/>
|
|
|
|
</optional>
|
|
|
|
<ref name="target"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="deviceBoot"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="readonly">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="shareable">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="transient">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="serial">
|
|
|
|
<ref name="diskSerial"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="diskIoTune"/>
|
|
|
|
</optional>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-11-15 09:02:46 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
2012-08-20 13:58:50 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="geometry"/>
|
|
|
|
</optional>
|
2012-08-29 15:48:30 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="diskIoLimits"/>
|
|
|
|
</optional>
|
2011-11-15 09:02:46 +00:00
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</define>
|
2011-08-13 19:20:21 +00:00
|
|
|
<define name="snapshot">
|
|
|
|
<attribute name="snapshot">
|
|
|
|
<choice>
|
|
|
|
<value>no</value>
|
|
|
|
<value>internal</value>
|
|
|
|
<value>external</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
|
|
|
|
<define name="lease">
|
|
|
|
<element name="lease">
|
|
|
|
<interleave>
|
|
|
|
<element name="lockspace">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
<element name="key">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
<element name="target">
|
|
|
|
<attribute name="path">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="offset">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
2011-10-17 14:54:03 +00:00
|
|
|
|
|
|
|
<define name="startupPolicy">
|
|
|
|
<attribute name="startupPolicy">
|
|
|
|
<choice>
|
|
|
|
<value>mandatory</value>
|
|
|
|
<value>requisite</value>
|
|
|
|
<value>optional</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
A disk description can be either of type file or block
|
|
|
|
The name of the attribute on the source element depends on the type
|
|
|
|
|
|
|
|
-->
|
|
|
|
<define name="disk">
|
|
|
|
<element name="disk">
|
|
|
|
<optional>
|
|
|
|
<attribute name="device">
|
|
|
|
<choice>
|
|
|
|
<value>floppy</value>
|
|
|
|
<value>disk</value>
|
|
|
|
<value>cdrom</value>
|
qemu: add new disk device='lun' for bus='virtio' & type='block'
In the past, generic SCSI commands issued from a guest to a virtio
disk were always passed through to the underlying disk by qemu, and
the kernel would also pass them on.
As a result of CVE-2011-4127 (see:
http://seclists.org/oss-sec/2011/q4/536), qemu now honors its
scsi=on|off device option for virtio-blk-pci (which enables/disables
passthrough of generic SCSI commands), and the kernel will only allow
the commands for physical devices (not for partitions or logical
volumes). The default behavior of qemu is still to allow sending
generic SCSI commands to physical disks that are presented to a guest
as virtio-blk-pci devices, but libvirt prefers to disable those
commands in the standard virtio block devices, enabling it only when
specifically requested (hopefully indicating that the requester
understands what they're asking for). For this purpose, a new libvirt
disk device type (device='lun') has been created.
device='lun' is identical to the default device='disk', except that:
1) It is only allowed if bus='virtio', type='block', and the qemu
version is "new enough" to support it ("new enough" == qemu 0.11 or
better), otherwise the domain will fail to start and a
CONFIG_UNSUPPORTED error will be logged).
2) The option "scsi=on" will be added to the -device arg to allow
SG_IO commands (if device !='lun', "scsi=off" will be added to the
-device arg so that SG_IO commands are specifically forbidden).
Guests which continue to use disk device='disk' (the default) will no
longer be able to use SG_IO commands on the disk; those that have
their disk device changed to device='lun' will still be able to use SG_IO
commands.
*docs/formatdomain.html.in - document the new device attribute value.
*docs/schemas/domaincommon.rng - allow it in the RNG
*tests/* - update the args of several existing tests to add scsi=off, and
add one new test that will test scsi=on.
*src/conf/domain_conf.c - update domain XML parser and formatter
*src/qemu/qemu_(command|driver|hotplug).c - treat
VIR_DOMAIN_DISK_DEVICE_LUN *almost* identically to
VIR_DOMAIN_DISK_DEVICE_DISK, except as indicated above.
Note that no support for this new device value was added to any
hypervisor drivers other than qemu, because it's unclear what it might
mean (if anything) to those drivers.
2012-01-05 03:48:38 +00:00
|
|
|
<value>lun</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-01-31 04:49:00 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="rawio">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 19:20:21 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="snapshot"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>file</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="source">
|
2011-10-17 14:54:03 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="file">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="startupPolicy"/>
|
|
|
|
</optional>
|
seclabel: extend XML to allow per-disk label overrides
When doing security relabeling, there are cases where a per-file
override might be appropriate. For example, with a static label
and relabeling, it might be appropriate to skip relabeling on a
particular disk, where the backing file lives on NFS that lacks
the ability to track labeling. Or with dynamic labeling, it might
be appropriate to use a custom (non-dynamic) label for a disk
specifically intended to be shared across domains.
The new XML resembles the top-level <seclabel>, but with fewer
options (basically relabel='no', or <label>text</label>):
<domain ...>
...
<devices>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='no'/> <!-- override for just this disk -->
</source>
...
</disk>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='yes'> <!-- override for just this disk -->
<label>system_u:object_r:shared_content_t:s0</label>
</seclabel>
</source>
...
</disk>
...
</devices>
<seclabel type='dynamic' model='selinux'>
<baselabel>text</baselabel> <!-- used for all devices without override -->
</seclabel>
</domain>
This patch only introduces the XML and documentation; future patches
will actually parse and make use of it. The intent is that we can
further extend things as needed, adding a per-device <seclabel> in
more places (such as the source of a console device), and possibly
allowing a <baselabel> instead of <label> for labeling where we want
to reuse the cNNN,cNNN pair of a dynamically labeled domain but a
different base label.
First suggested by Daniel P. Berrange here:
https://www.redhat.com/archives/libvir-list/2011-December/msg00258.html
* docs/schemas/domaincommon.rng (devSeclabel): New define.
(disk): Use it.
* docs/formatdomain.html.in (elementsDisks, seclabel): Document
the new XML.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml:
New test, to validate RNG.
2011-12-23 00:47:49 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='devSeclabel'/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<ref name="diskspec"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>block</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dev">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
seclabel: extend XML to allow per-disk label overrides
When doing security relabeling, there are cases where a per-file
override might be appropriate. For example, with a static label
and relabeling, it might be appropriate to skip relabeling on a
particular disk, where the backing file lives on NFS that lacks
the ability to track labeling. Or with dynamic labeling, it might
be appropriate to use a custom (non-dynamic) label for a disk
specifically intended to be shared across domains.
The new XML resembles the top-level <seclabel>, but with fewer
options (basically relabel='no', or <label>text</label>):
<domain ...>
...
<devices>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='no'/> <!-- override for just this disk -->
</source>
...
</disk>
<disk type='file' device='disk'>
<source file='/path/to/image1'>
<seclabel relabel='yes'> <!-- override for just this disk -->
<label>system_u:object_r:shared_content_t:s0</label>
</seclabel>
</source>
...
</disk>
...
</devices>
<seclabel type='dynamic' model='selinux'>
<baselabel>text</baselabel> <!-- used for all devices without override -->
</seclabel>
</domain>
This patch only introduces the XML and documentation; future patches
will actually parse and make use of it. The intent is that we can
further extend things as needed, adding a per-device <seclabel> in
more places (such as the source of a console device), and possibly
allowing a <baselabel> instead of <label> for labeling where we want
to reuse the cNNN,cNNN pair of a dynamically labeled domain but a
different base label.
First suggested by Daniel P. Berrange here:
https://www.redhat.com/archives/libvir-list/2011-December/msg00258.html
* docs/schemas/domaincommon.rng (devSeclabel): New define.
(disk): Use it.
* docs/formatdomain.html.in (elementsDisks, seclabel): Document
the new XML.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml:
New test, to validate RNG.
2011-12-23 00:47:49 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='devSeclabel'/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<ref name="diskspec"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>dir</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dir">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<ref name="diskspec"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>network</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="protocol">
|
|
|
|
<choice>
|
|
|
|
<value>nbd</value>
|
|
|
|
<value>rbd</value>
|
|
|
|
<value>sheepdog</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="name"/>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="host">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="dnsName"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<ref name="diskspec"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<ref name="diskspec"/>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
snapshot: also support disks by path
I got confused when 'virsh domblkinfo dom disk' required the
path to a disk (which can be ambiguous, since a single file
can back multiple disks), rather than the unambiguous target
device name that I was using in disk snapshots. So, in true
developer fashion, I went for the best of both worlds - all
interfaces that operate on a disk (aka block) now accept
either the target name or the unambiguous path to the backing
file used by the disk.
* src/conf/domain_conf.h (virDomainDiskIndexByName): Add
parameter.
(virDomainDiskPathByName): New prototype.
* src/libvirt_private.syms (domain_conf.h): Export it.
* src/conf/domain_conf.c (virDomainDiskIndexByName): Also allow
searching by path, and decide whether ambiguity is okay.
(virDomainDiskPathByName): New function.
(virDomainDiskRemoveByName, virDomainSnapshotAlignDisks): Update
callers.
* src/qemu/qemu_driver.c (qemudDomainBlockPeek)
(qemuDomainAttachDeviceConfig, qemuDomainUpdateDeviceConfig)
(qemuDomainGetBlockInfo, qemuDiskPathToAlias): Likewise.
* src/qemu/qemu_process.c (qemuProcessFindDomainDiskByPath):
Likewise.
* src/libxl/libxl_driver.c (libxlDomainAttachDeviceDiskLive)
(libxlDomainDetachDeviceDiskLive, libxlDomainAttachDeviceConfig)
(libxlDomainUpdateDeviceConfig): Likewise.
* src/uml/uml_driver.c (umlDomainBlockPeek): Likewise.
* src/xen/xend_internal.c (xenDaemonDomainBlockPeek): Likewise.
* docs/formatsnapshot.html.in: Update documentation.
* tools/virsh.pod (domblkstat, domblkinfo): Likewise.
* docs/schemas/domaincommon.rng (diskTarget): Tighten pattern on
disk targets.
* docs/schemas/domainsnapshot.rng (disksnapshot): Update to match.
* tests/domainsnapshotxml2xmlin/disk_snapshot.xml: Update test.
2011-08-20 02:38:36 +00:00
|
|
|
<define name="diskTarget">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(ioemu:)?(fd|hd|sd|vd|xvd|ubd)[a-zA-Z0-9_]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="target">
|
|
|
|
<element name="target">
|
|
|
|
<attribute name="dev">
|
snapshot: also support disks by path
I got confused when 'virsh domblkinfo dom disk' required the
path to a disk (which can be ambiguous, since a single file
can back multiple disks), rather than the unambiguous target
device name that I was using in disk snapshots. So, in true
developer fashion, I went for the best of both worlds - all
interfaces that operate on a disk (aka block) now accept
either the target name or the unambiguous path to the backing
file used by the disk.
* src/conf/domain_conf.h (virDomainDiskIndexByName): Add
parameter.
(virDomainDiskPathByName): New prototype.
* src/libvirt_private.syms (domain_conf.h): Export it.
* src/conf/domain_conf.c (virDomainDiskIndexByName): Also allow
searching by path, and decide whether ambiguity is okay.
(virDomainDiskPathByName): New function.
(virDomainDiskRemoveByName, virDomainSnapshotAlignDisks): Update
callers.
* src/qemu/qemu_driver.c (qemudDomainBlockPeek)
(qemuDomainAttachDeviceConfig, qemuDomainUpdateDeviceConfig)
(qemuDomainGetBlockInfo, qemuDiskPathToAlias): Likewise.
* src/qemu/qemu_process.c (qemuProcessFindDomainDiskByPath):
Likewise.
* src/libxl/libxl_driver.c (libxlDomainAttachDeviceDiskLive)
(libxlDomainDetachDeviceDiskLive, libxlDomainAttachDeviceConfig)
(libxlDomainUpdateDeviceConfig): Likewise.
* src/uml/uml_driver.c (umlDomainBlockPeek): Likewise.
* src/xen/xend_internal.c (xenDaemonDomainBlockPeek): Likewise.
* docs/formatsnapshot.html.in: Update documentation.
* tools/virsh.pod (domblkstat, domblkinfo): Likewise.
* docs/schemas/domaincommon.rng (diskTarget): Tighten pattern on
disk targets.
* docs/schemas/domainsnapshot.rng (disksnapshot): Update to match.
* tests/domainsnapshotxml2xmlin/disk_snapshot.xml: Update test.
2011-08-20 02:38:36 +00:00
|
|
|
<ref name="diskTarget"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="bus">
|
|
|
|
<choice>
|
|
|
|
<value>ide</value>
|
|
|
|
<value>fdc</value>
|
|
|
|
<value>scsi</value>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>xen</value>
|
|
|
|
<value>usb</value>
|
|
|
|
<value>uml</value>
|
2011-09-28 03:46:08 +00:00
|
|
|
<value>sata</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-03-14 15:26:46 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="tray">
|
|
|
|
<choice>
|
|
|
|
<value>open</value>
|
|
|
|
<value>closed</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
2012-08-20 13:58:50 +00:00
|
|
|
<define name="geometry">
|
|
|
|
<element name="geometry">
|
|
|
|
<attribute name="cyls">
|
|
|
|
<data type="integer"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="heads">
|
|
|
|
<data type="integer"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="secs">
|
|
|
|
<data type="integer"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="trans">
|
|
|
|
<choice>
|
|
|
|
<value>auto</value>
|
|
|
|
<value>none</value>
|
|
|
|
<value>lba</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
2012-08-29 15:48:30 +00:00
|
|
|
<define name="diskIoLimits">
|
|
|
|
<element name="iolimits">
|
|
|
|
<optional>
|
|
|
|
<attribute name="logical_block_size">
|
|
|
|
<data type="integer"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="physical_block_size">
|
|
|
|
<data type="integer"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
blockjob: enhance xml to track mirrors across libvirtd restart
In order to track a block copy job across libvirtd restarts, we
need to save internal XML that tracks the name of the file
holding the mirror. Displaying this name in dumpxml might also
be useful to the user, even if we don't yet have a way to (re-)
start a domain with mirroring enabled up front. This is done
with a new <mirror> sub-element to <disk>, as in:
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/original.img'/>
<mirror file='/var/lib/libvirt/images/copy.img' format='qcow2' ready='yes'/>
...
</disk>
For now, the element is output-only, in live domains; it is ignored
when defining a domain or hot-plugging a disk (since those contexts
use VIR_DOMAIN_XML_INACTIVE in parsing). The 'ready' attribute appears
when libvirt knows that the job has changed from the initial pulling
phase over to the mirroring phase, although absence of the attribute
is not a sure indicator of the current phase. If we come up with a way
to make qemu start with mirroring enabled, we can relax the xml
restriction, and allow <mirror> (but not attribute 'ready') on input.
Testing active-only XML meant tweaking the testsuite slightly, but it
was worth it.
* docs/schemas/domaincommon.rng (diskspec): Add diskMirror.
* docs/formatdomain.html.in (elementsDisks): Document it.
* src/conf/domain_conf.h (_virDomainDiskDef): New members.
* src/conf/domain_conf.c (virDomainDiskDefFree): Clean them.
(virDomainDiskDefParseXML): Parse them, but only internally.
(virDomainDiskDefFormat): Output them.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: New test file.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml: Likewise.
* tests/qemuxml2xmltest.c (testInfo): Alter members.
(testCompareXMLToXMLHelper): Allow more test control.
(mymain): Run new test.
2012-03-29 00:10:18 +00:00
|
|
|
Disk may use a special driver for access.
|
2011-08-13 01:33:15 +00:00
|
|
|
-->
|
|
|
|
<define name="driver">
|
|
|
|
<element name="driver">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<ref name="driverFormat"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="driverCache"/>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<ref name="driverFormat"/>
|
|
|
|
</optional>
|
|
|
|
<ref name="driverCache"/>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<optional>
|
|
|
|
<ref name="driverErrorPolicy"/>
|
|
|
|
</optional>
|
2011-10-04 18:17:06 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="driverRerrorPolicy"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="driverIO"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="ioeventfd"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="event_idx"/>
|
|
|
|
</optional>
|
2012-01-12 09:31:14 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="copy_on_read"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="driverFormat">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
<define name="driverCache">
|
|
|
|
<attribute name="cache">
|
|
|
|
<choice>
|
|
|
|
<value>none</value>
|
|
|
|
<value>writeback</value>
|
|
|
|
<value>writethrough</value>
|
|
|
|
<value>directsync</value>
|
2011-09-22 19:33:47 +00:00
|
|
|
<value>unsafe</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
<define name="driverErrorPolicy">
|
|
|
|
<attribute name="error_policy">
|
|
|
|
<choice>
|
|
|
|
<value>stop</value>
|
2011-10-04 18:17:06 +00:00
|
|
|
<value>report</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
<value>ignore</value>
|
|
|
|
<value>enospace</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2011-10-04 18:17:06 +00:00
|
|
|
<define name="driverRerrorPolicy">
|
|
|
|
<attribute name="rerror_policy">
|
|
|
|
<choice>
|
|
|
|
<value>stop</value>
|
|
|
|
<value>report</value>
|
|
|
|
<value>ignore</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="driverIO">
|
|
|
|
<attribute name="io">
|
|
|
|
<choice>
|
|
|
|
<value>threads</value>
|
|
|
|
<value>native</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
<define name="ioeventfd">
|
|
|
|
<attribute name="ioeventfd">
|
|
|
|
<choice>
|
|
|
|
<value>on</value>
|
|
|
|
<value>off</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
<define name="event_idx">
|
|
|
|
<attribute name="event_idx">
|
|
|
|
<choice>
|
|
|
|
<value>on</value>
|
|
|
|
<value>off</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2012-01-12 09:31:14 +00:00
|
|
|
<define name="copy_on_read">
|
|
|
|
<attribute name='copy_on_read'>
|
|
|
|
<choice>
|
|
|
|
<value>on</value>
|
|
|
|
<value>off</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="controller">
|
|
|
|
<element name="controller">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>fdc</value>
|
|
|
|
<value>ide</value>
|
|
|
|
<value>scsi</value>
|
|
|
|
<value>sata</value>
|
|
|
|
<value>ccid</value>
|
|
|
|
<value>usb</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<!-- virtio-serial can have 2 additional attributes -->
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>virtio-serial</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="ports">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="vectors">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<attribute name="index">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>auto</value>
|
|
|
|
<value>buslogic</value>
|
|
|
|
<value>lsilogic</value>
|
|
|
|
<value>lsisas1068</value>
|
|
|
|
<value>vmpvscsi</value>
|
2012-02-27 09:08:23 +00:00
|
|
|
<value>ibmvscsi</value>
|
2012-02-27 09:16:20 +00:00
|
|
|
<value>virtio-scsi</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
<value>piix3-uhci</value>
|
|
|
|
<value>piix4-uhci</value>
|
|
|
|
<value>ehci</value>
|
|
|
|
<value>ich9-ehci1</value>
|
|
|
|
<value>ich9-uhci1</value>
|
|
|
|
<value>ich9-uhci2</value>
|
|
|
|
<value>ich9-uhci3</value>
|
|
|
|
<value>vt82c686b-uhci</value>
|
|
|
|
<value>pci-ohci</value>
|
2012-06-21 13:45:25 +00:00
|
|
|
<value>nec-xhci</value>
|
2012-07-02 15:28:43 +00:00
|
|
|
<value>none</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="usbmaster"/>
|
|
|
|
</optional>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="filesystem">
|
|
|
|
<element name="filesystem">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>file</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="file">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>block</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dev">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
2011-10-11 11:30:40 +00:00
|
|
|
<!-- type='mount' is default -->
|
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>mount</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dir">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
2011-10-11 11:30:40 +00:00
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>path</value>
|
|
|
|
<value>handle</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
2012-01-17 12:44:18 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="wrpolicy">
|
|
|
|
<value>immediate</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-10-11 11:30:40 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</group>
|
2012-06-20 14:03:30 +00:00
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>bind</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dir">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>template</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2012-05-08 16:50:48 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>ram</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="usage">
|
|
|
|
<ref name="unsignedLong"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='unit'>
|
|
|
|
<ref name='unit'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
2012-04-17 09:50:41 +00:00
|
|
|
<interleave>
|
|
|
|
<element name="target">
|
|
|
|
<attribute name="dir">
|
|
|
|
<ref name="absDirPath"/>
|
|
|
|
</attribute>
|
2012-01-16 09:17:26 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
2012-04-17 09:50:41 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="accessmode">
|
|
|
|
<choice>
|
|
|
|
<value>passthrough</value>
|
|
|
|
<value>mapped</value>
|
|
|
|
<value>squash</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='readonly'>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2012-05-23 12:38:55 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="space_hard_limit">
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="space_soft_limit">
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
An interface description can either be of type bridge in which case
|
|
|
|
it will use a bridging source, or of type ethernet which uses a device
|
|
|
|
source and a device target instead. They both share a set of interface
|
|
|
|
options. FIXME
|
|
|
|
-->
|
|
|
|
<define name="interface">
|
|
|
|
<element name="interface">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>bridge</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="bridge">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-08-12 16:01:32 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="virtualPortProfile"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>ethernet</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dev">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>network</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="network">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="portgroup">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<ref name="virtualPortProfile"/>
|
|
|
|
</optional>
|
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>direct</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dev">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="mode">
|
|
|
|
<ref name="bridgeMode"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<ref name="virtualPortProfile"/>
|
|
|
|
</optional>
|
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>user</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>internal</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2012-01-16 14:08:07 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>mcast</value>
|
|
|
|
<value>client</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="ipv4Addr"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name="mac">
|
|
|
|
<attribute name="address">
|
2012-03-19 16:49:17 +00:00
|
|
|
<ref name="uniMacAddr"/>
|
2012-01-16 14:08:07 +00:00
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>server</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<optional>
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="ipv4Addr"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name="mac">
|
|
|
|
<attribute name="address">
|
2012-03-19 16:49:17 +00:00
|
|
|
<ref name="uniMacAddr"/>
|
2012-01-16 14:08:07 +00:00
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2012-02-15 17:37:15 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>hostdev</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="managed">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<ref name="usbproduct"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="usbaddress"/>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<element name="address">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>pci</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="pciaddress"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>usb</value>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="bus">
|
|
|
|
<ref name="usbAddr"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="device">
|
|
|
|
<ref name="usbPort"/>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<ref name="virtualPortProfile"/>
|
|
|
|
</optional>
|
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
The interface options possible are:
|
|
|
|
- the MAC address
|
|
|
|
- the IP address bound to the interface
|
|
|
|
- the name of the script used to set up the binding
|
|
|
|
- the target device used
|
|
|
|
- boot order
|
|
|
|
-->
|
|
|
|
<define name="interface-options">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="target">
|
|
|
|
<attribute name="dev">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="mac">
|
|
|
|
<attribute name="address">
|
2012-03-19 16:49:17 +00:00
|
|
|
<ref name="uniMacAddr"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="ip">
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="ipv4Addr"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="script">
|
|
|
|
<attribute name="path">
|
|
|
|
<ref name="filePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="model">
|
2011-12-08 06:41:22 +00:00
|
|
|
<attribute name="type">
|
|
|
|
<data type="string">
|
|
|
|
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
2011-08-13 01:33:15 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
|
|
|
<optional>
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>qemu</value>
|
|
|
|
<value>vhost</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="txmode">
|
|
|
|
<choice>
|
|
|
|
<value>iothread</value>
|
|
|
|
<value>timer</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="ioeventfd"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="event_idx"/>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="filterref">
|
|
|
|
<ref name="filterref-node-attributes"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="tune">
|
|
|
|
<optional>
|
|
|
|
<!-- size of send buffer for network tap devices -->
|
|
|
|
<element name="sndbuf">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="deviceBoot"/>
|
|
|
|
</optional>
|
2012-01-25 00:54:12 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="rom"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="bandwidth"/>
|
|
|
|
</optional>
|
2012-08-12 07:51:30 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="vlan"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
An emulator description is just a path to the binary used for the task
|
|
|
|
-->
|
|
|
|
<define name="emulator">
|
|
|
|
<element name="emulator">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
A graphic description, currently in Xen only 2 types are supported:
|
|
|
|
- sdl with optional display, xauth and fullscreen
|
|
|
|
- vnc with a required port and optional listen IP address, password
|
|
|
|
and keymap
|
|
|
|
-->
|
|
|
|
<define name="graphic">
|
|
|
|
<element name="graphics">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>sdl</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="display">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="xauth">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="fullscreen">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>vnc</value>
|
|
|
|
</attribute>
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="autoport">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="listen">
|
|
|
|
<ref name="addrIPorName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="socket">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<optional>
|
|
|
|
<attribute name="passwd">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="keymap">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="passwdValidTo">
|
|
|
|
<data type="dateTime"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="connected">
|
|
|
|
<choice>
|
|
|
|
<value>keep</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<ref name="listenElements"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>spice</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="tlsPort">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="autoport">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="listen">
|
|
|
|
<ref name="addrIPorName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="passwd">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="keymap">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="passwdValidTo">
|
|
|
|
<data type="dateTime"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="connected">
|
|
|
|
<choice>
|
|
|
|
<value>fail</value>
|
|
|
|
<value>disconnect</value>
|
|
|
|
<value>keep</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-05-08 17:42:44 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="defaultMode">
|
|
|
|
<choice>
|
|
|
|
<value>any</value>
|
|
|
|
<value>secure</value>
|
|
|
|
<value>insecure</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<interleave>
|
|
|
|
<ref name="listenElements"/>
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="channel">
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>main</value>
|
|
|
|
<value>display</value>
|
|
|
|
<value>inputs</value>
|
|
|
|
<value>cursor</value>
|
|
|
|
<value>playback</value>
|
|
|
|
<value>record</value>
|
|
|
|
<value>smartcard</value>
|
2012-05-08 13:00:28 +00:00
|
|
|
<value>usbredir</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>any</value>
|
|
|
|
<value>secure</value>
|
|
|
|
<value>insecure</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
<optional>
|
|
|
|
<element name="image">
|
|
|
|
<attribute name="compression">
|
|
|
|
<choice>
|
|
|
|
<value>auto_glz</value>
|
|
|
|
<value>auto_lz</value>
|
|
|
|
<value>quic</value>
|
|
|
|
<value>glz</value>
|
|
|
|
<value>lz</value>
|
|
|
|
<value>off</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="jpeg">
|
|
|
|
<attribute name="compression">
|
|
|
|
<choice>
|
|
|
|
<value>auto</value>
|
|
|
|
<value>never</value>
|
|
|
|
<value>always</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="zlib">
|
|
|
|
<attribute name="compression">
|
|
|
|
<choice>
|
|
|
|
<value>auto</value>
|
|
|
|
<value>never</value>
|
|
|
|
<value>always</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="playback">
|
|
|
|
<attribute name="compression">
|
|
|
|
<choice>
|
|
|
|
<value>on</value>
|
|
|
|
<value>off</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="streaming">
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>filter</value>
|
|
|
|
<value>all</value>
|
|
|
|
<value>off</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="clipboard">
|
|
|
|
<attribute name="copypaste">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-03-09 07:26:24 +00:00
|
|
|
<optional>
|
|
|
|
<element name="mouse">
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>server</value>
|
|
|
|
<value>client</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>rdp</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="autoport">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="replaceUser">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="multiUser">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="listen">
|
|
|
|
<ref name="addrIPorName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<ref name="listenElements"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>desktop</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="display">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="fullscreen">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="listenElements">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="listen">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>address</value>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="addrIPorName"/>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>network</value>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="network">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="addrIPorName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
A video adapter description, allowing configuration of device
|
|
|
|
model, number of virtual heads, and video ram size
|
|
|
|
-->
|
|
|
|
<define name="video">
|
|
|
|
<element name="video">
|
|
|
|
<optional>
|
|
|
|
<element name="model">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>vga</value>
|
|
|
|
<value>cirrus</value>
|
|
|
|
<value>vmvga</value>
|
|
|
|
<value>xen</value>
|
|
|
|
<value>vbox</value>
|
|
|
|
<value>qxl</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="vram">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="heads">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="acceleration">
|
|
|
|
<optional>
|
|
|
|
<attribute name="accel3d">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="accel2d">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
When a domain terminates multiple policies can be applied depending
|
|
|
|
on how it ended:
|
|
|
|
-->
|
|
|
|
<define name="termination">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="on_reboot">
|
|
|
|
<ref name="offOptions"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="on_poweroff">
|
|
|
|
<ref name="offOptions"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="on_crash">
|
|
|
|
<ref name="crashOptions"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
Options when a domain terminates:
|
|
|
|
destroy: The domain is cleaned up
|
|
|
|
restart: A new domain is started in place of the old one
|
|
|
|
preserve: The domain will remain in memory until it is destroyed manually
|
|
|
|
rename-restart: a variant of the previous one but where the old domain is
|
|
|
|
renamed before being saved to allow a restart
|
|
|
|
-->
|
|
|
|
<define name="offOptions">
|
|
|
|
<choice>
|
|
|
|
<value>destroy</value>
|
|
|
|
<value>restart</value>
|
|
|
|
<value>preserve</value>
|
|
|
|
<value>rename-restart</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
Options when a domain crashes:
|
|
|
|
destroy: The domain is cleaned up
|
|
|
|
restart: A new domain is started in place of the old one
|
|
|
|
preserve: The domain will remain in memory until it is destroyed manually
|
|
|
|
rename-restart: a variant of the previous one but where the old domain is
|
|
|
|
renamed before being saved to allow a restart
|
|
|
|
coredump-destroy: The crashed domain's core will be dumped, and then the
|
|
|
|
domain will be terminated completely and all resources
|
|
|
|
released
|
|
|
|
coredump-restart: The crashed domain's core will be dumped, and then the
|
|
|
|
domain will be restarted with the same configuration
|
|
|
|
-->
|
|
|
|
<define name="crashOptions">
|
|
|
|
<choice>
|
|
|
|
<value>destroy</value>
|
|
|
|
<value>restart</value>
|
|
|
|
<value>preserve</value>
|
|
|
|
<value>rename-restart</value>
|
|
|
|
<value>coredump-destroy</value>
|
|
|
|
<value>coredump-restart</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
Specific setup for a qemu emulated character device. Note: this
|
|
|
|
definition doesn't fully specify the constraints on this node.
|
|
|
|
-->
|
|
|
|
<define name="qemucdev">
|
|
|
|
<ref name="qemucdevSrcType"/>
|
|
|
|
<optional>
|
|
|
|
<attribute name="tty">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<ref name="qemucdevSrcDef"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="qemucdevTgtDef"/>
|
|
|
|
</optional>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="qemucdevConsoleTgtType">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>xen</value>
|
|
|
|
<value>serial</value>
|
|
|
|
<value>uml</value>
|
|
|
|
<value>virtio</value>
|
2012-03-26 17:11:09 +00:00
|
|
|
<value>lxc</value>
|
|
|
|
<value>openvz</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="qemucdevTgtDef">
|
|
|
|
<element name="target">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="qemucdevConsoleTgtType"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="port"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="qemucdevSrcTypeChoice">
|
|
|
|
<choice>
|
|
|
|
<value>dev</value>
|
|
|
|
<value>file</value>
|
|
|
|
<value>pipe</value>
|
|
|
|
<value>unix</value>
|
|
|
|
<value>tcp</value>
|
|
|
|
<value>udp</value>
|
|
|
|
<value>null</value>
|
|
|
|
<value>stdio</value>
|
|
|
|
<value>vc</value>
|
|
|
|
<value>pty</value>
|
|
|
|
<value>spicevmc</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="qemucdevSrcType">
|
|
|
|
<attribute name="type">
|
|
|
|
<ref name="qemucdevSrcTypeChoice"/>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
<define name="qemucdevSrcDef">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="source">
|
|
|
|
<optional>
|
|
|
|
<attribute name="mode"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="path"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="host"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="service"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="wiremode"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
<optional>
|
|
|
|
<element name="protocol">
|
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>raw</value>
|
|
|
|
<value>telnet</value>
|
|
|
|
<value>telnets</value>
|
|
|
|
<value>tls</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
The description for a console
|
|
|
|
just a tty device
|
|
|
|
-->
|
|
|
|
<define name="console">
|
|
|
|
<element name="console">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="tty">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</group>
|
|
|
|
<choice>
|
|
|
|
<ref name="qemucdev"/>
|
|
|
|
</choice>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
2012-05-15 22:55:09 +00:00
|
|
|
<define name="codec">
|
|
|
|
<element name="codec">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>duplex</value>
|
|
|
|
<value>micro</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="sound">
|
|
|
|
<element name="sound">
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>sb16</value>
|
|
|
|
<value>es1370</value>
|
|
|
|
<value>pcspk</value>
|
|
|
|
<value>ac97</value>
|
|
|
|
<value>ich6</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
2012-05-15 22:55:09 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
|
|
|
<choice>
|
|
|
|
<ref name="codec"/>
|
|
|
|
</choice>
|
|
|
|
</zeroOrMore>
|
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="watchdog">
|
|
|
|
<element name="watchdog">
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>i6300esb</value>
|
|
|
|
<value>ib700</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="action">
|
|
|
|
<choice>
|
|
|
|
<value>reset</value>
|
|
|
|
<value>shutdown</value>
|
|
|
|
<value>poweroff</value>
|
|
|
|
<value>pause</value>
|
|
|
|
<value>none</value>
|
|
|
|
<value>dump</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="memballoon">
|
|
|
|
<element name="memballoon">
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>xen</value>
|
|
|
|
<value>none</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="parallel">
|
|
|
|
<element name="parallel">
|
|
|
|
<ref name="qemucdev"/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="serial">
|
|
|
|
<element name="serial">
|
|
|
|
<ref name="qemucdev"/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="guestfwdTarget">
|
|
|
|
<element name="target">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>guestfwd</value>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="address"/>
|
|
|
|
<attribute name="port"/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="virtioTarget">
|
|
|
|
<element name="target">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>virtio</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="name"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="channel">
|
|
|
|
<element name="channel">
|
|
|
|
<ref name="qemucdevSrcType"/>
|
|
|
|
<interleave>
|
|
|
|
<ref name="qemucdevSrcDef"/>
|
|
|
|
<choice>
|
|
|
|
<ref name="guestfwdTarget"/>
|
|
|
|
<ref name="virtioTarget"/>
|
|
|
|
</choice>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="smartcard">
|
|
|
|
<element name="smartcard">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="mode">
|
|
|
|
<value>host</value>
|
|
|
|
</attribute>
|
|
|
|
<!-- might need to add optional database element here later -->
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="mode">
|
|
|
|
<value>host-certificates</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name='certificate'/>
|
|
|
|
<ref name='certificate'/>
|
|
|
|
<ref name='certificate'/>
|
|
|
|
<optional>
|
|
|
|
<element name="database">
|
|
|
|
<ref name="absDirPath"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="mode">
|
|
|
|
<value>passthrough</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="qemucdevSrcType"/>
|
|
|
|
<interleave>
|
|
|
|
<ref name="qemucdevSrcDef"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="qemucdevTgtDef"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="certificate">
|
|
|
|
<element name="certificate">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="input">
|
|
|
|
<element name="input">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>tablet</value>
|
|
|
|
<value>mouse</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="bus">
|
|
|
|
<choice>
|
|
|
|
<value>ps2</value>
|
|
|
|
<value>usb</value>
|
|
|
|
<value>xen</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="hub">
|
|
|
|
<element name="hub">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>usb</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="redirdev">
|
|
|
|
<element name="redirdev">
|
|
|
|
<attribute name="bus">
|
|
|
|
<choice>
|
|
|
|
<value>usb</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="type">
|
|
|
|
<ref name="qemucdevSrcTypeChoice"/>
|
|
|
|
</attribute>
|
|
|
|
<ref name="qemucdevSrcDef"/>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-09-06 07:06:59 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="hostdev">
|
|
|
|
<element name="hostdev">
|
|
|
|
<optional>
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>subsystem</value>
|
|
|
|
<value>capabilities</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>usb</value>
|
|
|
|
<value>pci</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="managed">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<group>
|
|
|
|
<element name="source">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<ref name="usbproduct"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="usbaddress"/>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<ref name="usbaddress"/>
|
|
|
|
<element name="address">
|
|
|
|
<ref name="pciaddress"/>
|
|
|
|
</element>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</group>
|
|
|
|
<optional>
|
|
|
|
<ref name="deviceBoot"/>
|
|
|
|
</optional>
|
2012-01-16 09:28:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
2011-09-20 17:31:52 +00:00
|
|
|
<optional>
|
2012-01-25 00:54:12 +00:00
|
|
|
<ref name="rom"/>
|
2011-09-20 17:31:52 +00:00
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="usbproduct">
|
|
|
|
<element name="vendor">
|
|
|
|
<attribute name="id">
|
|
|
|
<ref name="usbId"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
<element name="product">
|
|
|
|
<attribute name="id">
|
|
|
|
<ref name="usbId"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="usbaddress">
|
|
|
|
<element name="address">
|
|
|
|
<attribute name="bus">
|
|
|
|
<ref name="usbAddr"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="device">
|
|
|
|
<ref name="usbPort"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="usbportaddress">
|
|
|
|
<attribute name="bus">
|
|
|
|
<ref name="usbAddr"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="usbPort"/>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2011-12-12 23:39:31 +00:00
|
|
|
<define name="spaprvioaddress">
|
|
|
|
<optional>
|
|
|
|
<attribute name="reg">
|
|
|
|
<ref name="spaprvioReg"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="driveaddress">
|
|
|
|
<optional>
|
|
|
|
<attribute name="controller">
|
|
|
|
<ref name="driveController"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="bus">
|
|
|
|
<ref name="driveBus"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-02-27 10:19:54 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="target">
|
|
|
|
<ref name="driveTarget"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-01-13 03:39:23 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="unit">
|
|
|
|
<ref name="driveUnit"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</define>
|
|
|
|
<define name="virtioserialaddress">
|
|
|
|
<attribute name="controller">
|
|
|
|
<ref name="driveController"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="bus">
|
|
|
|
<ref name="driveBus"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="driveUnit"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
<define name="ccidaddress">
|
|
|
|
<attribute name="controller">
|
|
|
|
<ref name="driveController"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="slot">
|
|
|
|
<ref name="driveUnit"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
<define name="devices">
|
|
|
|
<element name="devices">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="emulator"/>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
|
|
|
<choice>
|
|
|
|
<ref name="disk"/>
|
|
|
|
<ref name="controller"/>
|
|
|
|
<ref name="lease"/>
|
|
|
|
<ref name="filesystem"/>
|
|
|
|
<ref name="interface"/>
|
|
|
|
<ref name="input"/>
|
|
|
|
<ref name="sound"/>
|
|
|
|
<ref name="hostdev"/>
|
|
|
|
<ref name="graphic"/>
|
|
|
|
<ref name="video"/>
|
|
|
|
<ref name="console"/>
|
|
|
|
<ref name="parallel"/>
|
|
|
|
<ref name="serial"/>
|
|
|
|
<ref name="channel"/>
|
|
|
|
<ref name="smartcard"/>
|
|
|
|
<ref name="hub"/>
|
|
|
|
<ref name="redirdev"/>
|
|
|
|
</choice>
|
|
|
|
</zeroOrMore>
|
|
|
|
<optional>
|
|
|
|
<ref name="watchdog"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="memballoon"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
A set of optional features: PAE, APIC, ACPI, and HAP support
|
|
|
|
-->
|
|
|
|
<define name="features">
|
|
|
|
<optional>
|
|
|
|
<element name="features">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="pae">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="apic">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="acpi">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="hap">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-01-25 14:34:12 +00:00
|
|
|
<optional>
|
|
|
|
<element name="viridian">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-01-18 11:38:49 +00:00
|
|
|
<optional>
|
|
|
|
<element name="privnet">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
CPU specification
|
|
|
|
-->
|
|
|
|
<define name="cpu">
|
|
|
|
<element name="cpu">
|
|
|
|
<choice>
|
2011-11-11 12:51:45 +00:00
|
|
|
<group>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuTopology"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuNuma"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
<group>
|
2011-08-18 10:14:36 +00:00
|
|
|
<ref name="cpuMode"/>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuModel"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuNuma"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuMode"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<ref name="cpuMatch"/>
|
|
|
|
<interleave>
|
|
|
|
<ref name="cpuModel"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuVendor"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuTopology"/>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="cpuFeature"/>
|
|
|
|
</zeroOrMore>
|
2011-11-11 12:51:45 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="cpuNuma"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-18 10:14:36 +00:00
|
|
|
<define name="cpuMode">
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>custom</value>
|
|
|
|
<value>host-model</value>
|
|
|
|
<value>host-passthrough</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="cpuMatch">
|
|
|
|
<attribute name="match">
|
|
|
|
<choice>
|
|
|
|
<value>minimum</value>
|
|
|
|
<value>exact</value>
|
|
|
|
<value>strict</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="cpuModel">
|
|
|
|
<element name="model">
|
2011-12-21 13:27:16 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="fallback">
|
|
|
|
<choice>
|
|
|
|
<value>allow</value>
|
|
|
|
<value>forbid</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-06-28 10:21:17 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="vendor_id">
|
|
|
|
<data type="string">
|
|
|
|
<param name='pattern'>[^,]{12}</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-18 10:14:36 +00:00
|
|
|
<choice>
|
|
|
|
<text/>
|
|
|
|
<empty/>
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="cpuVendor">
|
|
|
|
<element name="vendor">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="cpuFeature">
|
|
|
|
<element name="feature">
|
|
|
|
<attribute name="policy">
|
|
|
|
<choice>
|
|
|
|
<value>force</value>
|
|
|
|
<value>require</value>
|
|
|
|
<value>optional</value>
|
|
|
|
<value>disable</value>
|
|
|
|
<value>forbid</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="featureName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="cpuTopology">
|
|
|
|
<element name="topology">
|
|
|
|
<attribute name="sockets">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="cores">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="threads">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-11-11 12:51:45 +00:00
|
|
|
<define name="cpuNuma">
|
|
|
|
<element name="numa">
|
|
|
|
<oneOrMore>
|
|
|
|
<ref name="numaCell"/>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="numaCell">
|
|
|
|
<element name="cell">
|
|
|
|
<attribute name="cpus">
|
|
|
|
<ref name="cpuset"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="memory">
|
|
|
|
<ref name="memoryKB"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
System information specification:
|
|
|
|
Placeholder for system specific informations likes the ones
|
|
|
|
contained in the SMBIOS area.
|
|
|
|
Only a limited subset of entries can be modified there, so we
|
|
|
|
fully enumerate each case here.
|
|
|
|
The DMTF spec doesn't specify any string subset, just 0 terminated
|
|
|
|
byte strings, but better be safe and restrict at least the names
|
|
|
|
to avoid problems with space normalization in attribute values,
|
|
|
|
the value is kept as the element body for maximum flexibility.
|
|
|
|
A priori we allow only type 0 and type 1 string updates
|
|
|
|
-->
|
|
|
|
<define name="sysinfo">
|
|
|
|
<element name="sysinfo">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>smbios</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="bios">
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="entry">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="sysinfo-bios-name"/>
|
|
|
|
</attribute>
|
|
|
|
<ref name="sysinfo-value"/>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="system">
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="entry">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="sysinfo-system-name"/>
|
|
|
|
</attribute>
|
|
|
|
<ref name="sysinfo-value"/>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="sysinfo-bios-name">
|
|
|
|
<choice>
|
|
|
|
<value>vendor</value>
|
|
|
|
<value>version</value>
|
|
|
|
<value>date</value>
|
|
|
|
<value>release</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="sysinfo-system-name">
|
|
|
|
<choice>
|
|
|
|
<value>manufacturer</value>
|
|
|
|
<value>product</value>
|
|
|
|
<value>version</value>
|
|
|
|
<value>serial</value>
|
|
|
|
<value>uuid</value>
|
|
|
|
<value>sku</value>
|
|
|
|
<value>family</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="sysinfo-value">
|
|
|
|
<data type="string">
|
|
|
|
<param name='pattern'>[a-zA-Z0-9/\-_\. \(\)]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="smbios">
|
|
|
|
<element name="smbios">
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>emulate</value>
|
|
|
|
<value>host</value>
|
|
|
|
<value>sysinfo</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="bios">
|
|
|
|
<element name="bios">
|
|
|
|
<attribute name="useserial">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="address">
|
|
|
|
<element name="address">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>pci</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="pciaddress"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>drive</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="driveaddress"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>virtio-serial</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="virtioserialaddress"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>ccid</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="ccidaddress"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>usb</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="usbportaddress"/>
|
|
|
|
</group>
|
2011-12-12 23:39:31 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>spapr-vio</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="spaprvioaddress"/>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-01-25 00:54:12 +00:00
|
|
|
<define name="rom">
|
|
|
|
<element name="rom">
|
2012-01-25 16:20:49 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="bar">
|
|
|
|
<choice>
|
|
|
|
<value>on</value>
|
|
|
|
<value>off</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="file">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-01-25 00:54:12 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="usbmaster">
|
|
|
|
<element name="master">
|
|
|
|
<attribute name="startport">
|
|
|
|
<ref name="usbPort"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="filterref-node-attributes">
|
|
|
|
<attribute name="filter">
|
|
|
|
<data type="NCName"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<element name="parameter">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="filter-param-name"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="value">
|
|
|
|
<ref name="filter-param-value"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="deviceBoot">
|
|
|
|
<element name="boot">
|
|
|
|
<attribute name="order">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
blockjob: enhance xml to track mirrors across libvirtd restart
In order to track a block copy job across libvirtd restarts, we
need to save internal XML that tracks the name of the file
holding the mirror. Displaying this name in dumpxml might also
be useful to the user, even if we don't yet have a way to (re-)
start a domain with mirroring enabled up front. This is done
with a new <mirror> sub-element to <disk>, as in:
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/original.img'/>
<mirror file='/var/lib/libvirt/images/copy.img' format='qcow2' ready='yes'/>
...
</disk>
For now, the element is output-only, in live domains; it is ignored
when defining a domain or hot-plugging a disk (since those contexts
use VIR_DOMAIN_XML_INACTIVE in parsing). The 'ready' attribute appears
when libvirt knows that the job has changed from the initial pulling
phase over to the mirroring phase, although absence of the attribute
is not a sure indicator of the current phase. If we come up with a way
to make qemu start with mirroring enabled, we can relax the xml
restriction, and allow <mirror> (but not attribute 'ready') on input.
Testing active-only XML meant tweaking the testsuite slightly, but it
was worth it.
* docs/schemas/domaincommon.rng (diskspec): Add diskMirror.
* docs/formatdomain.html.in (elementsDisks): Document it.
* src/conf/domain_conf.h (_virDomainDiskDef): New members.
* src/conf/domain_conf.c (virDomainDiskDefFree): Clean them.
(virDomainDiskDefParseXML): Parse them, but only internally.
(virDomainDiskDefFormat): Output them.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: New test file.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml: Likewise.
* tests/qemuxml2xmltest.c (testInfo): Alter members.
(testCompareXMLToXMLHelper): Allow more test control.
(mymain): Run new test.
2012-03-29 00:10:18 +00:00
|
|
|
<define name='diskMirror'>
|
|
|
|
<element name='mirror'>
|
|
|
|
<attribute name='file'>
|
|
|
|
<ref name='absFilePath'/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='format'>
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='ready'>
|
|
|
|
<value>yes</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
2011-10-28 18:29:39 +00:00
|
|
|
<define name="diskAuth">
|
|
|
|
<element name="auth">
|
|
|
|
<attribute name="username">
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</attribute>
|
|
|
|
<ref name="diskAuthSecret"/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='diskAuthSecret'>
|
|
|
|
<element name='secret'>
|
|
|
|
<attribute name='type'>
|
|
|
|
<choice>
|
|
|
|
<value>ceph</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<choice>
|
|
|
|
<attribute name='uuid'>
|
|
|
|
<ref name="UUID"/>
|
|
|
|
</attribute>
|
2011-10-28 21:19:34 +00:00
|
|
|
<attribute name='usage'>
|
|
|
|
<ref name='genericName'/>
|
2011-10-28 18:29:39 +00:00
|
|
|
</attribute>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
|
2011-11-15 09:02:46 +00:00
|
|
|
<define name='diskIoTune'>
|
|
|
|
<element name="iotune">
|
|
|
|
<interleave>
|
|
|
|
<choice>
|
|
|
|
<element name="total_bytes_sec">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
<group>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="read_bytes_sec">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="write_bytes_sec">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<choice>
|
|
|
|
<element name="total_iops_sec">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
<group>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="read_iops_sec">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="write_iops_sec">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
Optional hypervisor extensions in their own namespace:
|
|
|
|
QEmu
|
|
|
|
-->
|
|
|
|
<define name="qemucmdline">
|
|
|
|
<element name="commandline" ns="http://libvirt.org/schemas/domain/qemu/1.0">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="arg">
|
|
|
|
<attribute name='value'/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="env">
|
|
|
|
<attribute name='name'>
|
|
|
|
<ref name="filter-param-name"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='value'/>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-01-24 02:26:18 +00:00
|
|
|
<define name="metadata">
|
|
|
|
<element name="metadata">
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="customElement"/>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="customElement">
|
|
|
|
<element>
|
|
|
|
<anyName/>
|
|
|
|
<zeroOrMore>
|
|
|
|
<choice>
|
|
|
|
<attribute>
|
|
|
|
<anyName/>
|
|
|
|
</attribute>
|
|
|
|
<text/>
|
|
|
|
<ref name="customElement"/>
|
|
|
|
</choice>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
Type library
|
|
|
|
-->
|
|
|
|
<define name="cpuset">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">([0-9]+(-[0-9]+)?|\^[0-9]+)(,([0-9]+(-[0-9]+)?|\^[0-9]+))*</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="countCPU">
|
|
|
|
<data type="unsignedShort">
|
|
|
|
<param name="pattern">[0-9]+</param>
|
|
|
|
<param name="minInclusive">1</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="vcpuid">
|
|
|
|
<data type="unsignedShort">
|
|
|
|
<param name="pattern">[0-9]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="cpushares">
|
|
|
|
<data type="unsignedInt">
|
|
|
|
<param name="pattern">[0-9]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="cpuperiod">
|
|
|
|
<data type="unsignedLong">
|
|
|
|
<param name="pattern">[0-9]+</param>
|
|
|
|
<param name="minInclusive">1000</param>
|
|
|
|
<param name="maxInclusive">1000000</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="cpuquota">
|
|
|
|
<data type="long">
|
|
|
|
<param name="pattern">-?[0-9]+</param>
|
|
|
|
<param name="maxInclusive">18446744073709551</param>
|
|
|
|
<param name='minInclusive'>-1</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="PortNumber">
|
|
|
|
<data type="short">
|
|
|
|
<param name="minInclusive">-1</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2012-02-23 04:18:39 +00:00
|
|
|
<!-- weight currently is in range [100, 1000] -->
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="weight">
|
|
|
|
<data type="unsignedInt">
|
|
|
|
<param name="pattern">[0-9]+</param>
|
|
|
|
<param name="minInclusive">100</param>
|
|
|
|
<param name="maxInclusive">1000</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2012-02-23 00:48:38 +00:00
|
|
|
<!-- Memory as an attribute is in KiB, no way to express a unit -->
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="memoryKB">
|
|
|
|
<data type="unsignedInt">
|
|
|
|
<param name="pattern">[0-9]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="domainName">
|
|
|
|
<data type="string">
|
2012-01-31 23:51:36 +00:00
|
|
|
<!-- Use literal newline instead of \n for bug in libxml2 2.7.6 -->
|
|
|
|
<param name="pattern">[^
|
|
|
|
]+</param>
|
2011-08-13 01:33:15 +00:00
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="diskSerial">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[A-Za-z0-9_\.\+\-]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="bridgeMode">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(vepa|bridge|private|passthrough)</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="addrIPorName">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9])|(([0-9a-fA-F]+|:)+[0-9a-fA-F]+)|([a-zA-Z0-9_\.\+\-]*)</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="usbId">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="usbAddr">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(0x)?[0-9a-fA-F]{1,3}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="usbPort">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">((0x)?[0-9a-fA-F]{1,3}\.){0,3}(0x)?[0-9a-fA-F]{1,3}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="driveController">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[0-9]{1,2}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="driveBus">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[0-9]{1,2}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2012-02-27 10:19:54 +00:00
|
|
|
<define name="driveTarget">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[0-9]{1,2}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="driveUnit">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[0-9]{1,2}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="featureName">
|
|
|
|
<data type="string">
|
2012-01-03 20:59:51 +00:00
|
|
|
<param name='pattern'>[a-zA-Z0-9\-_\.]+</param>
|
2011-08-13 01:33:15 +00:00
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="timeDelta">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(-|\+)?[0-9]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="timeZone">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-zA-Z0-9_\.\+\-/]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="filter-param-name">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-zA-Z0-9_]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="filter-param-value">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-zA-Z0-9_\.:]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2011-12-12 23:39:31 +00:00
|
|
|
<define name="spaprvioReg">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(0x)?[0-9a-fA-F]{1,16}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2012-01-16 09:28:51 +00:00
|
|
|
<define name='aliasName'>
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-zA-Z0-9_-]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name='alias'>
|
|
|
|
<element name='alias'>
|
|
|
|
<attribute name='name'>
|
|
|
|
<ref name='aliasName'/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
<empty/>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
</grammar>
|