If user wants to migrate a machine, it's all or nothing. Either he/she
has all storage accessible under same paths, or migration will fail.
But there are some cases, where allowing migration to drop some disks,
may be useful. E.g. when host gets itself to a state where domains need
to be migrated so host can be say rebooted. Therefore we might want to
give user possibility to mark some cdroms/floppy as optional, meaning
if destination cannot access them, they get ejected (on destination).
This idea is implemented via <migration> element, which basically says
what to do with (currently) disk on migration. Right now it contains
only one attribute 'optional' accepting values 'yes' and 'no'.
Then, if destination cannot access a path and corresponding disk
is mared as:
a) optional - it is ejected (source is free()'d)
b) non-optional - migration simply fails.
The default is understandably non-optional to all disks.
NB, setting optional is supported only on cdrom & floppy.
Michal Privoznik (2):
migration: Introduce <migration> element for cdrom and floppy
qemu: Implement migration optional disk
docs/schemas/domaincommon.rng | 16 ++++++++
src/conf/domain_conf.c | 85 ++++++++++++++++++++++++++++++++++++++++-
src/conf/domain_conf.h | 16 ++++++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_migration.c | 47 +++++++++++++++++++++-
5 files changed, 163 insertions(+), 3 deletions(-)
--
1.7.3.4