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'/>
|
2014-04-12 01:33:45 +00:00
|
|
|
<include href='storagecommon.rng'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
<include href='networkcommon.rng'/>
|
2016-05-10 14:17:08 +00:00
|
|
|
<include href='cputypes.rng'/>
|
2018-05-15 17:00:16 +00:00
|
|
|
<include href='nwfilter_params.rng'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
|
|
|
|
<!--
|
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"/>
|
|
|
|
<interleave>
|
2015-12-17 12:43:58 +00:00
|
|
|
<ref name="ids"/>
|
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"/>
|
2012-09-06 19:56:49 +00:00
|
|
|
<ref name="events"/>
|
2012-08-02 10:12:50 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="pm"/>
|
|
|
|
</optional>
|
2016-03-28 13:30:30 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="perf"/>
|
|
|
|
</optional>
|
2013-06-07 07:12:18 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="idmap"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2015-08-20 13:46:17 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='lxcsharens'/>
|
|
|
|
</optional>
|
2015-04-27 21:57:27 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='keywrap'/>
|
|
|
|
</optional>
|
2018-06-08 14:40:56 +00:00
|
|
|
<optional>
|
2018-06-12 11:50:25 +00:00
|
|
|
<ref name='launchSecurity'/>
|
2018-06-08 14:40:56 +00:00
|
|
|
</optional>
|
2019-01-17 15:07:20 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='bhyvecmdline'/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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'>
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-12-23 00:47:46 +00:00
|
|
|
</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
|
selinux: distinguish failure to label from request to avoid label
https://bugzilla.redhat.com/show_bug.cgi?id=924153
Commit 904e05a2 (v0.9.9) added a per-<disk> seclabel element with
an attribute relabel='no' in order to try and minimize the
impact of shutdown delays when an NFS server disappears. The idea
was that if a disk is on NFS and can't be labeled in the first
place, there is no need to attempt the (no-op) relabel on domain
shutdown. Unfortunately, the way this was implemented was by
modifying the domain XML so that the optimization would survive
libvirtd restart, but in a way that is indistinguishable from an
explicit user setting. Furthermore, once the setting is turned
on, libvirt avoids attempts at labeling, even for operations like
snapshot or blockcopy where the chain is being extended or pivoted
onto non-NFS, where SELinux labeling is once again possible. As
a result, it was impossible to do a blockcopy to pivot from an
NFS image file onto a local file.
The solution is to separate the semantics of a chain that must
not be labeled (which the user can set even on persistent domains)
vs. the optimization of not attempting a relabel on cleanup (a
live-only annotation), and using only the user's explicit notation
rather than the optimization as the decision on whether to skip
a label attempt in the first place. When upgrading an older
libvirtd to a newer, an NFS volume will still attempt the relabel;
but as the avoidance of a relabel was only an optimization, this
shouldn't cause any problems.
In the ideal future, libvirt will eventually have XML describing
EVERY file in the backing chain, with each file having a separate
<seclabel> element. At that point, libvirt will be able to track
more closely which files need a relabel attempt at shutdown. But
until we reach that point, the single <seclabel> for the entire
<disk> chain is treated as a hint - when a chain has only one
file, then we know it is accurate; but if the chain has more than
one file, we have to attempt relabel in spite of the attribute,
in case part of the chain is local and SELinux mattered for that
portion of the chain.
* src/conf/domain_conf.h (_virSecurityDeviceLabelDef): Add new
member.
* src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML):
Parse it, for live images only.
(virSecurityDeviceLabelDefFormat): Output it.
(virDomainDiskDefParseXML, virDomainChrSourceDefParseXML)
(virDomainDiskSourceDefFormat, virDomainChrDefFormat)
(virDomainDiskDefFormat): Pass flags on through.
* src/security/security_selinux.c
(virSecuritySELinuxRestoreSecurityImageLabelInt): Honor labelskip
when possible.
(virSecuritySELinuxSetSecurityFileLabel): Set labelskip, not
norelabel, if labeling fails.
(virSecuritySELinuxSetFileconHelper): Fix indentation.
* docs/formatdomain.html.in (seclabel): Document new xml.
* docs/schemas/domaincommon.rng (devSeclabel): Allow it in RNG.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.xml:
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.args:
* tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-*-labelskip.xml:
New test files.
* tests/qemuxml2argvtest.c (mymain): Run the new tests.
* tests/qemuxml2xmltest.c (mymain): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-08-12 15:15:42 +00:00
|
|
|
relabel=no or a <label> must be present on input;
|
|
|
|
output also can include labelskip=yes. -->
|
|
|
|
<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
|
|
|
<choice>
|
|
|
|
<group>
|
2012-08-15 22:10:36 +00:00
|
|
|
<attribute name='relabel'>
|
|
|
|
<value>no</value>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
<group>
|
selinux: distinguish failure to label from request to avoid label
https://bugzilla.redhat.com/show_bug.cgi?id=924153
Commit 904e05a2 (v0.9.9) added a per-<disk> seclabel element with
an attribute relabel='no' in order to try and minimize the
impact of shutdown delays when an NFS server disappears. The idea
was that if a disk is on NFS and can't be labeled in the first
place, there is no need to attempt the (no-op) relabel on domain
shutdown. Unfortunately, the way this was implemented was by
modifying the domain XML so that the optimization would survive
libvirtd restart, but in a way that is indistinguishable from an
explicit user setting. Furthermore, once the setting is turned
on, libvirt avoids attempts at labeling, even for operations like
snapshot or blockcopy where the chain is being extended or pivoted
onto non-NFS, where SELinux labeling is once again possible. As
a result, it was impossible to do a blockcopy to pivot from an
NFS image file onto a local file.
The solution is to separate the semantics of a chain that must
not be labeled (which the user can set even on persistent domains)
vs. the optimization of not attempting a relabel on cleanup (a
live-only annotation), and using only the user's explicit notation
rather than the optimization as the decision on whether to skip
a label attempt in the first place. When upgrading an older
libvirtd to a newer, an NFS volume will still attempt the relabel;
but as the avoidance of a relabel was only an optimization, this
shouldn't cause any problems.
In the ideal future, libvirt will eventually have XML describing
EVERY file in the backing chain, with each file having a separate
<seclabel> element. At that point, libvirt will be able to track
more closely which files need a relabel attempt at shutdown. But
until we reach that point, the single <seclabel> for the entire
<disk> chain is treated as a hint - when a chain has only one
file, then we know it is accurate; but if the chain has more than
one file, we have to attempt relabel in spite of the attribute,
in case part of the chain is local and SELinux mattered for that
portion of the chain.
* src/conf/domain_conf.h (_virSecurityDeviceLabelDef): Add new
member.
* src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML):
Parse it, for live images only.
(virSecurityDeviceLabelDefFormat): Output it.
(virDomainDiskDefParseXML, virDomainChrSourceDefParseXML)
(virDomainDiskSourceDefFormat, virDomainChrDefFormat)
(virDomainDiskDefFormat): Pass flags on through.
* src/security/security_selinux.c
(virSecuritySELinuxRestoreSecurityImageLabelInt): Honor labelskip
when possible.
(virSecuritySELinuxSetSecurityFileLabel): Set labelskip, not
norelabel, if labeling fails.
(virSecuritySELinuxSetFileconHelper): Fix indentation.
* docs/formatdomain.html.in (seclabel): Document new xml.
* docs/schemas/domaincommon.rng (devSeclabel): Allow it in RNG.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.xml:
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.args:
* tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-*-labelskip.xml:
New test files.
* tests/qemuxml2argvtest.c (mymain): Run the new tests.
* tests/qemuxml2xmltest.c (mymain): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-08-12 15:15:42 +00:00
|
|
|
<attribute name='labelskip'>
|
|
|
|
<value>yes</value>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
<group>
|
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>
|
selinux: distinguish failure to label from request to avoid label
https://bugzilla.redhat.com/show_bug.cgi?id=924153
Commit 904e05a2 (v0.9.9) added a per-<disk> seclabel element with
an attribute relabel='no' in order to try and minimize the
impact of shutdown delays when an NFS server disappears. The idea
was that if a disk is on NFS and can't be labeled in the first
place, there is no need to attempt the (no-op) relabel on domain
shutdown. Unfortunately, the way this was implemented was by
modifying the domain XML so that the optimization would survive
libvirtd restart, but in a way that is indistinguishable from an
explicit user setting. Furthermore, once the setting is turned
on, libvirt avoids attempts at labeling, even for operations like
snapshot or blockcopy where the chain is being extended or pivoted
onto non-NFS, where SELinux labeling is once again possible. As
a result, it was impossible to do a blockcopy to pivot from an
NFS image file onto a local file.
The solution is to separate the semantics of a chain that must
not be labeled (which the user can set even on persistent domains)
vs. the optimization of not attempting a relabel on cleanup (a
live-only annotation), and using only the user's explicit notation
rather than the optimization as the decision on whether to skip
a label attempt in the first place. When upgrading an older
libvirtd to a newer, an NFS volume will still attempt the relabel;
but as the avoidance of a relabel was only an optimization, this
shouldn't cause any problems.
In the ideal future, libvirt will eventually have XML describing
EVERY file in the backing chain, with each file having a separate
<seclabel> element. At that point, libvirt will be able to track
more closely which files need a relabel attempt at shutdown. But
until we reach that point, the single <seclabel> for the entire
<disk> chain is treated as a hint - when a chain has only one
file, then we know it is accurate; but if the chain has more than
one file, we have to attempt relabel in spite of the attribute,
in case part of the chain is local and SELinux mattered for that
portion of the chain.
* src/conf/domain_conf.h (_virSecurityDeviceLabelDef): Add new
member.
* src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML):
Parse it, for live images only.
(virSecurityDeviceLabelDefFormat): Output it.
(virDomainDiskDefParseXML, virDomainChrSourceDefParseXML)
(virDomainDiskSourceDefFormat, virDomainChrDefFormat)
(virDomainDiskDefFormat): Pass flags on through.
* src/security/security_selinux.c
(virSecuritySELinuxRestoreSecurityImageLabelInt): Honor labelskip
when possible.
(virSecuritySELinuxSetSecurityFileLabel): Set labelskip, not
norelabel, if labeling fails.
(virSecuritySELinuxSetFileconHelper): Fix indentation.
* docs/formatdomain.html.in (seclabel): Document new xml.
* docs/schemas/domaincommon.rng (devSeclabel): Allow it in RNG.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.xml:
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.args:
* tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-*-labelskip.xml:
New test files.
* tests/qemuxml2argvtest.c (mymain): Run the new tests.
* tests/qemuxml2xmltest.c (mymain): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-08-12 15:15:42 +00:00
|
|
|
<oneOrMore>
|
2012-08-15 22:10:36 +00:00
|
|
|
<element name='label'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
selinux: distinguish failure to label from request to avoid label
https://bugzilla.redhat.com/show_bug.cgi?id=924153
Commit 904e05a2 (v0.9.9) added a per-<disk> seclabel element with
an attribute relabel='no' in order to try and minimize the
impact of shutdown delays when an NFS server disappears. The idea
was that if a disk is on NFS and can't be labeled in the first
place, there is no need to attempt the (no-op) relabel on domain
shutdown. Unfortunately, the way this was implemented was by
modifying the domain XML so that the optimization would survive
libvirtd restart, but in a way that is indistinguishable from an
explicit user setting. Furthermore, once the setting is turned
on, libvirt avoids attempts at labeling, even for operations like
snapshot or blockcopy where the chain is being extended or pivoted
onto non-NFS, where SELinux labeling is once again possible. As
a result, it was impossible to do a blockcopy to pivot from an
NFS image file onto a local file.
The solution is to separate the semantics of a chain that must
not be labeled (which the user can set even on persistent domains)
vs. the optimization of not attempting a relabel on cleanup (a
live-only annotation), and using only the user's explicit notation
rather than the optimization as the decision on whether to skip
a label attempt in the first place. When upgrading an older
libvirtd to a newer, an NFS volume will still attempt the relabel;
but as the avoidance of a relabel was only an optimization, this
shouldn't cause any problems.
In the ideal future, libvirt will eventually have XML describing
EVERY file in the backing chain, with each file having a separate
<seclabel> element. At that point, libvirt will be able to track
more closely which files need a relabel attempt at shutdown. But
until we reach that point, the single <seclabel> for the entire
<disk> chain is treated as a hint - when a chain has only one
file, then we know it is accurate; but if the chain has more than
one file, we have to attempt relabel in spite of the attribute,
in case part of the chain is local and SELinux mattered for that
portion of the chain.
* src/conf/domain_conf.h (_virSecurityDeviceLabelDef): Add new
member.
* src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML):
Parse it, for live images only.
(virSecurityDeviceLabelDefFormat): Output it.
(virDomainDiskDefParseXML, virDomainChrSourceDefParseXML)
(virDomainDiskSourceDefFormat, virDomainChrDefFormat)
(virDomainDiskDefFormat): Pass flags on through.
* src/security/security_selinux.c
(virSecuritySELinuxRestoreSecurityImageLabelInt): Honor labelskip
when possible.
(virSecuritySELinuxSetSecurityFileLabel): Set labelskip, not
norelabel, if labeling fails.
(virSecuritySELinuxSetFileconHelper): Fix indentation.
* docs/formatdomain.html.in (seclabel): Document new xml.
* docs/schemas/domaincommon.rng (devSeclabel): Allow it in RNG.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.xml:
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-*-labelskip.args:
* tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-*-labelskip.xml:
New test files.
* tests/qemuxml2argvtest.c (mymain): Run the new tests.
* tests/qemuxml2xmltest.c (mymain): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-08-12 15:15:42 +00:00
|
|
|
</oneOrMore>
|
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>
|
2018-12-14 13:45:07 +00:00
|
|
|
<value>uml</value> <!-- NOT USED ANYMORE -->
|
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>
|
2015-08-21 21:43:48 +00:00
|
|
|
<value>vz</value>
|
2014-07-25 16:43:49 +00:00
|
|
|
<value>bhyve</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">
|
2014-11-08 16:48:32 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="bootloader"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<element name="os">
|
|
|
|
<interleave>
|
2019-02-22 14:25:17 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="firmware">
|
|
|
|
<choice>
|
|
|
|
<value>bios</value>
|
|
|
|
<value>efi</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2015-02-25 10:19:15 +00:00
|
|
|
<ref name="ostypehvm"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="loader">
|
2014-08-06 11:18:53 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="readonly">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-07-13 07:22:51 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="secure">
|
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>no</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2014-08-06 11:18:53 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>rom</value>
|
|
|
|
<value>pflash</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2019-02-25 10:31:17 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</optional>
|
2014-08-06 11:18:53 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="nvram">
|
2014-08-07 14:59:21 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="template">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2013-06-12 10:14:31 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="osbootdev"/>
|
|
|
|
</zeroOrMore>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="bootmenu">
|
|
|
|
<attribute name="enable">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
2014-08-22 11:39:26 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="timeout">
|
|
|
|
<ref name="unsignedShort"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="smbios"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="bios"/>
|
|
|
|
</optional>
|
2016-04-18 15:13:02 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="acpiTable"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2018-08-05 21:48:45 +00:00
|
|
|
<value>xenfv</value>
|
2018-11-26 19:34:37 +00:00
|
|
|
<value>xenpvh</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<choice>
|
|
|
|
<value>xen</value>
|
|
|
|
<value>linux</value>
|
2018-11-26 19:34:37 +00:00
|
|
|
<value>xenpvh</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="ostypehvm">
|
|
|
|
<element name="type">
|
|
|
|
<optional>
|
2015-06-08 13:42:30 +00:00
|
|
|
<attribute name="arch">
|
|
|
|
<ref name="archnames"/>
|
|
|
|
</attribute>
|
2013-07-30 19:41:14 +00:00
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="machine">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-zA-Z0-9_\.\-]+</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2015-04-09 08:49:02 +00:00
|
|
|
<value>hvm</value>
|
|
|
|
</element>
|
2013-07-30 19:41:14 +00:00
|
|
|
</define>
|
2015-04-09 08:49:02 +00:00
|
|
|
|
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>
|
2015-06-08 13:42:30 +00:00
|
|
|
<attribute name="arch">
|
|
|
|
<ref name="archnames"/>
|
|
|
|
</attribute>
|
2012-03-26 17:11:09 +00:00
|
|
|
</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>
|
2017-05-30 15:03:58 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="initenv">
|
|
|
|
<attribute name="name">
|
|
|
|
<data type='string'>
|
|
|
|
<param name='pattern'>[a-zA-Z_]+[a-zA-Z0-9_]*</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2017-05-31 13:32:11 +00:00
|
|
|
<optional>
|
|
|
|
<element name="initdir">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-06-06 08:54:16 +00:00
|
|
|
<optional>
|
|
|
|
<element name="inituser">
|
|
|
|
<choice>
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
<element name="initgroup">
|
|
|
|
<choice>
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
2015-04-09 08:49:02 +00:00
|
|
|
|
2015-04-27 21:57:27 +00:00
|
|
|
<define name="keywrap">
|
|
|
|
<element name="keywrap">
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="cipher">
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>aes</value>
|
|
|
|
<value>dea</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="state">
|
|
|
|
<ref name='virOnOff'/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
2016-03-28 13:30:30 +00:00
|
|
|
</define>
|
|
|
|
|
2018-06-12 11:50:25 +00:00
|
|
|
<define name="launchSecurity">
|
|
|
|
<element name="launchSecurity">
|
2018-06-08 14:40:56 +00:00
|
|
|
<attribute name="type">
|
|
|
|
<value>sev</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="cbitpos">
|
|
|
|
<data type='unsignedInt'/>
|
|
|
|
</element>
|
2018-06-12 11:50:25 +00:00
|
|
|
<element name="reducedPhysBits">
|
2018-06-08 14:40:56 +00:00
|
|
|
<data type='unsignedInt'/>
|
|
|
|
</element>
|
|
|
|
<element name="policy">
|
|
|
|
<ref name='hexuint'/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name="handle">
|
|
|
|
<ref name='unsignedInt'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
2018-06-12 11:50:25 +00:00
|
|
|
<element name="dhCert">
|
2018-06-08 14:40:56 +00:00
|
|
|
<data type="string"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="session">
|
|
|
|
<data type="string"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2016-03-28 13:30:30 +00:00
|
|
|
<!--
|
|
|
|
Enable or disable perf events for the domain. For each
|
|
|
|
of the events the following rules apply:
|
|
|
|
on: the event will be forcefully enabled
|
|
|
|
off: the event will be forcefully disabled
|
|
|
|
not specified: the event will be disabled by default
|
|
|
|
-->
|
|
|
|
<define name="perf">
|
|
|
|
<element name="perf">
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="event">
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>cmt</value>
|
2016-06-15 14:31:19 +00:00
|
|
|
<value>mbmt</value>
|
|
|
|
<value>mbml</value>
|
2016-07-16 08:15:12 +00:00
|
|
|
<value>cpu_cycles</value>
|
|
|
|
<value>instructions</value>
|
|
|
|
<value>cache_references</value>
|
|
|
|
<value>cache_misses</value>
|
2016-12-07 10:57:36 +00:00
|
|
|
<value>branch_instructions</value>
|
2016-12-11 13:30:11 +00:00
|
|
|
<value>branch_misses</value>
|
2016-12-13 16:01:38 +00:00
|
|
|
<value>bus_cycles</value>
|
2016-12-13 16:01:39 +00:00
|
|
|
<value>stalled_cycles_frontend</value>
|
2016-12-13 16:01:40 +00:00
|
|
|
<value>stalled_cycles_backend</value>
|
2016-12-13 16:01:41 +00:00
|
|
|
<value>ref_cpu_cycles</value>
|
2017-02-23 14:55:30 +00:00
|
|
|
<value>cpu_clock</value>
|
2017-02-23 14:55:31 +00:00
|
|
|
<value>task_clock</value>
|
2017-02-23 14:55:32 +00:00
|
|
|
<value>page_faults</value>
|
2017-02-23 14:55:33 +00:00
|
|
|
<value>context_switches</value>
|
2017-02-23 14:55:34 +00:00
|
|
|
<value>cpu_migrations</value>
|
2017-02-23 14:55:35 +00:00
|
|
|
<value>page_faults_min</value>
|
2017-02-23 14:55:36 +00:00
|
|
|
<value>page_faults_maj</value>
|
2017-02-23 14:55:37 +00:00
|
|
|
<value>alignment_faults</value>
|
2017-02-23 14:55:38 +00:00
|
|
|
<value>emulation_faults</value>
|
2016-03-28 13:30:30 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="enabled">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
2015-04-27 21:57:27 +00:00
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
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>
|
2018-04-09 16:10:02 +00:00
|
|
|
<optional>
|
|
|
|
<element name="genid">
|
|
|
|
<choice>
|
|
|
|
<ref name="UUID"/>
|
|
|
|
<empty/>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</define>
|
2013-06-07 07:12:18 +00:00
|
|
|
<define name="idmap">
|
2014-01-10 17:40:01 +00:00
|
|
|
<element name="idmap">
|
|
|
|
<interleave>
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="uid">
|
|
|
|
<attribute name="start">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="target">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="count">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="gid">
|
|
|
|
<attribute name="start">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="target">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="count">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
2017-09-07 10:16:04 +00:00
|
|
|
<empty/>
|
2014-01-10 17:40:01 +00:00
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
2013-06-07 07:12:18 +00:00
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
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>
|
2015-03-04 10:04:27 +00:00
|
|
|
<optional>
|
|
|
|
<element name="memory">
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
<optional>
|
|
|
|
<attribute name="dumpCore">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-08-11 15:40:32 +00:00
|
|
|
<optional>
|
|
|
|
<element name="maxMemory">
|
|
|
|
<ref name="scaledInteger"/>
|
|
|
|
<attribute name="slots">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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">
|
2013-05-14 05:25:50 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="hugepages">
|
2014-07-23 15:37:20 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="page">
|
|
|
|
<attribute name="size">
|
|
|
|
<ref name="unsignedLong"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='unit'>
|
|
|
|
<ref name='unit'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="nodeset">
|
|
|
|
<ref name='cpuset'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2013-05-14 05:25:50 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="nosharepages">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-05-16 20:00:03 +00:00
|
|
|
<optional>
|
|
|
|
<element name="locked">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-02-02 13:27:32 +00:00
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>file</value>
|
|
|
|
<value>anonymous</value>
|
2018-11-15 11:55:53 +00:00
|
|
|
<value>memfd</value>
|
2017-02-02 13:27:32 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="access">
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>shared</value>
|
|
|
|
<value>private</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="allocation">
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>immediate</value>
|
|
|
|
<value>ondemand</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-05-11 13:08:53 +00:00
|
|
|
<optional>
|
|
|
|
<element name="discard">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-05-14 05:25:50 +00:00
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
|
|
|
|
2016-08-02 15:58:43 +00:00
|
|
|
<optional>
|
|
|
|
<element name="vcpus">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="vcpu">
|
|
|
|
<attribute name="id">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="enabled">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="hotpluggable">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="order">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
|
2014-08-22 14:15:51 +00:00
|
|
|
<optional>
|
|
|
|
<element name="iothreads">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
|
2015-04-02 23:59:25 +00:00
|
|
|
<optional>
|
|
|
|
<element name="iothreadids">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="iothread">
|
|
|
|
<attribute name="id">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
2013-04-04 11:40:36 +00:00
|
|
|
<ref name="blkiotune"/>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="memtune"/>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="cputune"/>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="numatune"/>
|
|
|
|
</optional>
|
2013-03-21 11:28:10 +00:00
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="respartition"/>
|
|
|
|
</optional>
|
2013-04-04 11:40:36 +00:00
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<!-- The Blkio cgroup related tunables would go in the blkiotune -->
|
|
|
|
<define name="blkiotune">
|
|
|
|
<element name="blkiotune">
|
|
|
|
<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>
|
2013-12-11 08:29:49 +00:00
|
|
|
<optional>
|
|
|
|
<element name="weight">
|
|
|
|
<ref name="weight"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="read_iops_sec">
|
|
|
|
<data type='unsignedInt'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="write_iops_sec">
|
|
|
|
<data type='unsignedInt'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="read_bytes_sec">
|
|
|
|
<data type='unsignedLong'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="write_bytes_sec">
|
|
|
|
<data type='unsignedLong'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-04-04 11:40:36 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<!-- All the memory/swap related tunables would go in the memtune -->
|
|
|
|
<define name="memtune">
|
|
|
|
<element name="memtune">
|
|
|
|
<!-- Maximum memory the VM can use -->
|
|
|
|
<optional>
|
|
|
|
<element name="hard_limit">
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!-- Minimum memory ascertained for the VM during contention -->
|
|
|
|
<optional>
|
|
|
|
<element name="soft_limit">
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!-- Minimum amount of memory required to start the VM -->
|
|
|
|
<optional>
|
|
|
|
<element name="min_guarantee">
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!-- Maximum swap area the VM can use -->
|
|
|
|
<optional>
|
|
|
|
<element name="swap_hard_limit">
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<!-- All the cpu related tunables would go in the cputune -->
|
|
|
|
<define name="cputune">
|
|
|
|
<element name="cputune">
|
2014-09-15 23:33:16 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="shares">
|
|
|
|
<ref name="cpushares"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-02-16 13:43:33 +00:00
|
|
|
<optional>
|
|
|
|
<element name="global_period">
|
|
|
|
<ref name="cpuperiod"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-02-16 13:43:34 +00:00
|
|
|
<optional>
|
|
|
|
<element name="global_quota">
|
|
|
|
<ref name="cpuquota"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-09-15 23:33:16 +00:00
|
|
|
<optional>
|
|
|
|
<element name="period">
|
|
|
|
<ref name="cpuperiod"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="quota">
|
|
|
|
<ref name="cpuquota"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="emulator_period">
|
|
|
|
<ref name="cpuperiod"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="emulator_quota">
|
|
|
|
<ref name="cpuquota"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-07-25 11:04:38 +00:00
|
|
|
<optional>
|
|
|
|
<element name="iothread_period">
|
|
|
|
<ref name="cpuperiod"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="iothread_quota">
|
|
|
|
<ref name="cpuquota"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-09-15 23:33:16 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="vcpupin">
|
|
|
|
<attribute name="vcpu">
|
|
|
|
<ref name="vcpuid"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="cpuset">
|
|
|
|
<ref name="cpuset"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
<optional>
|
|
|
|
<element name="emulatorpin">
|
|
|
|
<attribute name="cpuset">
|
|
|
|
<ref name="cpuset"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="iothreadpin">
|
|
|
|
<attribute name="iothread">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="cpuset">
|
|
|
|
<ref name="cpuset"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2015-01-08 12:54:21 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="vcpusched">
|
|
|
|
<optional>
|
|
|
|
<attribute name="vcpus">
|
|
|
|
<ref name='cpuset'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<ref name="schedparam"/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="iothreadsched">
|
|
|
|
<optional>
|
|
|
|
<attribute name="iothreads">
|
|
|
|
<ref name='cpuset'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<ref name="schedparam"/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2017-11-10 13:47:05 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="cachetune">
|
|
|
|
<attribute name="vcpus">
|
|
|
|
<ref name='cpuset'/>
|
|
|
|
</attribute>
|
2018-11-12 13:31:32 +00:00
|
|
|
<zeroOrMore>
|
2017-11-10 13:47:05 +00:00
|
|
|
<element name="cache">
|
|
|
|
<attribute name="id">
|
|
|
|
<ref name='unsignedInt'/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="level">
|
|
|
|
<ref name='unsignedInt'/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>both</value>
|
|
|
|
<value>code</value>
|
|
|
|
<value>data</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="size">
|
|
|
|
<ref name='unsignedLong'/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='unit'>
|
|
|
|
<ref name='unit'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
2018-11-12 13:31:32 +00:00
|
|
|
</zeroOrMore>
|
2018-11-12 13:31:44 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="monitor">
|
|
|
|
<attribute name="level">
|
|
|
|
<ref name='unsignedInt'/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="vcpus">
|
|
|
|
<ref name='cpuset'/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2017-11-10 13:47:05 +00:00
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2018-07-30 03:12:39 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="memorytune">
|
|
|
|
<attribute name="vcpus">
|
|
|
|
<ref name='cpuset'/>
|
|
|
|
</attribute>
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="node">
|
|
|
|
<attribute name="id">
|
|
|
|
<ref name='unsignedInt'/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="bandwidth">
|
|
|
|
<ref name='unsignedInt'/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2014-09-15 23:33:16 +00:00
|
|
|
</interleave>
|
2013-04-04 11:40:36 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
|
2015-01-08 12:54:21 +00:00
|
|
|
<define name="schedparam">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="scheduler">
|
|
|
|
<choice>
|
|
|
|
<value>batch</value>
|
|
|
|
<value>idle</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="scheduler">
|
|
|
|
<choice>
|
|
|
|
<value>fifo</value>
|
|
|
|
<value>rr</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="priority">
|
|
|
|
<ref name="unsignedShort"/>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
2013-04-04 11:40:36 +00:00
|
|
|
<!-- All the NUMA related tunables would go in the numatune -->
|
|
|
|
<define name="numatune">
|
|
|
|
<element name="numatune">
|
2014-07-16 20:53:32 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="memory">
|
|
|
|
<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>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
2014-07-16 18:35:58 +00:00
|
|
|
<element name="memnode">
|
|
|
|
<attribute name="cellid">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>strict</value>
|
|
|
|
<value>preferred</value>
|
|
|
|
<value>interleave</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name='nodeset'>
|
|
|
|
<ref name='cpuset'/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
2014-07-16 20:53:32 +00:00
|
|
|
</zeroOrMore>
|
|
|
|
</interleave>
|
2013-04-04 11:40:36 +00:00
|
|
|
</element>
|
2011-08-13 01:33:15 +00:00
|
|
|
</define>
|
2013-04-04 11:40:36 +00:00
|
|
|
|
2013-03-21 11:28:10 +00:00
|
|
|
<define name="respartition">
|
|
|
|
<element name="resource">
|
|
|
|
<element name="partition">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<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">
|
2014-02-04 18:02:04 +00:00
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>platform</value>
|
|
|
|
<value>rtc</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="track">
|
|
|
|
<choice>
|
|
|
|
<value>boot</value>
|
|
|
|
<value>guest</value>
|
|
|
|
<value>wall</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="tickpolicy"/>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="name">
|
|
|
|
<value>tsc</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<ref name="tickpolicy"/>
|
|
|
|
</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>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>hpet</value>
|
|
|
|
<value>pit</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<ref name="tickpolicy"/>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="name">
|
2014-01-21 17:50:12 +00:00
|
|
|
<choice>
|
|
|
|
<value>kvmclock</value>
|
|
|
|
<value>hypervclock</value>
|
|
|
|
</choice>
|
2014-02-04 18:02:04 +00:00
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="present">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
2014-02-04 18:02:04 +00:00
|
|
|
|
|
|
|
<define name="tickpolicy">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="tickpolicy">
|
|
|
|
<choice>
|
|
|
|
<value>delay</value>
|
|
|
|
<value>merge</value>
|
|
|
|
<value>discard</value>
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
2014-02-04 18:02:04 +00:00
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="tickpolicy">
|
|
|
|
<value>catchup</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
2014-02-04 18:02:04 +00:00
|
|
|
<optional>
|
|
|
|
<element name="catchup">
|
|
|
|
<optional>
|
|
|
|
<attribute name="threshold">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="slew">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="limit">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2014-11-08 16:48:32 +00:00
|
|
|
<optional>
|
|
|
|
<element name="bootloader">
|
|
|
|
<choice>
|
2017-11-29 17:43:29 +00:00
|
|
|
<text/>
|
2014-11-08 16:48:32 +00:00
|
|
|
<empty/>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2013-03-14 04:49:42 +00:00
|
|
|
<optional>
|
|
|
|
<element name="dtb">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2013-04-22 14:06:14 +00:00
|
|
|
<ref name="diskDriver"/>
|
2011-11-15 09:02:46 +00:00
|
|
|
</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>
|
2015-02-20 03:22:05 +00:00
|
|
|
<optional>
|
|
|
|
<element name="backenddomain">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="domainName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-11-15 09:02:46 +00:00
|
|
|
<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>
|
2012-09-04 14:30:55 +00:00
|
|
|
<ref name="diskBlockIo"/>
|
2012-08-29 15:48:30 +00:00
|
|
|
</optional>
|
2012-09-11 08:57:01 +00:00
|
|
|
<optional>
|
|
|
|
<element name="wwn">
|
|
|
|
<ref name="wwn"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-12-06 10:23:02 +00:00
|
|
|
<optional>
|
|
|
|
<element name="vendor">
|
|
|
|
<data type="string">
|
2016-04-15 17:21:27 +00:00
|
|
|
<!-- All printable characters -->
|
|
|
|
<param name="pattern">[ -~]{0,8}</param>
|
2012-12-06 10:23:02 +00:00
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="product">
|
|
|
|
<data type="string">
|
2016-04-15 17:21:27 +00:00
|
|
|
<!-- All printable characters -->
|
|
|
|
<param name="pattern">[ -~]{0,16}</param>
|
2012-12-06 10:23:02 +00:00
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</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">
|
2013-01-02 14:37:08 +00:00
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="device">
|
|
|
|
<choice>
|
|
|
|
<value>floppy</value>
|
|
|
|
<value>disk</value>
|
|
|
|
<value>cdrom</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2015-04-17 11:14:12 +00:00
|
|
|
<interleave>
|
|
|
|
<ref name="diskSource"/>
|
|
|
|
<ref name="diskSpecsExtra"/>
|
|
|
|
</interleave>
|
2013-01-02 14:37:08 +00:00
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="device">
|
2015-04-17 11:14:12 +00:00
|
|
|
<value>lun</value>
|
2013-01-02 14:37:08 +00:00
|
|
|
</attribute>
|
|
|
|
<optional>
|
2014-09-09 22:48:57 +00:00
|
|
|
<ref name="rawIO"/>
|
2013-01-02 14:37:08 +00:00
|
|
|
</optional>
|
|
|
|
<optional>
|
2015-04-20 07:49:36 +00:00
|
|
|
<ref name="sgIO"/>
|
2013-01-02 14:37:08 +00:00
|
|
|
</optional>
|
2015-04-17 11:14:12 +00:00
|
|
|
<interleave>
|
|
|
|
<choice>
|
|
|
|
<ref name="diskSourceNetwork"/>
|
|
|
|
<ref name="diskSourceBlock"/>
|
2015-06-11 21:07:38 +00:00
|
|
|
<ref name="diskSourceVolume"/>
|
2015-04-17 11:14:12 +00:00
|
|
|
</choice>
|
|
|
|
<ref name="diskSpecsExtra"/>
|
|
|
|
</interleave>
|
2013-01-02 14:37:08 +00:00
|
|
|
</group>
|
|
|
|
</choice>
|
2019-01-11 20:06:05 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 19:20:21 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="snapshot"/>
|
|
|
|
</optional>
|
2014-04-16 13:28:10 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2015-04-17 11:14:12 +00:00
|
|
|
<define name="diskSpecsExtra">
|
|
|
|
<interleave>
|
|
|
|
<ref name="storageSourceExtra"/>
|
|
|
|
<ref name="diskBackingChain"/>
|
|
|
|
</interleave>
|
|
|
|
</define>
|
|
|
|
|
2014-04-16 13:28:10 +00:00
|
|
|
<define name="diskBackingChain">
|
|
|
|
<choice>
|
|
|
|
<ref name="diskBackingStore"/>
|
|
|
|
<ref name="diskBackingStoreLast"/>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="diskBackingStore">
|
|
|
|
<element name="backingStore">
|
2017-09-26 12:00:57 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="index">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2014-04-16 13:28:10 +00:00
|
|
|
<interleave>
|
|
|
|
<ref name="diskSource"/>
|
|
|
|
<ref name="diskBackingChain"/>
|
|
|
|
<ref name="diskFormat"/>
|
|
|
|
</interleave>
|
2014-04-14 22:54:16 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2014-04-16 13:28:10 +00:00
|
|
|
<define name="diskFormat">
|
|
|
|
<element name="format">
|
|
|
|
<attribute name="type">
|
|
|
|
<ref name="storageFormat"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="diskBackingStoreLast">
|
|
|
|
<optional>
|
|
|
|
<element name="backingStore">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
2018-06-19 11:03:30 +00:00
|
|
|
<define name="diskSourceCommon">
|
|
|
|
<optional>
|
|
|
|
<attribute name="index">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
2014-04-14 22:54:16 +00:00
|
|
|
<define name="diskSource">
|
|
|
|
<choice>
|
|
|
|
<ref name="diskSourceFile"/>
|
|
|
|
<ref name="diskSourceBlock"/>
|
|
|
|
<ref name="diskSourceDir"/>
|
|
|
|
<ref name="diskSourceNetwork"/>
|
|
|
|
<ref name="diskSourceVolume"/>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="diskSourceFile">
|
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>file</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-04-20 15:32:42 +00:00
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<optional>
|
|
|
|
<attribute name="file">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-04-20 15:32:42 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="storageStartupPolicy"/>
|
|
|
|
</optional>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2017-04-20 15:32:42 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<ref name='devSeclabel'/>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-04-14 22:54:16 +00:00
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="diskSourceBlock">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>block</value>
|
|
|
|
</attribute>
|
2017-04-20 15:32:42 +00:00
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<optional>
|
|
|
|
<attribute name="dev">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-04-20 15:32:42 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="storageStartupPolicy"/>
|
|
|
|
</optional>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2017-11-27 10:54:33 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="reservations"/>
|
|
|
|
</optional>
|
2017-04-20 15:32:42 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<ref name='devSeclabel'/>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-04-14 22:54:16 +00:00
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="diskSourceDir">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>dir</value>
|
|
|
|
</attribute>
|
2017-04-20 15:32:42 +00:00
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dir">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-04-20 15:32:42 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="storageStartupPolicy"/>
|
|
|
|
</optional>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2017-04-20 15:32:42 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-04-14 22:54:16 +00:00
|
|
|
</define>
|
|
|
|
|
2017-04-20 14:20:26 +00:00
|
|
|
<define name="diskSourceNetworkHost">
|
|
|
|
<element name="host">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="transport">
|
|
|
|
<choice>
|
|
|
|
<value>tcp</value>
|
|
|
|
<value>rdma</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<ref name="dnsName"/>
|
|
|
|
<ref name="ipAddr"/>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="transport">
|
|
|
|
<value>unix</value>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="socket">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-04-21 09:48:12 +00:00
|
|
|
<define name="diskSourceNetworkProtocolRBD">
|
2017-04-21 09:43:56 +00:00
|
|
|
<element name="source">
|
|
|
|
<interleave>
|
2014-04-14 22:54:16 +00:00
|
|
|
<attribute name="protocol">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>rbd</value>
|
2014-04-14 22:54:16 +00:00
|
|
|
</attribute>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2014-04-14 22:54:16 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="name"/>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
2017-04-20 14:20:26 +00:00
|
|
|
<ref name="diskSourceNetworkHost"/>
|
2014-04-14 22:54:16 +00:00
|
|
|
</zeroOrMore>
|
2014-11-11 10:35:25 +00:00
|
|
|
<optional>
|
|
|
|
<element name="snapshot">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-11-11 16:31:24 +00:00
|
|
|
<optional>
|
|
|
|
<element name="config">
|
|
|
|
<attribute name="file">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-09-13 14:25:25 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="diskAuth"/>
|
|
|
|
</optional>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2014-04-14 22:54:16 +00:00
|
|
|
<empty/>
|
2017-04-21 09:43:56 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
2011-08-13 01:33:15 +00:00
|
|
|
</define>
|
2014-04-14 22:54:15 +00:00
|
|
|
|
2017-09-13 14:25:25 +00:00
|
|
|
<define name="diskSourceNetworkProtocolISCSI">
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="protocol">
|
|
|
|
<value>iscsi</value>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="name"/>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-09-13 14:25:25 +00:00
|
|
|
<ref name="diskSourceNetworkHost"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="diskAuth"/>
|
|
|
|
</optional>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2018-08-07 11:32:56 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="initiatorinfo"/>
|
|
|
|
</optional>
|
2017-09-13 14:25:25 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-04-20 14:41:17 +00:00
|
|
|
<define name="diskSourceNetworkProtocolHTTP">
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="protocol">
|
|
|
|
<choice>
|
|
|
|
<value>http</value>
|
|
|
|
<value>https</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="name"/>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-04-20 14:41:17 +00:00
|
|
|
<ref name="diskSourceNetworkHost"/>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2017-04-20 14:41:17 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-04-21 10:19:46 +00:00
|
|
|
<define name="diskSourceNetworkProtocolSimple">
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="protocol">
|
|
|
|
<choice>
|
|
|
|
<value>sheepdog</value>
|
|
|
|
<value>ftp</value>
|
|
|
|
<value>ftps</value>
|
|
|
|
<value>tftp</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="name"/>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-04-21 10:19:46 +00:00
|
|
|
<ref name="diskSourceNetworkHost"/>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2017-04-21 10:19:46 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-04-21 13:41:29 +00:00
|
|
|
<define name="diskSourceNetworkProtocolNBD">
|
2017-04-21 09:48:12 +00:00
|
|
|
<element name="source">
|
2017-04-21 13:41:29 +00:00
|
|
|
<attribute name="protocol">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>nbd</value>
|
2017-04-21 13:41:29 +00:00
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="name"/>
|
|
|
|
</optional>
|
2018-05-29 11:57:17 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="tls">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-04-21 13:41:29 +00:00
|
|
|
<ref name="diskSourceNetworkHost"/>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2017-04-21 13:41:29 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="diskSourceNetworkProtocolGluster">
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="protocol">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>gluster</value>
|
2017-04-21 13:41:29 +00:00
|
|
|
</attribute>
|
|
|
|
<attribute name="name"/>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-04-21 13:41:29 +00:00
|
|
|
<oneOrMore>
|
|
|
|
<ref name="diskSourceNetworkHost"/>
|
|
|
|
</oneOrMore>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2017-04-21 09:48:12 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-08-30 13:41:23 +00:00
|
|
|
<define name="diskSourceNetworkProtocolVxHS">
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="protocol">
|
|
|
|
<choice>
|
|
|
|
<value>vxhs</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="name"/>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-08-30 15:35:34 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="tls">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-08-30 13:41:23 +00:00
|
|
|
<ref name="diskSourceNetworkHost"/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-04-21 09:48:12 +00:00
|
|
|
<define name="diskSourceNetwork">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>network</value>
|
|
|
|
</attribute>
|
|
|
|
<choice>
|
2017-04-21 13:41:29 +00:00
|
|
|
<ref name="diskSourceNetworkProtocolNBD"/>
|
|
|
|
<ref name="diskSourceNetworkProtocolGluster"/>
|
2017-04-21 09:48:12 +00:00
|
|
|
<ref name="diskSourceNetworkProtocolRBD"/>
|
2017-09-13 14:25:25 +00:00
|
|
|
<ref name="diskSourceNetworkProtocolISCSI"/>
|
2017-04-20 14:41:17 +00:00
|
|
|
<ref name="diskSourceNetworkProtocolHTTP"/>
|
2017-04-21 10:19:46 +00:00
|
|
|
<ref name="diskSourceNetworkProtocolSimple"/>
|
2017-08-30 13:41:23 +00:00
|
|
|
<ref name="diskSourceNetworkProtocolVxHS"/>
|
2017-04-21 09:48:12 +00:00
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
2014-04-14 22:54:16 +00:00
|
|
|
<define name="diskSourceVolume">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>volume</value>
|
2013-04-03 12:14:05 +00:00
|
|
|
</attribute>
|
2017-04-20 15:32:42 +00:00
|
|
|
<optional>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="pool">
|
2017-10-03 11:14:04 +00:00
|
|
|
<ref name="poolName"/>
|
2017-04-20 15:32:42 +00:00
|
|
|
</attribute>
|
|
|
|
<attribute name="volume">
|
|
|
|
<ref name="volName"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="mode">
|
|
|
|
<choice>
|
|
|
|
<value>host</value>
|
|
|
|
<value>direct</value>
|
|
|
|
</choice>
|
2014-04-14 22:54:16 +00:00
|
|
|
</attribute>
|
2017-04-20 15:32:42 +00:00
|
|
|
</optional>
|
2018-06-19 11:03:30 +00:00
|
|
|
<ref name="diskSourceCommon"/>
|
2017-04-20 15:32:42 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="storageStartupPolicy"/>
|
|
|
|
</optional>
|
2017-09-14 13:32:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="encryption"/>
|
|
|
|
</optional>
|
2017-04-20 15:32:42 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<ref name='devSeclabel'/>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-04-03 12:14:05 +00:00
|
|
|
</define>
|
2014-04-14 22:54:16 +00:00
|
|
|
|
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>
|
2018-12-14 13:45:07 +00:00
|
|
|
<value>uml</value> <!-- NOT USED ANYMORE -->
|
2011-09-28 03:46:08 +00:00
|
|
|
<value>sata</value>
|
2013-07-31 13:00:26 +00:00
|
|
|
<value>sd</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>
|
2013-08-23 10:38:11 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="removable">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virOnOff"/>
|
2013-08-23 10:38:11 +00:00
|
|
|
</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-09-04 14:30:55 +00:00
|
|
|
<define name="diskBlockIo">
|
|
|
|
<element name="blockio">
|
2012-08-29 15:48:30 +00:00
|
|
|
<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
|
|
|
-->
|
2013-04-22 14:06:14 +00:00
|
|
|
<define name="diskDriver">
|
2011-08-13 01:33:15 +00:00
|
|
|
<element name="driver">
|
2014-04-14 22:54:19 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="driverFormat"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="driverCache"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2013-05-14 12:44:54 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="discard"/>
|
|
|
|
</optional>
|
2014-08-25 12:43:17 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="driverIOThread"/>
|
|
|
|
</optional>
|
2016-04-14 20:32:54 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="detect_zeroes"/>
|
|
|
|
</optional>
|
2017-09-30 17:15:36 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='queues'>
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-06-06 14:49:17 +00:00
|
|
|
<ref name="virtioOptions"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="driverFormat">
|
2017-07-18 16:20:35 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="genericName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
2012-09-28 18:57:54 +00:00
|
|
|
<attribute name='type'>
|
|
|
|
<choice>
|
2013-04-22 14:06:14 +00:00
|
|
|
<ref name='storageFormat'/>
|
2012-09-28 18:57:54 +00:00
|
|
|
<value>aio</value> <!-- back-compat for 'raw' -->
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
2014-04-14 22:54:13 +00:00
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="driverCache">
|
|
|
|
<attribute name="cache">
|
|
|
|
<choice>
|
2016-02-29 23:25:38 +00:00
|
|
|
<value>default</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virOnOff"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
<define name="event_idx">
|
|
|
|
<attribute name="event_idx">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virOnOff"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</define>
|
2012-01-12 09:31:14 +00:00
|
|
|
<define name="copy_on_read">
|
|
|
|
<attribute name='copy_on_read'>
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virOnOff"/>
|
2012-01-12 09:31:14 +00:00
|
|
|
</attribute>
|
2017-09-07 10:16:04 +00:00
|
|
|
</define>
|
2013-05-14 12:44:54 +00:00
|
|
|
<define name="discard">
|
|
|
|
<attribute name='discard'>
|
|
|
|
<choice>
|
2013-05-17 02:35:02 +00:00
|
|
|
<value>unmap</value>
|
|
|
|
<value>ignore</value>
|
2013-05-14 12:44:54 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
2012-01-12 09:31:14 +00:00
|
|
|
</define>
|
2014-08-25 12:43:17 +00:00
|
|
|
<define name="driverIOThread">
|
|
|
|
<attribute name='iothread'>
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2016-04-14 20:32:54 +00:00
|
|
|
<define name="detect_zeroes">
|
|
|
|
<attribute name='detect_zeroes'>
|
|
|
|
<choice>
|
|
|
|
<value>off</value>
|
|
|
|
<value>on</value>
|
|
|
|
<value>unmap</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="controller">
|
|
|
|
<element name="controller">
|
2016-05-10 17:14:32 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="index">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
<choice>
|
2017-10-24 19:35:32 +00:00
|
|
|
<!-- fdc/sata/ccid have only the common attributes -->
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
<group>
|
2011-08-13 01:33:15 +00:00
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>fdc</value>
|
|
|
|
<value>sata</value>
|
|
|
|
<value>ccid</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
</group>
|
|
|
|
<!-- scsi has an optional attribute "model" -->
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>scsi</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>auto</value>
|
|
|
|
<value>buslogic</value>
|
|
|
|
<value>lsilogic</value>
|
|
|
|
<value>lsisas1068</value>
|
|
|
|
<value>vmpvscsi</value>
|
|
|
|
<value>ibmvscsi</value>
|
|
|
|
<value>virtio-scsi</value>
|
|
|
|
<value>lsisas1078</value>
|
2019-01-17 17:52:43 +00:00
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
2016-04-23 23:52:56 +00:00
|
|
|
<!-- usb has an optional attribute "model",
|
|
|
|
and optional subelements "master" and "ports" -->
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>usb</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<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>
|
|
|
|
<value>nec-xhci</value>
|
|
|
|
<value>none</value>
|
2016-06-15 06:00:08 +00:00
|
|
|
<value>qusb1</value>
|
|
|
|
<value>qusb2</value>
|
2017-04-13 10:25:25 +00:00
|
|
|
<value>qemu-xhci</value>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="usbmaster"/>
|
|
|
|
</optional>
|
2016-04-23 23:52:56 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="ports">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
</group>
|
2017-10-24 19:35:32 +00:00
|
|
|
<!-- ide has an optional attribute "model" -->
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>ide</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>piix3</value>
|
|
|
|
<value>piix4</value>
|
|
|
|
<value>ich6</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
2013-04-17 15:05:15 +00:00
|
|
|
<!-- pci has an optional attribute "model" -->
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>pci</value>
|
|
|
|
</attribute>
|
conf: add new <model> subelement with name attribute to <controller>
This new subelement is used in PCI controllers: the toplevel
*attribute* "model" of a controller denotes what kind of PCI
controller is being described, e.g. a "dmi-to-pci-bridge",
"pci-bridge", or "pci-root". But in the future there will be different
implementations of some of those types of PCI controllers, which
behave similarly from libvirt's point of view (and so should have the
same model), but use a different device in qemu (and present
themselves as a different piece of hardware in the guest). In an ideal
world we (i.e. "I") would have thought of that back when the pci
controllers were added, and used some sort of type/class/model
notation (where class was used in the way we are now using model, and
model was used for the actual manufacturer's model number of a
particular family of PCI controller), but that opportunity is long
past, so as an alternative, this patch allows selecting a particular
implementation of a pci controller with the "name" attribute of the
<model> subelement, e.g.:
<controller type='pci' model='dmi-to-pci-bridge' index='1'>
<model name='i82801b11-bridge'/>
</controller>
In this case, "dmi-to-pci-bridge" is the kind of controller (one that
has a single PCIe port upstream, and 32 standard PCI ports downstream,
which are not hotpluggable), and the qemu device to be used to
implement this kind of controller is named "i82801b11-bridge".
Implementing the above now will allow us in the future to add a new
kind of dmi-to-pci-bridge that doesn't use qemu's i82801b11-bridge
device, but instead uses something else (which doesn't yet exist, but
qemu people have been discussing it), all without breaking existing
configs.
(note that for the existing "pci-bridge" type of PCI controller, both
the model attribute and <model> name are 'pci-bridge'. This is just a
coincidence, since it turns out that in this case the device name in
qemu really is a generic 'pci-bridge' rather than being the name of
some real-world chip)
2015-06-25 17:30:23 +00:00
|
|
|
<optional>
|
|
|
|
<element name="model">
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
2017-02-28 13:58:08 +00:00
|
|
|
<!-- implementations of 'pci-root' -->
|
|
|
|
<value>spapr-pci-host-bridge</value>
|
conf: add new <model> subelement with name attribute to <controller>
This new subelement is used in PCI controllers: the toplevel
*attribute* "model" of a controller denotes what kind of PCI
controller is being described, e.g. a "dmi-to-pci-bridge",
"pci-bridge", or "pci-root". But in the future there will be different
implementations of some of those types of PCI controllers, which
behave similarly from libvirt's point of view (and so should have the
same model), but use a different device in qemu (and present
themselves as a different piece of hardware in the guest). In an ideal
world we (i.e. "I") would have thought of that back when the pci
controllers were added, and used some sort of type/class/model
notation (where class was used in the way we are now using model, and
model was used for the actual manufacturer's model number of a
particular family of PCI controller), but that opportunity is long
past, so as an alternative, this patch allows selecting a particular
implementation of a pci controller with the "name" attribute of the
<model> subelement, e.g.:
<controller type='pci' model='dmi-to-pci-bridge' index='1'>
<model name='i82801b11-bridge'/>
</controller>
In this case, "dmi-to-pci-bridge" is the kind of controller (one that
has a single PCIe port upstream, and 32 standard PCI ports downstream,
which are not hotpluggable), and the qemu device to be used to
implement this kind of controller is named "i82801b11-bridge".
Implementing the above now will allow us in the future to add a new
kind of dmi-to-pci-bridge that doesn't use qemu's i82801b11-bridge
device, but instead uses something else (which doesn't yet exist, but
qemu people have been discussing it), all without breaking existing
configs.
(note that for the existing "pci-bridge" type of PCI controller, both
the model attribute and <model> name are 'pci-bridge'. This is just a
coincidence, since it turns out that in this case the device name in
qemu really is a generic 'pci-bridge' rather than being the name of
some real-world chip)
2015-06-25 17:30:23 +00:00
|
|
|
<!-- implementations of 'pci-bridge' -->
|
|
|
|
<value>pci-bridge</value>
|
|
|
|
<!-- implementations of 'dmi-to-pci-bridge' -->
|
|
|
|
<value>i82801b11-bridge</value>
|
2018-01-11 16:28:43 +00:00
|
|
|
<!-- implementations of 'pcie-to-pci-bridge' -->
|
|
|
|
<value>pcie-pci-bridge</value>
|
2015-06-17 17:21:16 +00:00
|
|
|
<!-- implementations of 'pcie-root-port' -->
|
|
|
|
<value>ioh3420</value>
|
2017-01-16 12:28:20 +00:00
|
|
|
<value>pcie-root-port</value>
|
2015-06-16 19:00:44 +00:00
|
|
|
<!-- implementations of 'pcie-switch-upstream-port' -->
|
|
|
|
<value>x3130-upstream</value>
|
2015-06-17 19:27:40 +00:00
|
|
|
<!-- implementations of 'pcie-switch-downstream-port' -->
|
|
|
|
<value>xio3130-downstream</value>
|
2016-03-04 15:26:23 +00:00
|
|
|
<!-- implementations of 'pci-expander-bus' -->
|
|
|
|
<value>pxb</value>
|
2016-03-16 17:37:14 +00:00
|
|
|
<!-- implementations of 'pcie-expander-bus' -->
|
|
|
|
<value>pxb-pcie</value>
|
conf: add new <model> subelement with name attribute to <controller>
This new subelement is used in PCI controllers: the toplevel
*attribute* "model" of a controller denotes what kind of PCI
controller is being described, e.g. a "dmi-to-pci-bridge",
"pci-bridge", or "pci-root". But in the future there will be different
implementations of some of those types of PCI controllers, which
behave similarly from libvirt's point of view (and so should have the
same model), but use a different device in qemu (and present
themselves as a different piece of hardware in the guest). In an ideal
world we (i.e. "I") would have thought of that back when the pci
controllers were added, and used some sort of type/class/model
notation (where class was used in the way we are now using model, and
model was used for the actual manufacturer's model number of a
particular family of PCI controller), but that opportunity is long
past, so as an alternative, this patch allows selecting a particular
implementation of a pci controller with the "name" attribute of the
<model> subelement, e.g.:
<controller type='pci' model='dmi-to-pci-bridge' index='1'>
<model name='i82801b11-bridge'/>
</controller>
In this case, "dmi-to-pci-bridge" is the kind of controller (one that
has a single PCIe port upstream, and 32 standard PCI ports downstream,
which are not hotpluggable), and the qemu device to be used to
implement this kind of controller is named "i82801b11-bridge".
Implementing the above now will allow us in the future to add a new
kind of dmi-to-pci-bridge that doesn't use qemu's i82801b11-bridge
device, but instead uses something else (which doesn't yet exist, but
qemu people have been discussing it), all without breaking existing
configs.
(note that for the existing "pci-bridge" type of PCI controller, both
the model attribute and <model> name are 'pci-bridge'. This is just a
coincidence, since it turns out that in this case the device name in
qemu really is a generic 'pci-bridge' rather than being the name of
some real-world chip)
2015-06-25 17:30:23 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2015-07-01 16:47:55 +00:00
|
|
|
<optional>
|
|
|
|
<element name="target">
|
|
|
|
<optional>
|
|
|
|
<attribute name='chassisNr'>
|
2016-03-22 16:00:40 +00:00
|
|
|
<ref name='uint8'/>
|
2015-07-01 16:47:55 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
2015-06-17 17:21:16 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="chassis">
|
2016-03-22 16:00:40 +00:00
|
|
|
<ref name='uint8'/>
|
2015-06-17 17:21:16 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="port">
|
2016-03-22 16:00:40 +00:00
|
|
|
<ref name='uint8'/>
|
2015-06-17 17:21:16 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-03-04 15:26:23 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='busNr'>
|
|
|
|
<ref name='uint8'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-02-22 10:42:19 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='index'>
|
|
|
|
<ref name='uint8'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-03-04 15:26:23 +00:00
|
|
|
<optional>
|
|
|
|
<element name='node'>
|
|
|
|
<ref name='unsignedInt'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2015-07-01 16:47:55 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
2013-08-12 11:39:04 +00:00
|
|
|
<!-- *-root controllers have an optional element "pcihole64"-->
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>pci-root</value>
|
|
|
|
<value>pcie-root</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<element name="pcihole64">
|
|
|
|
<ref name="scaledInteger"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>pci-bridge</value>
|
|
|
|
<value>dmi-to-pci-bridge</value>
|
2018-01-11 16:28:43 +00:00
|
|
|
<value>pcie-to-pci-bridge</value>
|
2015-06-17 17:21:16 +00:00
|
|
|
<value>pcie-root-port</value>
|
2015-06-16 19:00:44 +00:00
|
|
|
<value>pcie-switch-upstream-port</value>
|
2015-06-17 19:27:40 +00:00
|
|
|
<value>pcie-switch-downstream-port</value>
|
2016-03-04 15:26:23 +00:00
|
|
|
<value>pci-expander-bus</value>
|
2016-03-16 17:37:14 +00:00
|
|
|
<value>pcie-expander-bus</value>
|
2013-08-12 11:39:04 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2013-04-17 15:05:15 +00:00
|
|
|
</group>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
<!-- virtio-serial has optional "ports" and "vectors" -->
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>virtio-serial</value>
|
|
|
|
</attribute>
|
2019-01-17 17:52:44 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="ports">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="vectors">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
2019-03-06 22:59:29 +00:00
|
|
|
<!-- xenbus has an optional attribute "maxGrantFrames" -->
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>xenbus</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="maxGrantFrames">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
</choice>
|
2013-04-24 09:24:38 +00:00
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
|
|
|
<optional>
|
|
|
|
<attribute name="queues">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2014-05-22 18:22:52 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="cmd_per_lun">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="max_sectors">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2015-07-24 13:49:35 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="ioeventfd"/>
|
|
|
|
</optional>
|
2016-04-20 14:49:21 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="driverIOThread"/>
|
|
|
|
</optional>
|
2016-06-06 14:50:22 +00:00
|
|
|
<ref name="virtioOptions"/>
|
2013-04-24 09:24:38 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
rng: tighten up domain <controller> schema
The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.
This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.
<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).
2013-04-18 04:25:18 +00:00
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="filesystem">
|
|
|
|
<element name="filesystem">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>file</value>
|
|
|
|
</attribute>
|
2013-04-22 14:06:14 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="fsDriver"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="file">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>block</value>
|
|
|
|
</attribute>
|
2013-04-22 14:06:14 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="fsDriver"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2013-04-22 14:06:14 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="fsDriver"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dir">
|
2013-11-07 17:14:32 +00:00
|
|
|
<ref name="absDirPath"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2012-06-20 14:03:30 +00:00
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>bind</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2013-04-22 14:06:14 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="fsDriver"/>
|
|
|
|
</optional>
|
2012-06-20 14:03:30 +00:00
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="dir">
|
2013-11-07 17:14:32 +00:00
|
|
|
<ref name="absDirPath"/>
|
2012-06-20 14:03:30 +00:00
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>template</value>
|
|
|
|
</attribute>
|
2013-04-22 14:06:14 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="fsDriver"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2013-04-22 14:06:14 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="fsDriver"/>
|
|
|
|
</optional>
|
2012-05-08 16:50:48 +00:00
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="usage">
|
|
|
|
<ref name="unsignedLong"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
LXC: Fix handling of RAM filesystem size units
Since 76b644c when the support for RAM filesystems was introduced,
libvirt accepted the following XML:
<source usage='1024' unit='KiB'/>
This was parsed correctly and internally stored in bytes, but it
was formatted as (with an extra 's'):
<source usage='1024' units='KiB'/>
When read again, this was treated as if the units were missing,
meaning libvirt was unable to parse its own XML correctly.
The usage attribute was documented as being in KiB, but it was not
scaled if the unit was missing. Transient domains still worked,
because this was balanced by an extra 'k' in the mount options.
This patch:
Changes the parser to use 'units' instead of 'unit', as the latter
was never documented (fixing persistent domains) and some programs
(libvirt-glib, libvirt-sandbox) already parse the 'units' attribute.
Removes the extra 'k' from the tmpfs mount options, which is needed
because now we parse our own XML correctly.
Changes the default input unit to KiB to match documentation, fixing:
https://bugzilla.redhat.com/show_bug.cgi?id=1015689
2013-10-09 12:17:13 +00:00
|
|
|
<attribute name='units'>
|
2012-05-08 16:50:48 +00:00
|
|
|
<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">
|
2015-03-21 10:37:12 +00:00
|
|
|
<attribute name="dir"/>
|
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>
|
2019-01-17 17:52:36 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
2013-04-22 14:06:14 +00:00
|
|
|
<define name="fsDriver">
|
|
|
|
<element name="driver">
|
|
|
|
<!-- Annoying inconsistency. 'disk' uses 'name'
|
|
|
|
for this kind of info, and 'type' for the
|
|
|
|
storage format. We need the latter too, so
|
|
|
|
had to invent a new attribute name -->
|
|
|
|
<optional>
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>path</value>
|
|
|
|
<value>handle</value>
|
|
|
|
<value>loop</value>
|
2013-04-22 14:06:17 +00:00
|
|
|
<value>nbd</value>
|
2015-01-13 11:27:36 +00:00
|
|
|
<value>ploop</value>
|
2013-04-22 14:06:14 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="format">
|
|
|
|
<ref name="storageFormat"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="wrpolicy">
|
|
|
|
<value>immediate</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-06-06 14:50:57 +00:00
|
|
|
<ref name='virtioOptions'/>
|
2013-04-22 14:06:14 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2016-07-20 12:11:46 +00:00
|
|
|
<define name="interface-network-attributes">
|
|
|
|
<attribute name="network">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="portgroup">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="interface-bridge-attributes">
|
|
|
|
<attribute name="bridge">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="macTableManager">
|
|
|
|
<ref name="macTableManager"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
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">
|
2016-07-20 12:11:46 +00:00
|
|
|
<ref name="interface-bridge-attributes"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="interface-network-attributes"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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">
|
conf: support host-side IP/route information in <interface>
This is place as a sub-element of <source>, where other aspects of the
host-side connection to the network device are located (network or
bridge name, udp listen port, etc). It's a bit odd that the interface
we're configuring with this info is itself named in <target dev='x'/>,
but that ship sailed long ago:
<interface type='ethernet'>
<mac address='00:16:3e:0f:ef:8a'/>
<source>
<ip address='192.168.122.12' family='ipv4'
prefix='24' peer='192.168.122.1'/>
<ip address='192.168.122.13' family='ipv4' prefix='24'/>
<route family='ipv4' address='0.0.0.0'
gateway='192.168.122.1'/>
<route family='ipv4' address='192.168.124.0' prefix='24'
gateway='192.168.124.1'/>
</source>
</interface>
In practice, this will likely only be useful for type='ethernet', so
its presence in any other type of interface is currently forbidden in
the generic device Validate function (but it's been put into the
general population of virDomainNetDef rather than the
ethernet-specific union member so that 1) we can more easily add the
capability to other types if needed, and 2) we can retain the info
when set to an invalid interface type all the way through to
validation and report a proper error, rather than just ignoring it
(which is currently what happens for many other type-specific
settings).
(NB: The already-existing configuration of IP info for the guest-side
of interfaces is in subelements directly under <interface>, and the
name of the guest-side interface (when configurable) is in <guest
dev='x'/>).
(This patch had been pushed earlier in
commit fe6a77898a38f491403a70cc49925a584101daee, but was reverted in
commit d658456530c1010a49f45865613ed361a0fcc5b4 because it had been
accidentally pushed during the freeze for release 2.0.0)
2016-06-09 19:35:08 +00:00
|
|
|
<ref name="interface-ip-info"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2014-07-11 17:47:31 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>vhostuser</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
2017-11-27 10:54:33 +00:00
|
|
|
<ref name="unixSocketSource"/>
|
2014-07-11 17:47:31 +00:00
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>network</value>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
2016-07-20 12:11:46 +00:00
|
|
|
<ref name='interface-network-attributes'/>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
2016-07-20 12:11:46 +00:00
|
|
|
<ref name="interface-bridge-attributes"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2016-07-20 12:11:46 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='interface-network-attributes'/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2015-01-28 17:14:22 +00:00
|
|
|
<ref name="interface-options"/>
|
2012-01-16 14:08:07 +00:00
|
|
|
</interleave>
|
|
|
|
</group>
|
2015-08-29 20:19:10 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>udp</value>
|
2015-08-29 20:19:10 +00:00
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="ipv4Addr"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
<element name="local">
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="ipv4Addr"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</element>
|
|
|
|
<ref name="interface-options"/>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
2012-01-16 14:08:07 +00:00
|
|
|
<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>
|
2015-01-28 17:14:22 +00:00
|
|
|
<ref name="interface-options"/>
|
2012-01-16 14:08:07 +00:00
|
|
|
</interleave>
|
|
|
|
</group>
|
2012-02-15 17:37:15 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>hostdev</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="managed">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2012-02-15 17:37:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
2012-10-11 20:33:46 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="missing">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2012-10-11 20:33:46 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-02-15 17:37:15 +00:00
|
|
|
<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">
|
2019-01-21 08:40:09 +00:00
|
|
|
<ref name="usbAddr"/>
|
2012-02-15 17:37:15 +00:00
|
|
|
</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>
|
2014-09-23 18:19:08 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="trustGuestRxFilters">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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
|
2015-03-02 16:21:23 +00:00
|
|
|
- link state
|
2011-08-13 01:33:15 +00:00
|
|
|
-->
|
|
|
|
<define name="interface-options">
|
|
|
|
<interleave>
|
2015-03-02 16:21:23 +00:00
|
|
|
<optional>
|
|
|
|
<element name="link">
|
|
|
|
<attribute name="state">
|
|
|
|
<choice>
|
|
|
|
<value>up</value>
|
|
|
|
<value>down</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-01-23 13:32:13 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="mtu"/>
|
|
|
|
</optional>
|
2017-04-07 15:46:32 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="coalesce"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="target">
|
|
|
|
<attribute name="dev">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
2016-06-27 09:56:17 +00:00
|
|
|
<empty/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
2014-06-27 08:41:22 +00:00
|
|
|
<optional>
|
|
|
|
<element name="guest">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<attribute name="dev">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="actual">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2016-06-07 15:39:34 +00:00
|
|
|
<ref name="interface-ip-info"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="script">
|
|
|
|
<attribute name="path">
|
|
|
|
<ref name="filePath"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2015-02-20 03:22:05 +00:00
|
|
|
<optional>
|
|
|
|
<element name="backenddomain">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="domainName"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2014-09-11 15:11:28 +00:00
|
|
|
<optional>
|
|
|
|
<element name="backend">
|
2014-09-22 13:46:29 +00:00
|
|
|
<optional>
|
2017-09-07 10:16:04 +00:00
|
|
|
<attribute name='tap'>
|
|
|
|
<ref name='absFilePath'/>
|
|
|
|
</attribute>
|
2014-09-22 13:46:29 +00:00
|
|
|
</optional>
|
|
|
|
<optional>
|
2017-09-07 10:16:04 +00:00
|
|
|
<attribute name='vhost'>
|
|
|
|
<ref name='absFilePath'/>
|
|
|
|
</attribute>
|
2014-09-22 13:46:29 +00:00
|
|
|
</optional>
|
2014-09-11 15:11:28 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
2013-03-15 19:15:14 +00:00
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>kvm</value>
|
|
|
|
<value>vfio</value>
|
2017-11-29 17:43:29 +00:00
|
|
|
<value>xen</value>
|
2013-03-15 19:15:14 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>qemu</value>
|
|
|
|
<value>vhost</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2013-04-10 10:19:37 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='queues'>
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-08-18 16:19:13 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='rx_queue_size'>
|
2017-07-12 12:19:26 +00:00
|
|
|
<ref name='positiveInteger'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='tx_queue_size'>
|
2016-08-18 16:19:13 +00:00
|
|
|
<ref name='positiveInteger'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2013-03-15 19:15:14 +00:00
|
|
|
<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>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2017-05-24 14:44:44 +00:00
|
|
|
<ref name="virtioOptions"/>
|
2014-09-11 10:56:31 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name='host'>
|
|
|
|
<optional>
|
|
|
|
<attribute name='csum'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='gso'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='tso4'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='tso6'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='ecn'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='ufo'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2015-02-06 14:35:57 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='mrg_rxbuf'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2014-09-11 10:56:31 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='guest'>
|
|
|
|
<optional>
|
|
|
|
<attribute name='csum'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='tso4'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='tso6'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='ecn'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name='ufo'>
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2016-06-06 19:19:23 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
All ip-related info for either the host or guest side of an interface
|
|
|
|
-->
|
|
|
|
<define name="interface-ip-info">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="ip">
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="ipAddr"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="family">
|
|
|
|
<ref name="addr-family"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="prefix">
|
|
|
|
<ref name="ipPrefix"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-04-04 21:00:03 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="peer">
|
|
|
|
<ref name="ipAddr"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-06-06 19:19:23 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="route"/>
|
|
|
|
</zeroOrMore>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
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>
|
|
|
|
<!--
|
2016-03-12 22:14:39 +00:00
|
|
|
A graphic description (SPICE, VNC, SDL, ...)
|
2011-08-13 01:33:15 +00:00
|
|
|
-->
|
|
|
|
<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">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
2018-05-10 10:53:57 +00:00
|
|
|
<optional>
|
|
|
|
<element name="gl">
|
|
|
|
<attribute name="enable">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>vnc</value>
|
|
|
|
</attribute>
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="autoport">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
2013-04-29 12:34:01 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="websocket">
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="listen">
|
|
|
|
<ref name="addrIPorName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2013-05-21 14:31:48 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='sharePolicy'>
|
|
|
|
<choice>
|
|
|
|
<value>allow-exclusive</value>
|
|
|
|
<value>force-shared</value>
|
|
|
|
<value>ignore</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>keep</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virOnOff"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2014-01-16 16:11:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="filetransfer">
|
|
|
|
<attribute name="enable">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2014-01-16 16:11:15 +00:00
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-02-19 14:30:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="gl">
|
|
|
|
<attribute name="enable">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
2017-02-14 21:04:13 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="rendernode">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-02-19 14:30:15 +00:00
|
|
|
<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">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="replaceUser">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="multiUser">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
2018-11-27 07:23:13 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>egl-headless</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<element name="gl">
|
|
|
|
<optional>
|
|
|
|
<attribute name="rendernode">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="listenElements">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="listen">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>address</value>
|
|
|
|
</attribute>
|
2016-05-09 13:50:54 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="addrIPorName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>network</value>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="network">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="address">
|
|
|
|
<ref name="addrIPorName"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
2016-06-08 08:35:37 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>socket</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="socket">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
2016-05-18 06:33:28 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>none</value>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
A video adapter description, allowing configuration of device
|
2013-01-18 18:36:36 +00:00
|
|
|
model, number of virtual heads, video ram size, and for qxl
|
|
|
|
both ram bar sizes.
|
2011-08-13 01:33:15 +00:00
|
|
|
-->
|
|
|
|
<define name="video">
|
|
|
|
<element name="video">
|
2016-06-06 14:51:31 +00:00
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
2017-05-09 10:48:30 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="virtioOptions"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="vgaconf">
|
|
|
|
<choice>
|
|
|
|
<value>io</value>
|
|
|
|
<value>on</value>
|
|
|
|
<value>off</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-06-06 14:51:31 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="model">
|
2013-01-18 18:36:36 +00:00
|
|
|
<choice>
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>vga</value>
|
|
|
|
<value>cirrus</value>
|
|
|
|
<value>vmvga</value>
|
|
|
|
<value>xen</value>
|
|
|
|
<value>vbox</value>
|
2015-11-25 08:42:32 +00:00
|
|
|
<value>virtio</value>
|
2016-07-16 21:03:33 +00:00
|
|
|
<value>gop</value>
|
2018-05-21 12:29:26 +00:00
|
|
|
<value>none</value>
|
2013-01-18 18:36:36 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>qxl</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="ram">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2014-11-20 18:52:00 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="vgamem">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-02-23 16:04:19 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="vram64">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2013-01-18 18:36:36 +00:00
|
|
|
</group>
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="vram">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="heads">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-12-17 06:01:20 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="primary">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2012-12-17 06:01:20 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name="acceleration">
|
|
|
|
<optional>
|
|
|
|
<attribute name="accel3d">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="accel2d">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
|
|
|
<!--
|
2012-09-06 19:56:49 +00:00
|
|
|
When a certain event happens, multiple policies can be applied
|
|
|
|
depends on what happened:
|
2011-08-13 01:33:15 +00:00
|
|
|
-->
|
2012-09-06 19:56:49 +00:00
|
|
|
<define name="events">
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2012-09-06 20:17:01 +00:00
|
|
|
<optional>
|
|
|
|
<element name="on_lockfailure">
|
|
|
|
<ref name="lockfailureOptions"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2012-09-06 20:17:01 +00:00
|
|
|
<!--
|
|
|
|
Options when resource locks are lost:
|
|
|
|
poweroff: power off the domain
|
|
|
|
restart: power off the domain and start it up again to reacquire the
|
|
|
|
locks
|
|
|
|
pause: pause the execution of the domain so that it can be manually
|
|
|
|
resumed when lock issues are solved
|
|
|
|
ignore: keep the domain running
|
|
|
|
-->
|
|
|
|
<define name="lockfailureOptions">
|
|
|
|
<choice>
|
|
|
|
<value>poweroff</value>
|
|
|
|
<value>restart</value>
|
|
|
|
<value>pause</value>
|
|
|
|
<value>ignore</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
2012-08-02 10:12:50 +00:00
|
|
|
<!--
|
|
|
|
Control ACPI sleep states (dis)allowed for the domain
|
|
|
|
For each of the states the following rules apply:
|
|
|
|
on: the state will be forcefully enabled
|
|
|
|
off: the state will be forcefully disabled
|
|
|
|
not specified: hypervisor will be left to decide its defaults
|
|
|
|
-->
|
|
|
|
<define name="pm">
|
|
|
|
<element name="pm">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="suspend-to-mem">
|
|
|
|
<ref name="suspendChoices"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="suspend-to-disk">
|
|
|
|
<ref name="suspendChoices"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="suspendChoices">
|
|
|
|
<optional>
|
|
|
|
<attribute name="enabled">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2012-08-02 10:12:50 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
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>
|
2018-12-14 13:45:07 +00:00
|
|
|
<value>uml</value> <!-- NOT USED ANYMORE -->
|
2011-08-13 01:33:15 +00:00
|
|
|
<value>virtio</value>
|
2012-03-26 17:11:09 +00:00
|
|
|
<value>lxc</value>
|
|
|
|
<value>openvz</value>
|
2013-01-07 17:17:14 +00:00
|
|
|
<value>sclp</value>
|
|
|
|
<value>sclplm</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
|
2013-01-05 05:25:36 +00:00
|
|
|
<define name='qemucdevSerialTgtType'>
|
|
|
|
<attribute name='type'>
|
|
|
|
<choice>
|
|
|
|
<value>isa-serial</value>
|
|
|
|
<value>usb-serial</value>
|
2015-05-06 15:42:41 +00:00
|
|
|
<value>pci-serial</value>
|
2017-11-08 14:31:21 +00:00
|
|
|
<value>spapr-vio-serial</value>
|
2017-11-09 16:14:57 +00:00
|
|
|
<value>system-serial</value>
|
2017-11-14 15:27:04 +00:00
|
|
|
<value>sclp-serial</value>
|
2013-01-05 05:25:36 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
|
2017-11-20 11:05:17 +00:00
|
|
|
<define name='qemucdevSerialTgtModel'>
|
|
|
|
<element name='model'>
|
|
|
|
<attribute name='name'>
|
|
|
|
<choice>
|
|
|
|
<value>isa-serial</value>
|
|
|
|
<value>usb-serial</value>
|
|
|
|
<value>pci-serial</value>
|
2017-11-08 14:31:21 +00:00
|
|
|
<value>spapr-vty</value>
|
2017-11-09 16:14:57 +00:00
|
|
|
<value>pl011</value>
|
2018-08-27 08:25:17 +00:00
|
|
|
<value>16550a</value>
|
2017-11-14 15:27:04 +00:00
|
|
|
<value>sclpconsole</value>
|
|
|
|
<value>sclplmconsole</value>
|
2017-11-20 11:05:17 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="qemucdevTgtDef">
|
|
|
|
<element name="target">
|
|
|
|
<interleave>
|
2013-01-05 05:25:36 +00:00
|
|
|
<choice>
|
|
|
|
<optional>
|
|
|
|
<ref name="qemucdevConsoleTgtType"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="qemucdevSerialTgtType"/>
|
|
|
|
</optional>
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="port"/>
|
|
|
|
</optional>
|
2017-11-20 11:05:17 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="qemucdevSerialTgtModel"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2014-02-10 10:18:16 +00:00
|
|
|
<value>spiceport</value>
|
2014-07-25 16:43:49 +00:00
|
|
|
<value>nmdm</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
2012-09-13 07:25:47 +00:00
|
|
|
<define name="usbdevfilter">
|
|
|
|
<element name="usbdev">
|
|
|
|
<attribute name="allow">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2012-09-13 07:25:47 +00:00
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="class">
|
|
|
|
<choice>
|
|
|
|
<ref name="usbClass"/>
|
|
|
|
<ref name="usbIdDefault"/>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="vendor">
|
|
|
|
<choice>
|
|
|
|
<ref name="usbId"/>
|
|
|
|
<ref name="usbIdDefault"/>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="product">
|
|
|
|
<choice>
|
|
|
|
<ref name="usbId"/>
|
|
|
|
<ref name="usbIdDefault"/>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="version">
|
|
|
|
<choice>
|
|
|
|
<ref name="usbVersion"/>
|
|
|
|
<ref name="usbIdDefault"/>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
2014-02-10 10:18:16 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="channel"/>
|
|
|
|
</optional>
|
2014-07-25 16:43:49 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="master"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="slave"/>
|
|
|
|
</optional>
|
2015-12-24 14:27:54 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="append">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-10-24 12:05:54 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="tls">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-08-23 15:08:07 +00:00
|
|
|
<optional>
|
2018-01-17 16:14:06 +00:00
|
|
|
<ref name="reconnect"/>
|
2017-08-23 15:08:07 +00:00
|
|
|
</optional>
|
2015-02-10 16:17:36 +00:00
|
|
|
<zeroOrMore>
|
2012-09-20 13:16:17 +00:00
|
|
|
<ref name='devSeclabel'/>
|
2015-02-10 16:17:36 +00:00
|
|
|
</zeroOrMore>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2015-12-11 16:58:13 +00:00
|
|
|
<optional>
|
|
|
|
<element name="log">
|
|
|
|
<attribute name="file">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="append">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2017-09-07 09:58:26 +00:00
|
|
|
<ref name="qemucdev"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2018-05-22 11:12:32 +00:00
|
|
|
<value>output</value>
|
2012-05-15 22:55:09 +00:00
|
|
|
</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>
|
2013-09-24 14:17:38 +00:00
|
|
|
<value>ich9</value>
|
2014-07-24 15:32:31 +00:00
|
|
|
<value>usb</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
2012-05-15 22:55:09 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
2017-09-07 09:58:26 +00:00
|
|
|
<ref name="codec"/>
|
2012-05-15 22:55:09 +00:00
|
|
|
</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>
|
2015-06-24 09:28:43 +00:00
|
|
|
<value>diag288</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2015-06-24 09:28:41 +00:00
|
|
|
<value>inject-nmi</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2013-04-19 08:37:51 +00:00
|
|
|
<define name="nvram">
|
|
|
|
<element name="nvram">
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
2014-09-22 08:49:39 +00:00
|
|
|
|
|
|
|
<define name="shmem">
|
|
|
|
<element name="shmem">
|
2017-02-01 16:14:00 +00:00
|
|
|
<attribute name="name">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[^/]*</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
2014-09-22 08:49:39 +00:00
|
|
|
<interleave>
|
2016-08-19 12:57:07 +00:00
|
|
|
<optional>
|
|
|
|
<element name="model">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>ivshmem</value>
|
2016-08-19 12:58:35 +00:00
|
|
|
<value>ivshmem-plain</value>
|
|
|
|
<value>ivshmem-doorbell</value>
|
2016-08-19 12:57:07 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-09-22 08:49:39 +00:00
|
|
|
<optional>
|
|
|
|
<element name="size">
|
|
|
|
<ref name="scaledInteger"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="server">
|
|
|
|
<optional>
|
|
|
|
<attribute name="path">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="msi">
|
|
|
|
<optional>
|
|
|
|
<ref name="ioeventfd"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="vectors">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-09-15 08:33:06 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2014-09-22 08:49:39 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="memballoon">
|
|
|
|
<element name="memballoon">
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
2019-01-17 17:52:39 +00:00
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
<value>xen</value>
|
|
|
|
<value>none</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
2016-01-08 10:45:05 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="autodeflate">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2015-03-13 15:16:57 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="stats">
|
|
|
|
<attribute name="period">
|
|
|
|
<ref name='positiveInteger'/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-05-24 14:47:28 +00:00
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
|
|
|
<ref name="virtioOptions"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2015-03-13 15:16:57 +00:00
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2014-10-29 15:03:53 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="state">
|
|
|
|
<choice>
|
|
|
|
<value>connected</value>
|
|
|
|
<value>disconnected</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
2016-09-26 17:33:15 +00:00
|
|
|
<define name="xenTarget">
|
|
|
|
<element name="target">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>xen</value>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="name"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="channel">
|
|
|
|
<element name="channel">
|
|
|
|
<ref name="qemucdevSrcType"/>
|
|
|
|
<interleave>
|
|
|
|
<ref name="qemucdevSrcDef"/>
|
|
|
|
<choice>
|
|
|
|
<ref name="guestfwdTarget"/>
|
|
|
|
<ref name="virtioTarget"/>
|
2016-09-26 17:33:15 +00:00
|
|
|
<ref name="xenTarget"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2013-04-12 20:55:45 +00:00
|
|
|
|
|
|
|
<define name="tpm">
|
|
|
|
<element name="tpm">
|
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
2018-04-26 17:42:16 +00:00
|
|
|
<choice>
|
|
|
|
<value>tpm-tis</value>
|
|
|
|
<value>tpm-crb</value>
|
|
|
|
</choice>
|
2013-04-12 20:55:45 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<ref name="tpm-backend"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="tpm-backend">
|
|
|
|
<element name="backend">
|
2017-09-07 10:16:04 +00:00
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>passthrough</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="tpm-passthrough-device"/>
|
|
|
|
</group>
|
2017-04-04 16:22:31 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>emulator</value>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
2017-09-07 10:16:04 +00:00
|
|
|
</choice>
|
2018-04-04 18:40:17 +00:00
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<optional>
|
|
|
|
<attribute name="version">
|
|
|
|
<choice>
|
|
|
|
<value>1.2</value>
|
|
|
|
<value>2.0</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2013-04-12 20:55:45 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="tpm-passthrough-device">
|
|
|
|
<optional>
|
|
|
|
<element name="device">
|
|
|
|
<optional>
|
|
|
|
<attribute name="path">
|
|
|
|
<ref name="filePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
2017-09-07 10:16:04 +00:00
|
|
|
</optional>
|
2013-04-12 20:55:45 +00:00
|
|
|
</define>
|
|
|
|
|
2018-05-22 09:21:15 +00:00
|
|
|
<define name="vsock">
|
|
|
|
<element name="vsock">
|
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
2019-01-17 17:52:40 +00:00
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
|
|
|
</choice>
|
2018-05-22 09:21:15 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
2018-06-01 11:22:56 +00:00
|
|
|
<element name="cid">
|
2018-05-22 09:21:15 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="auto">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
2018-06-01 11:22:56 +00:00
|
|
|
<attribute name="address">
|
2018-05-22 09:21:15 +00:00
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
2018-07-12 06:28:17 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2018-05-22 09:21:15 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
2016-06-22 14:28:22 +00:00
|
|
|
<define name="iommu">
|
|
|
|
<element name="iommu">
|
|
|
|
<attribute name="model">
|
|
|
|
<value>intel</value>
|
|
|
|
</attribute>
|
2017-03-17 07:35:22 +00:00
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
|
|
|
<optional>
|
|
|
|
<attribute name="intremap">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-03-17 07:27:49 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="caching_mode">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-05-17 15:22:30 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="eim">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-05-03 15:07:55 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="iotlb">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-03-17 07:35:22 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
2016-06-22 14:28:22 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="input">
|
|
|
|
<element name="input">
|
2018-06-22 05:24:02 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
|
|
|
<ref name="virtioOptions"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
2015-11-16 08:36:12 +00:00
|
|
|
<choice>
|
2018-06-22 05:24:02 +00:00
|
|
|
<value>tablet</value>
|
|
|
|
<value>mouse</value>
|
|
|
|
<value>keyboard</value>
|
2015-11-16 08:36:12 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
2018-06-22 05:24:02 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="bus">
|
|
|
|
<choice>
|
|
|
|
<value>ps2</value>
|
|
|
|
<value>usb</value>
|
|
|
|
<value>xen</value>
|
|
|
|
<value>virtio</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>passthrough</value>
|
2015-11-16 08:36:12 +00:00
|
|
|
</attribute>
|
2018-06-22 05:24:02 +00:00
|
|
|
<attribute name="bus">
|
|
|
|
<value>virtio</value>
|
|
|
|
</attribute>
|
|
|
|
<element name="source">
|
|
|
|
<attribute name="evdev">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2019-01-17 17:52:41 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2018-06-22 05:24:02 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="hub">
|
|
|
|
<element name="hub">
|
|
|
|
<attribute name="type">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>usb</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
2018-06-22 05:24:02 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name="redirdev">
|
|
|
|
<element name="redirdev">
|
|
|
|
<attribute name="bus">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>usb</value>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
<attribute name="type">
|
|
|
|
<ref name="qemucdevSrcTypeChoice"/>
|
|
|
|
</attribute>
|
2018-06-22 05:24:02 +00:00
|
|
|
<interleave>
|
|
|
|
<ref name="qemucdevSrcDef"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="deviceBoot"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
2012-09-13 07:25:47 +00:00
|
|
|
<define name="redirfilter">
|
|
|
|
<element name="redirfilter">
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="usbdevfilter"/>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
2012-11-23 13:50:29 +00:00
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="hostdev">
|
|
|
|
<element name="hostdev">
|
2013-05-03 18:07:24 +00:00
|
|
|
<interleave>
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<ref name="hostdevsubsys"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<ref name="hostdevcaps"/>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="deviceBoot"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="rom"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
2013-05-03 18:07:25 +00:00
|
|
|
<optional>
|
|
|
|
<element name="readonly">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-05-03 18:07:33 +00:00
|
|
|
<optional>
|
|
|
|
<element name="shareable">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-05-03 18:07:24 +00:00
|
|
|
</interleave>
|
2012-11-23 13:50:29 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="hostdevsubsys">
|
|
|
|
<optional>
|
|
|
|
<attribute name="mode">
|
|
|
|
<value>subsystem</value>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="managed">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2012-11-23 13:50:29 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<choice>
|
|
|
|
<ref name="hostdevsubsyspci"/>
|
|
|
|
<ref name="hostdevsubsysusb"/>
|
2013-05-03 18:07:20 +00:00
|
|
|
<ref name="hostdevsubsysscsi"/>
|
2016-11-22 03:58:20 +00:00
|
|
|
<ref name="hostdevsubsyshost"/>
|
2017-01-31 16:26:36 +00:00
|
|
|
<ref name="hostdevsubsysmdev"/>
|
2012-11-23 13:50:29 +00:00
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="hostdevcaps">
|
|
|
|
<attribute name="mode">
|
|
|
|
<value>capabilities</value>
|
|
|
|
</attribute>
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<ref name="hostdevcapsstorage"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<ref name="hostdevcapsmisc"/>
|
|
|
|
</group>
|
2013-04-05 12:26:39 +00:00
|
|
|
<group>
|
|
|
|
<ref name="hostdevcapsnet"/>
|
|
|
|
</group>
|
2012-11-23 13:50:29 +00:00
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
|
|
|
|
<define name="hostdevsubsyspci">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>pci</value>
|
|
|
|
</attribute>
|
2013-03-15 19:15:14 +00:00
|
|
|
<interleave>
|
2011-09-20 17:31:52 +00:00
|
|
|
<optional>
|
2013-03-15 19:15:14 +00:00
|
|
|
<element name="driver">
|
|
|
|
<attribute name="name">
|
|
|
|
<choice>
|
|
|
|
<value>kvm</value>
|
|
|
|
<value>vfio</value>
|
2014-03-06 08:44:22 +00:00
|
|
|
<value>xen</value>
|
2013-03-15 19:15:14 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
2011-09-20 17:31:52 +00:00
|
|
|
</optional>
|
2013-03-15 19:15:14 +00:00
|
|
|
<element name="source">
|
|
|
|
<optional>
|
|
|
|
<ref name="startupPolicy"/>
|
|
|
|
</optional>
|
|
|
|
<element name="address">
|
|
|
|
<ref name="pciaddress"/>
|
|
|
|
</element>
|
2012-11-23 13:50:29 +00:00
|
|
|
</element>
|
2013-03-15 19:15:14 +00:00
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</define>
|
2012-11-23 13:50:29 +00:00
|
|
|
|
|
|
|
<define name="hostdevsubsysusb">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>usb</value>
|
|
|
|
</attribute>
|
|
|
|
<element name="source">
|
|
|
|
<optional>
|
|
|
|
<ref name="startupPolicy"/>
|
|
|
|
</optional>
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<ref name="usbproduct"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="usbaddress"/>
|
|
|
|
</optional>
|
|
|
|
</group>
|
|
|
|
<ref name="usbaddress"/>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2013-05-03 18:07:20 +00:00
|
|
|
<define name="hostdevsubsysscsi">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>scsi</value>
|
|
|
|
</attribute>
|
2013-05-03 18:07:40 +00:00
|
|
|
<optional>
|
2017-09-07 10:16:04 +00:00
|
|
|
<ref name="sgIO"/>
|
2013-05-03 18:07:40 +00:00
|
|
|
</optional>
|
2014-09-09 22:48:57 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="rawIO"/>
|
|
|
|
</optional>
|
2013-05-03 18:07:20 +00:00
|
|
|
<element name="source">
|
2014-07-09 14:08:34 +00:00
|
|
|
<choice>
|
|
|
|
<group> <!-- scsi_host adapter -->
|
|
|
|
<optional>
|
|
|
|
<attribute name="protocol">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>adapter</value> <!-- scsi_host, default, optional -->
|
2014-07-09 14:08:34 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<interleave>
|
|
|
|
<ref name="sourceinfoadapter"/>
|
|
|
|
<element name="address">
|
|
|
|
<ref name="scsiaddress"/>
|
|
|
|
</element>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group> <!-- iscsi adapter -->
|
|
|
|
<attribute name="protocol">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>iscsi</value> <!-- iscsi, required -->
|
2014-07-09 14:08:34 +00:00
|
|
|
</attribute>
|
|
|
|
<attribute name="name">
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
<interleave>
|
|
|
|
<oneOrMore>
|
|
|
|
<element name='host'>
|
|
|
|
<attribute name='name'>
|
|
|
|
<text/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='port'>
|
|
|
|
<ref name="PortNumber"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
<optional>
|
|
|
|
<ref name='diskAuth'/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2013-05-03 18:07:20 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2016-11-22 03:58:20 +00:00
|
|
|
<define name="hostdevsubsyshost">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>scsi_host</value>
|
|
|
|
</attribute>
|
2019-01-17 17:52:33 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2016-11-22 03:58:20 +00:00
|
|
|
<element name="source">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="protocol">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>vhost</value> <!-- vhost, required -->
|
2016-11-22 03:58:20 +00:00
|
|
|
</attribute>
|
|
|
|
<attribute name="wwpn">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(naa\.)[0-9a-fA-F]{16}</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-01-31 16:26:36 +00:00
|
|
|
<define name="hostdevsubsysmdev">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>mdev</value>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="model">
|
2018-05-07 14:41:14 +00:00
|
|
|
<choice>
|
|
|
|
<value>vfio-pci</value>
|
|
|
|
<value>vfio-ccw</value>
|
2018-10-18 14:54:07 +00:00
|
|
|
<value>vfio-ap</value>
|
2018-05-07 14:41:14 +00:00
|
|
|
</choice>
|
2017-01-31 16:26:36 +00:00
|
|
|
</attribute>
|
2018-05-24 14:04:26 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="display">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-01-31 16:26:36 +00:00
|
|
|
<element name="source">
|
|
|
|
<ref name="mdevaddress"/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-11-23 13:50:29 +00:00
|
|
|
<define name="hostdevcapsstorage">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>storage</value>
|
|
|
|
</attribute>
|
|
|
|
<element name="source">
|
|
|
|
<element name="block">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="hostdevcapsmisc">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>misc</value>
|
|
|
|
</attribute>
|
|
|
|
<element name="source">
|
|
|
|
<element name="char">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2013-04-05 12:26:39 +00:00
|
|
|
<define name="hostdevcapsnet">
|
|
|
|
<attribute name="type">
|
|
|
|
<value>net</value>
|
|
|
|
</attribute>
|
2014-07-23 15:14:00 +00:00
|
|
|
<interleave>
|
|
|
|
<element name="source">
|
|
|
|
<element name="interface">
|
|
|
|
<ref name="deviceName"/>
|
|
|
|
</element>
|
2013-04-05 12:26:39 +00:00
|
|
|
</element>
|
2016-06-06 19:44:15 +00:00
|
|
|
<ref name="interface-ip-info"/>
|
2014-07-23 15:14:00 +00:00
|
|
|
</interleave>
|
2013-04-05 12:26:39 +00:00
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<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">
|
2019-01-21 08:40:09 +00:00
|
|
|
<ref name="usbAddr"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
2013-05-03 18:07:20 +00:00
|
|
|
<define name="scsiaddress">
|
|
|
|
<attribute name="bus">
|
|
|
|
<ref name="driveBus"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="target">
|
docs: Fix XML schema handling of LUN address in hostdev tag
Defining a domain with a SCSI disk attached via a hostdev
tag and a source address unit value longer than two digits
causes an error when editing the domain with virsh edit,
even if no changes are made to the domain definition.
The error suggests invalid XML, somewhere:
# virsh edit lmb_guest
error: XML document failed to validate against schema:
Unable to validate doc against /usr/local/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content
The virt-xml-validate tool fails with a similar error:
# virt-xml-validate lmb_guest.xml
Relax-NG validity error : Extra element devices in interleave
lmb_guest.xml:17: element devices: Relax-NG validity error :
Element domain failed to validate content
lmb_guest.xml fails to validate
The hostdev tag requires a source address to be specified,
which includes bus, target, and unit address attributes.
According to the SCSI Architecture Model spec (section
4.9 of SAM-2), a LUN address is 64 bits and thus could be
up to 20 decimal digits long. Unfortunately, the XML
schema limits this string to just two digits. Similarly,
the target field can be up to 32 bits in length, which
would be 10 decimal digits.
# lsscsi -xx
[0:0:19:0x4022401100000000] disk IBM 2107900 3.44 /dev/sda
# lsscsi
[0:0:19:1074872354]disk IBM 2107900 3.44 /dev/sda
# cat lmb_guest.xml
<domain type='kvm'>
<name>lmb_guest</name>
<memory unit='MiB'>1024</memory>
...trimmed...
<devices>
<controller type='scsi' model='virtio-scsi' index='0'/>
<hostdev mode='subsystem' type='scsi'>
<source>
<adapter name='scsi_host0'/>
<address bus='0' target='19' unit='1074872354'/>
</source>
</hostdev>
...trimmed...
Since the reference unit and target fields are used in
several places in the XML schema, create a separate one
specific for SCSI Logical Units that will permit the
greater length. This permits both the validation utility
and the virsh edit command to succeed when a hostdev
tag is included.
Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2015-06-17 03:29:54 +00:00
|
|
|
<ref name="driveSCSITarget"/>
|
2013-05-03 18:07:20 +00:00
|
|
|
</attribute>
|
|
|
|
<attribute name="unit">
|
docs: Fix XML schema handling of LUN address in hostdev tag
Defining a domain with a SCSI disk attached via a hostdev
tag and a source address unit value longer than two digits
causes an error when editing the domain with virsh edit,
even if no changes are made to the domain definition.
The error suggests invalid XML, somewhere:
# virsh edit lmb_guest
error: XML document failed to validate against schema:
Unable to validate doc against /usr/local/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content
The virt-xml-validate tool fails with a similar error:
# virt-xml-validate lmb_guest.xml
Relax-NG validity error : Extra element devices in interleave
lmb_guest.xml:17: element devices: Relax-NG validity error :
Element domain failed to validate content
lmb_guest.xml fails to validate
The hostdev tag requires a source address to be specified,
which includes bus, target, and unit address attributes.
According to the SCSI Architecture Model spec (section
4.9 of SAM-2), a LUN address is 64 bits and thus could be
up to 20 decimal digits long. Unfortunately, the XML
schema limits this string to just two digits. Similarly,
the target field can be up to 32 bits in length, which
would be 10 decimal digits.
# lsscsi -xx
[0:0:19:0x4022401100000000] disk IBM 2107900 3.44 /dev/sda
# lsscsi
[0:0:19:1074872354]disk IBM 2107900 3.44 /dev/sda
# cat lmb_guest.xml
<domain type='kvm'>
<name>lmb_guest</name>
<memory unit='MiB'>1024</memory>
...trimmed...
<devices>
<controller type='scsi' model='virtio-scsi' index='0'/>
<hostdev mode='subsystem' type='scsi'>
<source>
<adapter name='scsi_host0'/>
<address bus='0' target='19' unit='1074872354'/>
</source>
</hostdev>
...trimmed...
Since the reference unit and target fields are used in
several places in the XML schema, create a separate one
specific for SCSI Logical Units that will permit the
greater length. This permits both the validation utility
and the virsh edit command to succeed when a hostdev
tag is included.
Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2015-06-17 03:29:54 +00:00
|
|
|
<ref name="driveSCSIUnit"/>
|
2013-05-03 18:07:20 +00:00
|
|
|
</attribute>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="usbportaddress">
|
|
|
|
<attribute name="bus">
|
|
|
|
<ref name="usbAddr"/>
|
|
|
|
</attribute>
|
2016-07-01 12:20:44 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="port">
|
|
|
|
<ref name="usbPort"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</define>
|
2011-12-12 23:39:31 +00:00
|
|
|
<define name="spaprvioaddress">
|
|
|
|
<optional>
|
|
|
|
<attribute name="reg">
|
|
|
|
<ref name="spaprvioReg"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
2013-03-05 15:44:19 +00:00
|
|
|
<define name="ccwaddress">
|
|
|
|
<optional>
|
|
|
|
<attribute name="cssid">
|
|
|
|
<ref name="ccwCssidRange"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="ssid">
|
|
|
|
<ref name="ccwSsidRange"/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name="devno">
|
|
|
|
<ref name="ccwDevnoRange"/>
|
|
|
|
</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>
|
2014-10-07 16:11:47 +00:00
|
|
|
<define name="dimmaddress">
|
|
|
|
<optional>
|
|
|
|
<attribute name="slot">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="base">
|
|
|
|
<ref name="hexuint"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
2017-01-31 16:26:36 +00:00
|
|
|
<define name="mdevaddress">
|
|
|
|
<element name="address">
|
|
|
|
<attribute name="uuid">
|
|
|
|
<ref name="UUID"/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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"/>
|
2012-09-13 07:25:47 +00:00
|
|
|
<ref name="redirfilter"/>
|
2012-12-20 11:06:52 +00:00
|
|
|
<ref name="rng"/>
|
2013-04-12 20:55:45 +00:00
|
|
|
<ref name="tpm"/>
|
2014-09-22 08:49:39 +00:00
|
|
|
<ref name="shmem"/>
|
2014-09-29 17:02:04 +00:00
|
|
|
<ref name="memorydev"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</choice>
|
|
|
|
</zeroOrMore>
|
|
|
|
<optional>
|
|
|
|
<ref name="watchdog"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="memballoon"/>
|
|
|
|
</optional>
|
2013-04-19 08:37:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="nvram"/>
|
|
|
|
</optional>
|
2015-11-24 12:26:36 +00:00
|
|
|
<zeroOrMore>
|
2013-12-09 09:11:14 +00:00
|
|
|
<ref name="panic"/>
|
2015-11-24 12:26:36 +00:00
|
|
|
</zeroOrMore>
|
2016-06-22 14:28:22 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="iommu"/>
|
|
|
|
</optional>
|
2018-05-22 09:21:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="vsock"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<!--
|
2015-04-27 12:03:19 +00:00
|
|
|
A set of optional features: PAE, APIC, ACPI, GIC,
|
2014-08-21 17:04:45 +00:00
|
|
|
HyperV Enlightenment, KVM features, paravirtual spinlocks and HAP support
|
2011-08-13 01:33:15 +00:00
|
|
|
-->
|
|
|
|
<define name="features">
|
|
|
|
<optional>
|
|
|
|
<element name="features">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="pae">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="apic">
|
2012-09-12 22:10:56 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="eoi">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virOnOff"/>
|
2012-09-12 22:10:56 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="acpi">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="hap">
|
2016-02-23 00:03:21 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="state">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
2012-10-16 16:25:56 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="hyperv"/>
|
|
|
|
</optional>
|
2012-01-25 14:34:12 +00:00
|
|
|
<optional>
|
|
|
|
<element name="viridian">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-08-21 17:04:45 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="kvm"/>
|
|
|
|
</optional>
|
2012-01-18 11:38:49 +00:00
|
|
|
<optional>
|
|
|
|
<element name="privnet">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-09-23 16:32:11 +00:00
|
|
|
<optional>
|
|
|
|
<element name="pvspinlock">
|
|
|
|
<optional>
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-07-18 08:02:29 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="capabilities"/>
|
|
|
|
</optional>
|
2015-01-05 15:21:51 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="pmu"/>
|
|
|
|
</optional>
|
2015-04-02 16:41:33 +00:00
|
|
|
<optional>
|
|
|
|
<element name="vmport">
|
|
|
|
<optional>
|
|
|
|
<attribute name="state">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2015-04-27 12:03:19 +00:00
|
|
|
<optional>
|
|
|
|
<element name="gic">
|
|
|
|
<optional>
|
|
|
|
<attribute name="version">
|
2016-02-03 13:34:32 +00:00
|
|
|
<choice>
|
|
|
|
<value>host</value>
|
|
|
|
<value>2</value>
|
|
|
|
<value>3</value>
|
|
|
|
</choice>
|
2015-04-27 12:03:19 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-07-13 12:09:20 +00:00
|
|
|
<optional>
|
|
|
|
<element name="smm">
|
|
|
|
<optional>
|
|
|
|
<attribute name="state">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
2018-05-10 19:32:26 +00:00
|
|
|
<optional>
|
|
|
|
<element name="tseg">
|
|
|
|
<ref name="scaledInteger"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-07-13 12:09:20 +00:00
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-03-17 07:26:35 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="ioapic"/>
|
|
|
|
</optional>
|
2017-11-06 15:39:40 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="hpt"/>
|
|
|
|
</optional>
|
2017-11-16 16:49:38 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="vmcoreinfo"/>
|
|
|
|
</optional>
|
2018-07-02 08:35:54 +00:00
|
|
|
<optional>
|
|
|
|
<element name="htm">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-11-20 13:57:27 +00:00
|
|
|
<optional>
|
|
|
|
<element name="nested-hv">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2019-01-24 03:23:31 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="msrs"/>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
<!--
|
|
|
|
CPU specification
|
|
|
|
-->
|
|
|
|
<define name="cpu">
|
|
|
|
<element name="cpu">
|
2015-01-05 16:03:58 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="cpuMode"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuMatch"/>
|
|
|
|
</optional>
|
2017-03-01 14:18:22 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="cpuCheck"/>
|
|
|
|
</optional>
|
2015-01-05 16:03:58 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuModel"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuVendor"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuTopology"/>
|
|
|
|
</optional>
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="cpuFeature"/>
|
|
|
|
</zeroOrMore>
|
|
|
|
<optional>
|
|
|
|
<ref name="cpuNuma"/>
|
|
|
|
</optional>
|
2017-04-24 13:40:07 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="cpuCache"/>
|
|
|
|
</optional>
|
2015-01-05 16:03:58 +00:00
|
|
|
</interleave>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
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>
|
2015-05-12 14:47:49 +00:00
|
|
|
<zeroOrMore>
|
|
|
|
<element name="baseBoard">
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="entry">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="sysinfo-baseBoard-name"/>
|
|
|
|
</attribute>
|
|
|
|
<ref name="sysinfo-value"/>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
2018-02-14 09:22:38 +00:00
|
|
|
<optional>
|
|
|
|
<element name="chassis">
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="entry">
|
|
|
|
<attribute name="name">
|
|
|
|
<ref name="sysinfo-chassis-name"/>
|
|
|
|
</attribute>
|
|
|
|
<ref name="sysinfo-value"/>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-10-28 13:56:51 +00:00
|
|
|
<optional>
|
|
|
|
<element name="oemStrings">
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="entry">
|
|
|
|
<ref name="sysinfo-value"/>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
|
|
|
|
2015-05-12 14:47:49 +00:00
|
|
|
<define name="sysinfo-baseBoard-name">
|
|
|
|
<choice>
|
|
|
|
<value>manufacturer</value>
|
|
|
|
<value>product</value>
|
|
|
|
<value>version</value>
|
|
|
|
<value>serial</value>
|
|
|
|
<value>asset</value>
|
|
|
|
<value>location</value>
|
|
|
|
</choice>
|
2018-02-14 09:22:38 +00:00
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="sysinfo-chassis-name">
|
|
|
|
<choice>
|
|
|
|
<value>manufacturer</value>
|
|
|
|
<value>version</value>
|
|
|
|
<value>serial</value>
|
|
|
|
<value>asset</value>
|
|
|
|
<value>sku</value>
|
|
|
|
</choice>
|
2015-05-12 14:47:49 +00:00
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="sysinfo-value">
|
2016-10-10 15:49:03 +00:00
|
|
|
<data type="string"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</define>
|
|
|
|
|
2016-04-18 15:13:02 +00:00
|
|
|
<define name="acpiTable">
|
|
|
|
<element name="acpi">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="table">
|
|
|
|
<attribute name="type">
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>slic</value>
|
2016-04-18 15:13:02 +00:00
|
|
|
</attribute>
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<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">
|
2012-09-18 10:30:52 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="useserial">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2012-09-18 10:30:52 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="rebootTimeout">
|
|
|
|
<ref name="rebootTimeoutDelay"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-03-17 07:26:35 +00:00
|
|
|
<define name="ioapic">
|
|
|
|
<element name="ioapic">
|
|
|
|
<attribute name="driver">
|
|
|
|
<choice>
|
|
|
|
<value>qemu</value>
|
|
|
|
<value>kvm</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-11-06 15:39:40 +00:00
|
|
|
<define name="hpt">
|
|
|
|
<element name="hpt">
|
2018-05-23 16:18:01 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="resizing">
|
|
|
|
<choice>
|
|
|
|
<value>enabled</value>
|
|
|
|
<value>disabled</value>
|
|
|
|
<value>required</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="maxpagesize">
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-11-06 15:39:40 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-11-16 16:49:38 +00:00
|
|
|
<define name="vmcoreinfo">
|
|
|
|
<element name="vmcoreinfo">
|
2018-04-17 16:34:31 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="state">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2017-11-16 16:49:38 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2019-01-24 03:23:31 +00:00
|
|
|
<define name="msrs">
|
|
|
|
<element name="msrs">
|
|
|
|
<attribute name="unknown">
|
|
|
|
<choice>
|
|
|
|
<value>ignore</value>
|
|
|
|
<value>fault</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="address">
|
|
|
|
<element name="address">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>pci</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="pciaddress"/>
|
2018-11-08 11:00:26 +00:00
|
|
|
<ref name="zpciaddress"/>
|
2011-08-13 01:33:15 +00:00
|
|
|
</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>
|
2013-03-05 15:44:19 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>ccw</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="ccwaddress"/>
|
|
|
|
</group>
|
2013-12-09 09:11:13 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>isa</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="isaaddress"/>
|
|
|
|
</group>
|
2015-02-25 10:23:45 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>virtio-mmio</value>
|
|
|
|
</attribute>
|
|
|
|
</group>
|
2014-10-07 16:11:47 +00:00
|
|
|
<group>
|
|
|
|
<attribute name="type">
|
|
|
|
<value>dimm</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="dimmaddress"/>
|
|
|
|
</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">
|
2018-04-19 15:55:41 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="enabled">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-01-25 16:20:49 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="bar">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virOnOff"/>
|
2012-01-25 16:20:49 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="file">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2012-01-25 00:54:12 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2014-09-29 17:02:04 +00:00
|
|
|
<define name="memorydev">
|
|
|
|
<element name="memory">
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>dimm</value>
|
2016-07-28 16:54:18 +00:00
|
|
|
<value>nvdimm</value>
|
2014-09-29 17:02:04 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
2016-08-01 12:59:38 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="access">
|
|
|
|
<choice>
|
|
|
|
<value>shared</value>
|
|
|
|
<value>private</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2018-05-11 13:08:53 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="discard">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2014-09-29 17:02:04 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="memorydev-source"/>
|
|
|
|
</optional>
|
|
|
|
<ref name="memorydev-target"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
2016-07-20 12:11:45 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
2014-09-29 17:02:04 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="memorydev-source">
|
|
|
|
<element name="source">
|
2016-07-28 16:54:18 +00:00
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="pagesize">
|
|
|
|
<ref name="scaledInteger"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="nodemask">
|
|
|
|
<ref name="cpuset"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
<group>
|
2018-12-20 09:14:40 +00:00
|
|
|
<interleave>
|
|
|
|
<element name="path">
|
|
|
|
<ref name="absFilePath"/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name="alignsize">
|
|
|
|
<ref name="scaledInteger"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-12-20 09:14:41 +00:00
|
|
|
<optional>
|
|
|
|
<element name="pmem">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-12-20 09:14:40 +00:00
|
|
|
</interleave>
|
2016-07-28 16:54:18 +00:00
|
|
|
</group>
|
|
|
|
</choice>
|
2014-09-29 17:02:04 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="memorydev-target">
|
|
|
|
<element name="target">
|
|
|
|
<interleave>
|
|
|
|
<element name="size">
|
|
|
|
<ref name="scaledInteger"/>
|
|
|
|
</element>
|
2015-10-07 11:52:45 +00:00
|
|
|
<optional>
|
|
|
|
<element name="node">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2017-02-27 10:20:26 +00:00
|
|
|
<optional>
|
|
|
|
<element name="label">
|
|
|
|
<element name="size">
|
|
|
|
<ref name="scaledInteger"/>
|
|
|
|
</element>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-12-20 09:14:42 +00:00
|
|
|
<optional>
|
|
|
|
<element name="readonly">
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2014-09-29 17:02:04 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-12-20 11:06:52 +00:00
|
|
|
<define name="rng">
|
|
|
|
<element name="rng">
|
|
|
|
<attribute name="model">
|
2019-01-17 17:52:35 +00:00
|
|
|
<choice>
|
|
|
|
<value>virtio</value>
|
|
|
|
<value>virtio-transitional</value>
|
|
|
|
<value>virtio-non-transitional</value>
|
|
|
|
</choice>
|
2012-12-20 11:06:52 +00:00
|
|
|
</attribute>
|
2013-02-13 14:37:39 +00:00
|
|
|
<interleave>
|
|
|
|
<ref name="rng-backend"/>
|
2016-06-06 15:01:56 +00:00
|
|
|
<optional>
|
|
|
|
<element name="driver">
|
|
|
|
<ref name="virtioOptions"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-02-13 14:37:39 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="rng-rate"/>
|
|
|
|
</optional>
|
2013-12-05 17:33:01 +00:00
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
2013-02-13 14:37:39 +00:00
|
|
|
</interleave>
|
2012-12-20 11:06:52 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="rng-backend">
|
|
|
|
<element name="backend">
|
|
|
|
<choice>
|
|
|
|
<group>
|
|
|
|
<attribute name="model">
|
|
|
|
<value>random</value>
|
|
|
|
</attribute>
|
2013-03-04 22:42:07 +00:00
|
|
|
<choice>
|
2016-04-13 19:09:30 +00:00
|
|
|
<ref name='absFilePath'/>
|
2013-03-07 14:06:53 +00:00
|
|
|
<empty/>
|
2013-03-04 22:42:07 +00:00
|
|
|
</choice>
|
2012-12-20 11:06:52 +00:00
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<attribute name="model">
|
|
|
|
<value>egd</value>
|
|
|
|
</attribute>
|
|
|
|
<ref name="qemucdevSrcType"/>
|
|
|
|
<ref name="qemucdevSrcDef"/>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2013-02-13 14:37:39 +00:00
|
|
|
<define name="rng-rate">
|
|
|
|
<element name="rate">
|
|
|
|
<attribute name="bytes">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name="period">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2017-05-24 14:44:44 +00:00
|
|
|
<define name="virtioOptions">
|
|
|
|
<optional>
|
|
|
|
<attribute name="iommu">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
2019-01-04 09:40:48 +00:00
|
|
|
</optional>
|
|
|
|
<optional>
|
2017-05-24 14:44:44 +00:00
|
|
|
<attribute name="ats">
|
|
|
|
<ref name="virOnOff"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</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="deviceBoot">
|
|
|
|
<element name="boot">
|
|
|
|
<attribute name="order">
|
|
|
|
<ref name="positiveInteger"/>
|
|
|
|
</attribute>
|
2017-06-01 16:36:24 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="loadparm">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-zA-Z0-9.\s]{1,8}</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2011-08-13 01:33:15 +00:00
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</define>
|
conf: alter disk mirror xml output
Now that we track a disk mirror as a virStorageSource, we might
as well update the XML to theoretically allow any type of
mirroring destination (not just a local file). A later patch
will also be reusing <mirror> to track the block commit of the
top layer of a chain, which is another case where libvirt needs
to update the backing chain after the job is finally pivoted,
and since backing chains can have network backing files as the
destination to commit into, it makes more sense to display that
in the XML.
This patch changes output-only XML; it was already documented
that <mirror> does not affect a domain definition at this point
(because qemu doesn't provide persistent bitmaps yet). Any
application that was starting a block copy job with older libvirt
and then relying on the domain XML to determine if it was
complete will no longer be able to access the file= and format=
attributes of mirror that were previously used. However, this is
not going to be a problem in practice: the only time a block copy
job works is on a transient domain, and any app that is managing
a transient domain probably already does enough of its own
bookkeeping to know which file it is mirroring into without
having to re-read it from the libvirt XML. The one thing that
was likely to be used in a mirroring job was the ready=
attribute, which is unchanged. Meanwhile, I made sure the schema
and parser still accept the old format, even if we no longer
output it, so that upgrading from an older version of libvirt is
seamless.
* docs/schemas/domaincommon.rng (diskMirror): Alter definition.
* src/conf/domain_conf.c (virDomainDiskDefParseXML): Parse two
styles of mirror elements.
(virDomainDiskDefFormat): Output new style.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror-old.xml: New
file, copied from...
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: ...here
before modernizing.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old*: New
files.
* tests/qemuxml2xmltest.c (mymain): Test both styles.
Signed-off-by: Eric Blake <eblake@redhat.com>
2014-05-22 04:39:57 +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
|
|
|
<define name='diskMirror'>
|
|
|
|
<element name='mirror'>
|
conf: alter disk mirror xml output
Now that we track a disk mirror as a virStorageSource, we might
as well update the XML to theoretically allow any type of
mirroring destination (not just a local file). A later patch
will also be reusing <mirror> to track the block commit of the
top layer of a chain, which is another case where libvirt needs
to update the backing chain after the job is finally pivoted,
and since backing chains can have network backing files as the
destination to commit into, it makes more sense to display that
in the XML.
This patch changes output-only XML; it was already documented
that <mirror> does not affect a domain definition at this point
(because qemu doesn't provide persistent bitmaps yet). Any
application that was starting a block copy job with older libvirt
and then relying on the domain XML to determine if it was
complete will no longer be able to access the file= and format=
attributes of mirror that were previously used. However, this is
not going to be a problem in practice: the only time a block copy
job works is on a transient domain, and any app that is managing
a transient domain probably already does enough of its own
bookkeeping to know which file it is mirroring into without
having to re-read it from the libvirt XML. The one thing that
was likely to be used in a mirroring job was the ready=
attribute, which is unchanged. Meanwhile, I made sure the schema
and parser still accept the old format, even if we no longer
output it, so that upgrading from an older version of libvirt is
seamless.
* docs/schemas/domaincommon.rng (diskMirror): Alter definition.
* src/conf/domain_conf.c (virDomainDiskDefParseXML): Parse two
styles of mirror elements.
(virDomainDiskDefFormat): Output new style.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror-old.xml: New
file, copied from...
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: ...here
before modernizing.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old*: New
files.
* tests/qemuxml2xmltest.c (mymain): Test both styles.
Signed-off-by: Eric Blake <eblake@redhat.com>
2014-05-22 04:39:57 +00:00
|
|
|
<choice>
|
2014-06-16 19:34:36 +00:00
|
|
|
<group> <!-- old format, for block copy back-compat -->
|
conf: alter disk mirror xml output
Now that we track a disk mirror as a virStorageSource, we might
as well update the XML to theoretically allow any type of
mirroring destination (not just a local file). A later patch
will also be reusing <mirror> to track the block commit of the
top layer of a chain, which is another case where libvirt needs
to update the backing chain after the job is finally pivoted,
and since backing chains can have network backing files as the
destination to commit into, it makes more sense to display that
in the XML.
This patch changes output-only XML; it was already documented
that <mirror> does not affect a domain definition at this point
(because qemu doesn't provide persistent bitmaps yet). Any
application that was starting a block copy job with older libvirt
and then relying on the domain XML to determine if it was
complete will no longer be able to access the file= and format=
attributes of mirror that were previously used. However, this is
not going to be a problem in practice: the only time a block copy
job works is on a transient domain, and any app that is managing
a transient domain probably already does enough of its own
bookkeeping to know which file it is mirroring into without
having to re-read it from the libvirt XML. The one thing that
was likely to be used in a mirroring job was the ready=
attribute, which is unchanged. Meanwhile, I made sure the schema
and parser still accept the old format, even if we no longer
output it, so that upgrading from an older version of libvirt is
seamless.
* docs/schemas/domaincommon.rng (diskMirror): Alter definition.
* src/conf/domain_conf.c (virDomainDiskDefParseXML): Parse two
styles of mirror elements.
(virDomainDiskDefFormat): Output new style.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror-old.xml: New
file, copied from...
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: ...here
before modernizing.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old*: New
files.
* tests/qemuxml2xmltest.c (mymain): Test both styles.
Signed-off-by: Eric Blake <eblake@redhat.com>
2014-05-22 04:39:57 +00:00
|
|
|
<attribute name='file'>
|
|
|
|
<ref name='absFilePath'/>
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<attribute name='format'>
|
|
|
|
<ref name='storageFormat'/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2014-07-29 03:46:44 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='job'>
|
2017-09-07 09:58:26 +00:00
|
|
|
<value>copy</value>
|
2014-07-29 03:46:44 +00:00
|
|
|
</attribute>
|
|
|
|
</optional>
|
2014-06-16 19:34:36 +00:00
|
|
|
<optional>
|
|
|
|
<interleave>
|
|
|
|
<ref name='diskSourceFile'/>
|
|
|
|
<optional>
|
|
|
|
<ref name="diskFormat"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</optional>
|
conf: alter disk mirror xml output
Now that we track a disk mirror as a virStorageSource, we might
as well update the XML to theoretically allow any type of
mirroring destination (not just a local file). A later patch
will also be reusing <mirror> to track the block commit of the
top layer of a chain, which is another case where libvirt needs
to update the backing chain after the job is finally pivoted,
and since backing chains can have network backing files as the
destination to commit into, it makes more sense to display that
in the XML.
This patch changes output-only XML; it was already documented
that <mirror> does not affect a domain definition at this point
(because qemu doesn't provide persistent bitmaps yet). Any
application that was starting a block copy job with older libvirt
and then relying on the domain XML to determine if it was
complete will no longer be able to access the file= and format=
attributes of mirror that were previously used. However, this is
not going to be a problem in practice: the only time a block copy
job works is on a transient domain, and any app that is managing
a transient domain probably already does enough of its own
bookkeeping to know which file it is mirroring into without
having to re-read it from the libvirt XML. The one thing that
was likely to be used in a mirroring job was the ready=
attribute, which is unchanged. Meanwhile, I made sure the schema
and parser still accept the old format, even if we no longer
output it, so that upgrading from an older version of libvirt is
seamless.
* docs/schemas/domaincommon.rng (diskMirror): Alter definition.
* src/conf/domain_conf.c (virDomainDiskDefParseXML): Parse two
styles of mirror elements.
(virDomainDiskDefFormat): Output new style.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror-old.xml: New
file, copied from...
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: ...here
before modernizing.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old*: New
files.
* tests/qemuxml2xmltest.c (mymain): Test both styles.
Signed-off-by: Eric Blake <eblake@redhat.com>
2014-05-22 04:39:57 +00:00
|
|
|
</group>
|
2014-06-16 19:34:36 +00:00
|
|
|
<group> <!-- preferred format -->
|
2014-07-29 03:46:44 +00:00
|
|
|
<attribute name='job'>
|
|
|
|
<choice>
|
|
|
|
<value>copy</value>
|
|
|
|
<value>active-commit</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
conf: alter disk mirror xml output
Now that we track a disk mirror as a virStorageSource, we might
as well update the XML to theoretically allow any type of
mirroring destination (not just a local file). A later patch
will also be reusing <mirror> to track the block commit of the
top layer of a chain, which is another case where libvirt needs
to update the backing chain after the job is finally pivoted,
and since backing chains can have network backing files as the
destination to commit into, it makes more sense to display that
in the XML.
This patch changes output-only XML; it was already documented
that <mirror> does not affect a domain definition at this point
(because qemu doesn't provide persistent bitmaps yet). Any
application that was starting a block copy job with older libvirt
and then relying on the domain XML to determine if it was
complete will no longer be able to access the file= and format=
attributes of mirror that were previously used. However, this is
not going to be a problem in practice: the only time a block copy
job works is on a transient domain, and any app that is managing
a transient domain probably already does enough of its own
bookkeeping to know which file it is mirroring into without
having to re-read it from the libvirt XML. The one thing that
was likely to be used in a mirroring job was the ready=
attribute, which is unchanged. Meanwhile, I made sure the schema
and parser still accept the old format, even if we no longer
output it, so that upgrading from an older version of libvirt is
seamless.
* docs/schemas/domaincommon.rng (diskMirror): Alter definition.
* src/conf/domain_conf.c (virDomainDiskDefParseXML): Parse two
styles of mirror elements.
(virDomainDiskDefFormat): Output new style.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror-old.xml: New
file, copied from...
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: ...here
before modernizing.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old*: New
files.
* tests/qemuxml2xmltest.c (mymain): Test both styles.
Signed-off-by: Eric Blake <eblake@redhat.com>
2014-05-22 04:39:57 +00:00
|
|
|
<interleave>
|
|
|
|
<ref name="diskSource"/>
|
|
|
|
<optional>
|
|
|
|
<ref name="diskFormat"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
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>
|
|
|
|
<attribute name='ready'>
|
2014-07-28 22:25:28 +00:00
|
|
|
<choice>
|
|
|
|
<value>yes</value>
|
|
|
|
<value>abort</value>
|
|
|
|
<value>pivot</value>
|
|
|
|
</choice>
|
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
|
|
|
</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>
|
2013-03-21 11:53:53 +00:00
|
|
|
<value>iscsi</value>
|
2011-10-28 18:29:39 +00:00
|
|
|
</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>
|
2014-10-29 12:16:00 +00:00
|
|
|
<choice>
|
|
|
|
<element name="total_bytes_sec_max">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
<group>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="read_bytes_sec_max">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="write_bytes_sec_max">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<choice>
|
|
|
|
<element name="total_iops_sec_max">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
<group>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="read_iops_sec_max">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="write_iops_sec_max">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<optional>
|
|
|
|
<element name="size_iops_sec">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-10-01 13:01:06 +00:00
|
|
|
<optional>
|
|
|
|
<element name="group_name">
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2016-09-19 10:41:05 +00:00
|
|
|
<choice>
|
|
|
|
<element name="total_bytes_sec_max_length">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
<group>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="read_bytes_sec_max_length">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="write_bytes_sec_max_length">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
|
|
|
<choice>
|
|
|
|
<element name="total_iops_sec_max_length">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
<group>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="read_iops_sec_max_length">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="write_iops_sec_max_length">
|
|
|
|
<data type="unsignedLong"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</group>
|
|
|
|
</choice>
|
2011-11-15 09:02:46 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-10-16 16:25:56 +00:00
|
|
|
<!-- Optional HyperV Enlightenment features -->
|
|
|
|
<define name="hyperv">
|
|
|
|
<element name="hyperv">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="relaxed">
|
2013-09-23 12:59:28 +00:00
|
|
|
<ref name="featurestate"/>
|
2012-10-16 16:25:56 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
2013-06-21 10:20:12 +00:00
|
|
|
<optional>
|
|
|
|
<element name="vapic">
|
2013-09-23 12:59:28 +00:00
|
|
|
<ref name="featurestate"/>
|
2013-06-21 10:20:12 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="spinlocks">
|
2013-09-23 12:59:28 +00:00
|
|
|
<ref name="featurestate"/>
|
2013-07-04 10:12:57 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="retries">
|
|
|
|
<data type="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2013-06-21 10:20:12 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
2016-03-10 12:43:49 +00:00
|
|
|
<optional>
|
|
|
|
<element name="vpindex">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="runtime">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="synic">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="stimer">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="reset">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="vendor_id">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
<optional>
|
|
|
|
<attribute name="value">
|
|
|
|
<data type="string">
|
|
|
|
<param name='pattern'>[^,]{0,12}</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-08-09 13:14:19 +00:00
|
|
|
<optional>
|
|
|
|
<element name="frequencies">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-08-09 13:14:20 +00:00
|
|
|
<optional>
|
|
|
|
<element name="reenlightenment">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-08-09 13:14:21 +00:00
|
|
|
<optional>
|
|
|
|
<element name="tlbflush">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-11-14 22:46:04 +00:00
|
|
|
<optional>
|
|
|
|
<element name="ipi">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-11-14 22:46:06 +00:00
|
|
|
<optional>
|
|
|
|
<element name="evmcs">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2012-10-16 16:25:56 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2014-08-21 17:04:45 +00:00
|
|
|
<!-- Optional KVM features -->
|
|
|
|
<define name="kvm">
|
|
|
|
<element name="kvm">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="hidden">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2014-07-18 08:02:29 +00:00
|
|
|
<!-- Optional capabilities features -->
|
|
|
|
<define name="capabilities">
|
|
|
|
<element name="capabilities">
|
|
|
|
<ref name="capabilitiespolicy"/>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="audit_control">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="audit_write">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="block_suspend">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="chown">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="dac_override">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="dac_read_search">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="fowner">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="fsetid">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="ipc_lock">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="ipc_owner">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="kill">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="lease">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="linux_immutable">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="mac_admin">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="mac_override">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="mknod">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="net_admin">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="net_bind_service">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="net_broadcast">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="net_raw">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="setgid">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="setfcap">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="setpcap">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="setuid">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_admin">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_boot">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_chroot">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_module">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_nice">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_pacct">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_ptrace">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_rawio">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_resource">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_time">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="sys_tty_config">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="syslog">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="wake_alarm">
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2015-01-05 15:21:51 +00:00
|
|
|
<define name="pmu">
|
|
|
|
<element name="pmu">
|
|
|
|
<optional>
|
|
|
|
<ref name="featurestate"/>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2013-09-23 12:59:28 +00:00
|
|
|
<define name="featurestate">
|
2012-10-16 16:25:56 +00:00
|
|
|
<attribute name="state">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virOnOff"/>
|
2012-10-16 16:25:56 +00:00
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
|
2014-07-18 08:02:29 +00:00
|
|
|
<define name="capabilitiespolicy">
|
|
|
|
<attribute name="policy">
|
|
|
|
<choice>
|
|
|
|
<value>default</value>
|
|
|
|
<value>allow</value>
|
|
|
|
<value>deny</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
Optional hypervisor extensions in their own namespace:
|
2018-03-31 14:51:14 +00:00
|
|
|
QEMU
|
2011-08-13 01:33:15 +00:00
|
|
|
-->
|
|
|
|
<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>
|
|
|
|
|
2015-08-20 13:46:17 +00:00
|
|
|
<!--
|
|
|
|
Optional hypervisor extensions in their own namespace:
|
|
|
|
LXC
|
|
|
|
-->
|
|
|
|
<define name="lxcsharens">
|
|
|
|
<element name="namespace" ns="http://libvirt.org/schemas/domain/lxc/1.0">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="sharenet">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>netns</value>
|
|
|
|
<value>name</value>
|
|
|
|
<value>pid</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name='value'/>
|
|
|
|
</element>
|
|
|
|
<element name="shareipc">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>name</value>
|
|
|
|
<value>pid</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name='value'/>
|
|
|
|
</element>
|
|
|
|
<element name="shareuts">
|
|
|
|
<attribute name="type">
|
|
|
|
<choice>
|
|
|
|
<value>name</value>
|
|
|
|
<value>pid</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<attribute name='value'/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2019-01-17 15:07:20 +00:00
|
|
|
<!--
|
|
|
|
Optional hypervisor extensions in their own namespace:
|
|
|
|
Bhyve
|
|
|
|
-->
|
|
|
|
<define name="bhyvecmdline">
|
|
|
|
<element name="commandline" ns="http://libvirt.org/schemas/domain/bhyve/1.0">
|
|
|
|
<zeroOrMore>
|
|
|
|
<element name="arg">
|
|
|
|
<attribute name='value'/>
|
|
|
|
</element>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
<!--
|
|
|
|
Type library
|
|
|
|
-->
|
|
|
|
<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>
|
2012-09-18 10:30:52 +00:00
|
|
|
<define name="rebootTimeoutDelay">
|
|
|
|
<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>
|
|
|
|
<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">
|
2015-02-23 11:34:23 +00:00
|
|
|
<param name="pattern">[A-Za-z0-9_\.\+\- ]+</param>
|
2011-08-13 01:33:15 +00:00
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="bridgeMode">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(vepa|bridge|private|passthrough)</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name="addrIPorName">
|
2015-11-26 09:39:54 +00:00
|
|
|
<choice>
|
|
|
|
<ref name="ipAddr"/>
|
|
|
|
<ref name="dnsName"/>
|
|
|
|
</choice>
|
2011-08-13 01:33:15 +00:00
|
|
|
</define>
|
2012-09-13 07:25:47 +00:00
|
|
|
<define name="usbIdDefault">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">-1</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="usbId">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2012-09-13 07:25:47 +00:00
|
|
|
<define name="usbVersion">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[0-9]{1,2}.[0-9]{1,2}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<define name="usbAddr">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(0x)?[0-9a-fA-F]{1,3}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2012-09-13 07:25:47 +00:00
|
|
|
<define name="usbClass">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
docs: Fix XML schema handling of LUN address in hostdev tag
Defining a domain with a SCSI disk attached via a hostdev
tag and a source address unit value longer than two digits
causes an error when editing the domain with virsh edit,
even if no changes are made to the domain definition.
The error suggests invalid XML, somewhere:
# virsh edit lmb_guest
error: XML document failed to validate against schema:
Unable to validate doc against /usr/local/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content
The virt-xml-validate tool fails with a similar error:
# virt-xml-validate lmb_guest.xml
Relax-NG validity error : Extra element devices in interleave
lmb_guest.xml:17: element devices: Relax-NG validity error :
Element domain failed to validate content
lmb_guest.xml fails to validate
The hostdev tag requires a source address to be specified,
which includes bus, target, and unit address attributes.
According to the SCSI Architecture Model spec (section
4.9 of SAM-2), a LUN address is 64 bits and thus could be
up to 20 decimal digits long. Unfortunately, the XML
schema limits this string to just two digits. Similarly,
the target field can be up to 32 bits in length, which
would be 10 decimal digits.
# lsscsi -xx
[0:0:19:0x4022401100000000] disk IBM 2107900 3.44 /dev/sda
# lsscsi
[0:0:19:1074872354]disk IBM 2107900 3.44 /dev/sda
# cat lmb_guest.xml
<domain type='kvm'>
<name>lmb_guest</name>
<memory unit='MiB'>1024</memory>
...trimmed...
<devices>
<controller type='scsi' model='virtio-scsi' index='0'/>
<hostdev mode='subsystem' type='scsi'>
<source>
<adapter name='scsi_host0'/>
<address bus='0' target='19' unit='1074872354'/>
</source>
</hostdev>
...trimmed...
Since the reference unit and target fields are used in
several places in the XML schema, create a separate one
specific for SCSI Logical Units that will permit the
greater length. This permits both the validation utility
and the virsh edit command to succeed when a hostdev
tag is included.
Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2015-06-17 03:29:54 +00:00
|
|
|
<define name="driveSCSITarget">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[0-9]{1,10}</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>
|
docs: Fix XML schema handling of LUN address in hostdev tag
Defining a domain with a SCSI disk attached via a hostdev
tag and a source address unit value longer than two digits
causes an error when editing the domain with virsh edit,
even if no changes are made to the domain definition.
The error suggests invalid XML, somewhere:
# virsh edit lmb_guest
error: XML document failed to validate against schema:
Unable to validate doc against /usr/local/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content
The virt-xml-validate tool fails with a similar error:
# virt-xml-validate lmb_guest.xml
Relax-NG validity error : Extra element devices in interleave
lmb_guest.xml:17: element devices: Relax-NG validity error :
Element domain failed to validate content
lmb_guest.xml fails to validate
The hostdev tag requires a source address to be specified,
which includes bus, target, and unit address attributes.
According to the SCSI Architecture Model spec (section
4.9 of SAM-2), a LUN address is 64 bits and thus could be
up to 20 decimal digits long. Unfortunately, the XML
schema limits this string to just two digits. Similarly,
the target field can be up to 32 bits in length, which
would be 10 decimal digits.
# lsscsi -xx
[0:0:19:0x4022401100000000] disk IBM 2107900 3.44 /dev/sda
# lsscsi
[0:0:19:1074872354]disk IBM 2107900 3.44 /dev/sda
# cat lmb_guest.xml
<domain type='kvm'>
<name>lmb_guest</name>
<memory unit='MiB'>1024</memory>
...trimmed...
<devices>
<controller type='scsi' model='virtio-scsi' index='0'/>
<hostdev mode='subsystem' type='scsi'>
<source>
<adapter name='scsi_host0'/>
<address bus='0' target='19' unit='1074872354'/>
</source>
</hostdev>
...trimmed...
Since the reference unit and target fields are used in
several places in the XML schema, create a separate one
specific for SCSI Logical Units that will permit the
greater length. This permits both the validation utility
and the virsh edit command to succeed when a hostdev
tag is included.
Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2015-06-17 03:29:54 +00:00
|
|
|
<define name="driveSCSIUnit">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[0-9]{1,20}</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
2011-08-13 01:33:15 +00:00
|
|
|
<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>
|
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">
|
2013-08-23 13:03:31 +00:00
|
|
|
<param name="pattern">[a-zA-Z0-9_\-.]+</param>
|
2012-01-16 09:28:51 +00:00
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
<define name='alias'>
|
|
|
|
<element name='alias'>
|
|
|
|
<attribute name='name'>
|
|
|
|
<ref name='aliasName'/>
|
|
|
|
</attribute>
|
|
|
|
</element>
|
|
|
|
<empty/>
|
|
|
|
</define>
|
2013-12-09 09:11:14 +00:00
|
|
|
<define name="panic">
|
|
|
|
<element name="panic">
|
2015-11-24 12:26:31 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name="model">
|
|
|
|
<choice>
|
|
|
|
<value>isa</value>
|
|
|
|
<value>pseries</value>
|
|
|
|
<value>hyperv</value>
|
2016-04-29 13:23:41 +00:00
|
|
|
<value>s390</value>
|
2015-11-24 12:26:31 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2018-05-02 11:54:55 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<ref name="alias"/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="address"/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2013-12-09 09:11:14 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
2014-09-09 22:48:57 +00:00
|
|
|
<define name="rawIO">
|
|
|
|
<attribute name="rawio">
|
|
|
|
<ref name="virYesNo"/>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2015-04-20 07:49:36 +00:00
|
|
|
<define name="sgIO">
|
|
|
|
<attribute name="sgio">
|
|
|
|
<choice>
|
|
|
|
<value>filtered</value>
|
|
|
|
<value>unfiltered</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</define>
|
2017-04-07 15:46:32 +00:00
|
|
|
|
|
|
|
<define name="coalesce">
|
|
|
|
<element name="coalesce">
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name="rx">
|
|
|
|
<optional>
|
|
|
|
<element name="frames">
|
|
|
|
<optional>
|
|
|
|
<attribute name="max">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<!--
|
|
|
|
This is how we'd add more Rx-related settings for
|
|
|
|
frames, like irq, high, and low
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<attribute name="irq">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="high">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="low">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
-->
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!--
|
|
|
|
This is how we'd add more Rx-related settings, like
|
|
|
|
usecs
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<element name="usecs">
|
|
|
|
<optional>
|
|
|
|
<attribute name="max">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="irq">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="high">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="low">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
-->
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!--
|
|
|
|
This is how you would add more coalesce settings, like
|
|
|
|
Tx-related ones
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<element name="tx">
|
|
|
|
<optional>
|
|
|
|
<element name="frames">
|
|
|
|
<optional>
|
|
|
|
<attribute name="max">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="irq">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="high">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="low">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="usecs">
|
|
|
|
<optional>
|
|
|
|
<attribute name="max">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="irq">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="high">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="low">
|
|
|
|
<ref name="unsignedInt"/>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
-->
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2011-08-13 01:33:15 +00:00
|
|
|
</grammar>
|