Migrating qemu domains with disks using cache != none is unsafe unless
the disk images are stored on coherent clustered filesystem. Thus we
forbid migrating such domains unless VIR_MIGRATE_UNSAFE flags is used.
This series uses similar aproach to forbidding unsafe PCI passthrough
or disk format probing when we forbade those by default with the
possibility to force them.
Domain configuration is only checked on source, which makes migrating
affected domains from an old libvirt to the new one possible. Migrating
back is impossible since destination libvirtd would complain about
unknown flag (the flag is not filtered so it gets to the destination
even though it's not really used there).
However, users of clustered filesystems now have to always pass the new
flag to be able to migrate because libvirtd would think they are doing
something unsafe. Perhaps we should provide a system wide (i.e.,
/etc/libvirt/qemu.conf) tunable which would disable cache mode checking
for all domains at once?
I was also wondering if we should rather use more specific name for both
the error code and flag, such as VIR(_ERR)?_MIGRATE_UNSAFE_CACHE
(or ...UNSAFE_DISK) in the case we find other unsafe conditions...
Jiri Denemark (3):
Add support for unsafe migration
virsh: Add --unsafe option to migrate command
qemu: Forbid migration with cache != none
include/libvirt/libvirt.h.in | 2 +-
include/libvirt/virterror.h | 1 +
src/libvirt.c | 4 ++++
src/qemu/qemu_driver.c | 3 ++-
src/qemu/qemu_migration.c | 36 ++++++++++++++++++++++++++++++++----
src/qemu/qemu_migration.h | 6 ++++--
src/util/virterror.c | 6 ++++++
tools/virsh.c | 4 ++++
tools/virsh.pod | 10 +++++++++-
9 files changed, 63 insertions(+), 9 deletions(-)
--
1.7.8.4