Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Eric Blake ae6aa8c396 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-04-23 08:43:33 -06:00
.gnulib@f15a17dc1f build: fix fresh checkout on RHEL5 2012-04-19 17:11:43 -06:00
daemon The policy kit and HAL node device drivers both require a 2012-04-19 17:03:10 +01:00
docs blockjob: enhance xml to track mirrors across libvirtd restart 2012-04-23 08:43:33 -06:00
examples Revert "Refactor the libvirt RPM daemon pieces" 2012-04-03 14:49:31 +08:00
gnulib build: fix fresh checkout on RHEL5 2012-04-19 17:11:43 -06:00
include blockjob: add new API flags 2012-04-23 07:44:29 -06:00
m4 Enable all warnings permanently & default to -Werror for GIT builds 2012-03-27 17:08:06 +01:00
po The policy kit and HAL node device drivers both require a 2012-04-19 17:03:10 +01:00
python Fix compilation error on 32bit 2012-04-10 06:24:03 -04:00
src blockjob: enhance xml to track mirrors across libvirtd restart 2012-04-23 08:43:33 -06:00
tests blockjob: enhance xml to track mirrors across libvirtd restart 2012-04-23 08:43:33 -06:00
tools blockjob: add 'blockcopy' to virsh 2012-04-23 07:44:30 -06:00
.dir-locals.el maint: let emacs avoid tabs in rng files 2011-08-13 08:56:26 -06:00
.gitignore gitignore: Reorder alphabetically 2012-04-13 13:47:13 +02:00
.gitmodules
.mailmap maint: prune duplicate listings in AUTHORS 2012-02-03 09:56:45 -07:00
AUTHORS esx: Fix segfault in esxConnectToHost 2012-04-21 14:13:22 +02:00
autobuild.sh Enable all warnings permanently & default to -Werror for GIT builds 2012-03-27 17:08:06 +01:00
autogen.sh build: allow for local gnulib diffs 2011-11-09 09:03:33 -07:00
bootstrap build: fix fresh checkout on RHEL5 2012-04-19 17:11:43 -06:00
bootstrap.conf Pull in GNULIB regex module for benefit of test suite on Win32 2012-04-04 14:33:27 +01:00
cfg.mk build: avoid strtol and strtod 2012-04-19 17:42:53 -06:00
ChangeLog-old virterror.c: Fix several spelling mistakes 2012-02-03 11:32:51 -07:00
configure.ac The policy kit and HAL node device drivers both require a 2012-04-19 17:03:10 +01:00
COPYING.LIB
HACKING Document STREQ_NULLABLE and STRNEQ_NULLABLE 2011-10-06 16:50:38 +02:00
libvirt.pc.in Fix typos in API XML file paths 2012-02-15 11:29:38 +00:00
libvirt.spec.in Fix initial hypervisor conditionals 2012-04-04 10:54:20 +01:00
Makefile.am maint: add missing copyright notices 2011-07-28 15:01:17 -06:00
Makefile.nonreentrant
mingw32-libvirt.spec.in Fix typos in API XML file paths 2012-02-15 11:29:38 +00:00
README
README-hacking
TODO

         LibVirt : simple API for virtualization

  Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the basic
resources are driven by a Linux instance. The library aim at providing
long term stable C API initially for the Xen paravirtualization but
should be able to integrate other virtualization mechanisms if needed.

Daniel Veillard <veillard@redhat.com>