From 3412595a3506514d6a4f5da7877d93a273be30b5 Mon Sep 17 00:00:00 2001 From: "zhu.boxiang" Date: Tue, 9 Apr 2019 10:11:45 +0800 Subject: [PATCH] Cleanup migrate flags From the libvirt doc, you can get all the flags of domain migrate. The link is here. https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainMigrateFlags Here we just removed the non-used flags and added the used flags but not listed in migrate description. Removed flags: VIR_MIGRATE_PAUSED VIR_MIGRATE_NON_SHARED_DISK VIR_MIGRATE_CHANGE_PROTECTION VIR_MIGRATE_UNSAFE VIR_MIGRATE_OFFLINE Added flags: VIR_MIGRATE_AUTO_CONVERGE VIR_MIGRATE_POSTCOPY Change-Id: I6a9615b636b3394a65ac4c972199c068fda6de14 --- nova/virt/libvirt/guest.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/nova/virt/libvirt/guest.py b/nova/virt/libvirt/guest.py index 80380e0af54e..f938a7cd8b13 100644 --- a/nova/virt/libvirt/guest.py +++ b/nova/virt/libvirt/guest.py @@ -625,21 +625,14 @@ class Guest(object): VIR_MIGRATE_UNDEFINE_SOURCE If the migration is successful, undefine the domain on the source host. - VIR_MIGRATE_PAUSED Leave the domain suspended on the remote - side. - VIR_MIGRATE_NON_SHARED_DISK Migration with non-shared - storage with full disk copy VIR_MIGRATE_NON_SHARED_INC Migration with non-shared storage with incremental disk copy - VIR_MIGRATE_CHANGE_PROTECTION Protect against domain - configuration changes during - the migration process (set - automatically when - supported). - VIR_MIGRATE_UNSAFE Force migration even if it is considered - unsafe. - VIR_MIGRATE_OFFLINE Migrate offline + VIR_MIGRATE_AUTO_CONVERGE Slow down domain to make sure it does + not change its memory faster than a + hypervisor can transfer the changed + memory to the destination host + VIR_MIGRATE_POSTCOPY Tell libvirt to enable post-copy migration VIR_MIGRATE_TLS Use QEMU-native TLS :param bandwidth: The maximum bandwidth in MiB/s """