
On Thu, Oct 11, 2012 at 10:43:14AM +0800, li guang wrote:
在 2012-10-10三的 14:38 +0100,Daniel P. Berrange写道:
On Tue, Sep 25, 2012 at 03:45:24PM +0800, liguang wrote:
original migration did not aware of offline case, so, try to support offline migration quietly (did not disturb original migration) by pass VIR_MIGRATE_OFFLINE flag to migration APIs if only the domain is really inactive, and migration process will not puzzled by domain offline and exit unexpectedly. these changes did not take care of disk images the domain required, for them could be transferred by other APIs as suggested, then VIR_MIGRATE_OFFLINE should not combined with VIR_MIGRATE_NON_SHARED_*. so, this migration result is just make domain definition alive at target side.
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> --- include/libvirt/libvirt.h.in | 1 + src/qemu/qemu_driver.c | 15 ++++++++++++ src/qemu/qemu_migration.c | 53 ++++++++++++++++++++++++++++++++++++----- src/qemu/qemu_migration.h | 3 +- tools/virsh-domain.c | 6 ++++ 5 files changed, 70 insertions(+), 8 deletions(-)
In my testing this patch is still badly broken, apparently no different than the previous version I tested
I have 2 hosts, avocado & mustard and stopped guest vm1. I try to migrate the VM from avocado to mustard thus:
# ./tools/virsh -c qemu+ssh://root@avocado/system migrate --undefinesource --offline vm1 qemu+ssh://root@mustard/system
This should *not* even run because I did not pass the --persistent flag, but it does in fact complete. I creates a guest 'vm1' on the target host, but does not write out any config. This is a completely bogus scenario. If a guest has no config, it is transient and thus must not exist if it is shutoff, but your patch is resulting in a transient, shutoff guest.
If I set the '--persistent' flag, there is no diffrence in behaviour. We still get a transient shutoff guest on the target.
pretty logical requirement, actually, you've got it located at for example /var/run/libvirt/qemu/dom.xml, and it's really persistent.
No, there should not be any file created in /var/run/libvirt/qemu/dom.xml That directory is *only* for XML of guests which are *running*. Dainel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|