[libvirt] [PATCH v2 0/4] Forbid migration with cache != none

Jiri Denemark jdenemar at redhat.com
Wed Feb 22 14:51:07 UTC 2012

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 unknown 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...

Version 2:
- add virStorageFileIsClusterFS as suggested by Dan B.

Jiri Denemark (4):
  Add support for unsafe migration
  virsh: Add --unsafe option to migrate command
  Introduce virStorageFileIsClusterFS
  qemu: Forbid migration with cache != none

 include/libvirt/libvirt.h.in |    2 +-
 include/libvirt/virterror.h  |    1 +
 src/libvirt.c                |    4 ++++
 src/libvirt_private.syms     |    1 +
 src/qemu/qemu_driver.c       |    3 ++-
 src/qemu/qemu_migration.c    |   39 +++++++++++++++++++++++++++++++++++----
 src/qemu/qemu_migration.h    |    6 ++++--
 src/util/storage_file.c      |   10 ++++++++++
 src/util/storage_file.h      |    1 +
 src/util/virterror.c         |    6 ++++++
 tools/virsh.c                |    4 ++++
 tools/virsh.pod              |   10 +++++++++-
 12 files changed, 78 insertions(+), 9 deletions(-)


More information about the libvir-list mailing list