]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu_migration: Precreate missing storage
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 25 Nov 2014 13:19:07 +0000 (14:19 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Dec 2014 17:02:13 +0000 (18:02 +0100)
commitcf54c60699833b3791a5d0eb3eb5a1948c267f6b
tree9458242d29ceebe29081530c79e0b6d6b6b76f90
parente1466dc7fa0b8c2bc64f815b263386709e1e8267
qemu_migration: Precreate missing storage

Based on previous commit, we can now precreate missing volumes. While
digging out the functionality from storage driver would be nicer, if
you've seen the code it's nearly impossible. So I'm going from the
other end:

1) For given disk target, disk path is looked up.
2) For the disk path, storage pool is looked up, a volume XML is
constructed and then passed to virStorageVolCreateXML() which has all
the knowledge how to create raw images, (encrypted) qcow(2) images,
etc.

One of the advantages of this approach is, we don't have to care about
image conversion - qemu does that for us. So for instance, users can
transform qcow2 into raw on migration (if the correct XML is passed to
the migration API).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt-domain.c
src/qemu/qemu_migration.c