mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
252958ee16
Prepare for new backup APIs by describing the XML that will represent a backup. The XML resembles snapshots and checkpoints in being able to select actions for a set of disks, but has other differences. It can support both push model (the hypervisor does the backup directly into the destination file) and pull model (the hypervisor exposes an access port for a third party to grab what is necessary). Add testsuite coverage for some minimal uses of the XML. The <disk> element within <domainbackup> tries to model the same elements as a <disk> under <domain>, but sharing the RNG grammar proved to be hairy. That is in part because while <domain> use <source> to describe a host resource in use by the guest, a backup job is using a host resource that is not visible to the guest: a push backup action is instead describing a <target> (which ultimately could be a remote network resource, but for simplicity the RNG just validates a local file for now), and a pull backup action is instead describing a temporary local file <scratch> (which probably should not be a remote resource). A future refactoring may thus introduce some way to parameterize RNG to accept <disk type='FOO'>...</disk> so that the name of the subelement can be <source> for domain, or <target> or <scratch> as needed for backups. Future patches may improve this area of code. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
49 lines
1.8 KiB
XML
49 lines
1.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<body>
|
|
<h1>XML Format</h1>
|
|
|
|
|
|
<p>
|
|
Objects in the libvirt API are configured using XML documents to allow
|
|
for ease of extension in future releases. Each XML document has an
|
|
associated Relax-NG schema that can be used to validate documents
|
|
prior to usage.
|
|
</p>
|
|
|
|
|
|
<ul>
|
|
<li><a href="formatdomain.html">Domains</a></li>
|
|
<li><a href="formatnetwork.html">Networks</a></li>
|
|
<li><a href="formatnwfilter.html">Network filtering</a></li>
|
|
<li><a href="formatnetworkport.html">Network ports</a></li>
|
|
<li><a href="formatstorage.html">Storage</a></li>
|
|
<li><a href="formatstorageencryption.html">Storage encryption</a></li>
|
|
<li><a href="formatcaps.html">Capabilities</a></li>
|
|
<li><a href="formatdomaincaps.html">Domain capabilities</a></li>
|
|
<li><a href="formatstoragecaps.html">Storage Pool capabilities</a></li>
|
|
<li><a href="formatnode.html">Node devices</a></li>
|
|
<li><a href="formatsecret.html">Secrets</a></li>
|
|
<li><a href="formatsnapshot.html">Snapshots</a></li>
|
|
<li><a href="formatcheckpoint.html">Checkpoints</a></li>
|
|
<li><a href="formatbackup.html">Backup jobs</a></li>
|
|
</ul>
|
|
|
|
<h2>Command line validation</h2>
|
|
|
|
<p>
|
|
The <code>virt-xml-validate</code> tool provides a simple command line
|
|
for validating XML documents prior to giving them to libvirt. It uses
|
|
the locally instaled RNG schema documents. It will auto-detect which
|
|
schema to use for validation based on the name of the top level element
|
|
in the input document. Thus it merely requires the XML document filename
|
|
to be passed on the command line
|
|
</p>
|
|
|
|
<pre>
|
|
$ virt-xml-validate /path/to/XML/file</pre>
|
|
|
|
</body>
|
|
</html>
|