Re: [libvirt] [PATCH 00/11] Post-Copy Live Migration Support

2014-12-04 Thread Cristian KLEIN
On 2014-12-04 10:40, Laine Stump wrote: On 12/01/2014 10:59 AM, Cristian Klein wrote: Qemu currently implements pre-copy live migration. VM memory pages are first copied from the source hypervisor to the destination, potentially multiple times as pages get dirtied during transfer, then VCPU

Re: [libvirt] [PATCH 11/11] Revert Do not allow changing the UUID of a nwfilter

2014-12-02 Thread Cristian KLEIN
On 2014-12-02 17:03, Jiri Denemark wrote: On Mon, Dec 01, 2014 at 17:00:03 +0100, Cristian Klein wrote: This reverts commit 46a811db0731cedaea0153fc223faa6096cee5b5. It causes random problems in OpenStack, which displays the following error: error : virNWFilterObjAssignDef:3075 : operation

[libvirt] [PATCH 08/11] qemu: retrieve dirty sync count

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 4 src/qemu/qemu_monitor_text.c | 1 + tests/qemumonitorjsontest.c | 1 + 4 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_monitor.h b/src/qemu

[libvirt] [PATCH 05/11] qemu: implement virDomainMigrateStartPostCopy

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_driver.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 06803b4..fc7de23 100644 --- a/src/qemu/qemu_driver.c +++ b

[libvirt] [PATCH 00/11] Post-Copy Live Migration Support

2014-12-01 Thread Cristian Klein
both low- and high-level interface to virsh - Tested with OpenStack Icehouse Cristian Klein (11): Added public API for post-copy migration qemu: added low-level post-copy migration functions qemu: implemented VIR_MIGRATE_ENABLE_POSTCOPY qemu: implemented post-copy migration logic qemu

[libvirt] [PATCH 04/11] qemu: implemented post-copy migration logic

2014-12-01 Thread Cristian Klein
Perform phase stops once migration switched to post-copy. Confirm phase waits for post-copy to finish before killing the VM. Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_driver.c| 8 src/qemu/qemu_migration.c | 46

[libvirt] [PATCH 01/11] Added public API for post-copy migration

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- include/libvirt/libvirt-domain.h | 5 +++ src/driver-hypervisor.h | 5 +++ src/libvirt-domain.c | 92 src/libvirt_public.syms | 1 + src/remote/remote_driver.c

[libvirt] [PATCH 07/11] virsh: added --postcopy-after to migrate command

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- tools/virsh-domain.c | 60 ++-- tools/virsh.pod | 5 + 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 1753f6e

[libvirt] [PATCH 06/11] virsh: added --enable-postcopy and migrate-start-postcopy

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- tools/virsh-domain.c | 50 ++ tools/virsh.pod | 11 +++ 2 files changed, 61 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 750411b..1753f6e 100644

[libvirt] [PATCH 09/11] qemu: implemented VIR_MIGRATE_POSTCOPY_AFTER_PRECOPY

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_driver.c| 2 ++ src/qemu/qemu_migration.c | 49 +++ src/qemu/qemu_migration.h | 3 ++- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c b

[libvirt] [PATCH 03/11] qemu: implemented VIR_MIGRATE_ENABLE_POSTCOPY

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_migration.c | 82 +++ src/qemu/qemu_migration.h | 3 +- 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt] [PATCH 02/11] qemu: added low-level post-copy migration functions

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_monitor.c | 24 ++-- src/qemu/qemu_monitor.h | 4 src/qemu/qemu_monitor_json.c | 23 ++- src/qemu/qemu_monitor_json.h | 1 + 4 files changed, 49 insertions(+), 3

[libvirt] [PATCH 10/11] virsh: added --postcopy-after-precopy to migrate

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- tools/virsh-domain.c | 6 ++ tools/virsh.pod | 5 + 2 files changed, 11 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 52e91d9..c453dc4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

[libvirt] [PATCH 11/11] Revert Do not allow changing the UUID of a nwfilter

2014-12-01 Thread Cristian Klein
Special thanks to Vojtech Cima for investigating. Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/conf/nwfilter_conf.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 074d745..7abeff8 100644 --- a/src/conf

Re: [libvirt] [PATCH v2 1/8] Added public API to enable post-copy migration

2014-11-05 Thread Cristian Klein
On 01 Oct 2014, at 12:07 , Jiri Denemark jdene...@redhat.com wrote: On Wed, Oct 01, 2014 at 10:45:33 +0200, Cristian KLEIN wrote: On 2014-09-30 17:16, Daniel P. Berrange wrote: On Tue, Sep 30, 2014 at 05:11:03PM +0200, Jiri Denemark wrote: On Tue, Sep 30, 2014 at 16:39:22 +0200, Cristian

Re: [libvirt] [PATCH v2 8/8] virsh: add postcopy-after option to migrate command

2014-10-09 Thread Cristian Klein
On 07 Oct 2014, at 23:48 , Jiri Denemark jdene...@redhat.com wrote: On Tue, Sep 30, 2014 at 16:39:29 +0200, Cristian Klein wrote: Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- tools/virsh-domain.c | 72 ++-- tools/virsh.pod

Re: [libvirt] [PATCH v2 8/8] virsh: add postcopy-after option to migrate command

2014-10-09 Thread Cristian Klein
On 10 Oct 2014, at 5:59 , Jiri Denemark jdene...@redhat.com wrote: On Thu, Oct 09, 2014 at 16:22:54 +0900, Cristian Klein wrote: On 07 Oct 2014, at 23:48 , Jiri Denemark jdene...@redhat.com wrote: On Tue, Sep 30, 2014 at 16:39:29 +0200, Cristian Klein wrote: Signed-off-by: Cristian Klein

Re: [libvirt] [PATCH v2 5/8] Added job type VIR_DOMAIN_JOB_PHASE1_COMPLETED

2014-10-08 Thread Cristian Klein
On 07 Oct 2014, at 22:08 , Jiri Denemark jdene...@redhat.com wrote: On Tue, Sep 30, 2014 at 16:39:26 +0200, Cristian Klein wrote: Some jobs feature several phases. For example, post-copy migration is composed of a first phase, from migration start to switching to post-copy, and a second

Re: [libvirt] [PATCH v2 6/8] Implemented post-copy migration logic in qemu

2014-10-08 Thread Cristian Klein
On 07 Oct 2014, at 23:02 , Jiri Denemark jdene...@redhat.com wrote: On Tue, Sep 30, 2014 at 16:39:27 +0200, Cristian Klein wrote: Perform phase stops once migration switched to post-copy. Confirm phase waits for post-copy to finish before killing the VM. Signed-off-by: Cristian Klein

Re: [libvirt] [PATCH v2 1/8] Added public API to enable post-copy migration

2014-10-01 Thread Cristian KLEIN
On 2014-09-30 17:16, Daniel P. Berrange wrote: On Tue, Sep 30, 2014 at 05:11:03PM +0200, Jiri Denemark wrote: On Tue, Sep 30, 2014 at 16:39:22 +0200, Cristian Klein wrote: Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- include/libvirt/libvirt.h.in | 1 + src/libvirt.c

[libvirt] [PATCH v2 2/8] Added public API to start post-copy migration

2014-09-30 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- include/libvirt/libvirt.h.in | 3 +++ src/driver.h | 5 + src/libvirt.c| 39 +++ src/libvirt_public.syms | 5 + src/remote/remote_driver.c | 1 + src

[libvirt] [PATCH v2 3/8] Added low-level API to qemu post-copy migration

2014-09-30 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- src/qemu/qemu_monitor.c | 24 ++-- src/qemu/qemu_monitor.h | 4 src/qemu/qemu_monitor_json.c | 23 ++- src/qemu/qemu_monitor_json.h | 1 + 4 files changed, 49 insertions(+), 3

[libvirt] [PATCH v2 0/8] Post-copy live migration support

2014-09-30 Thread Cristian Klein
. When called the first time it waits for post-copy to start, when called the second time it waits for post-copy to complete. I did so to reduce code duplication, but am not sure this is the best solution. Cristian Klein (8): Added public API to enable post-copy migration Added public API to start

[libvirt] [PATCH v2 4/8] Implemented VIR_MIGRATE_POSTCOPY in qemu driver

2014-09-30 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- src/qemu/qemu_migration.c | 60 +++ src/qemu/qemu_migration.h | 3 ++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt] [PATCH v2 6/8] Implemented post-copy migration logic in qemu

2014-09-30 Thread Cristian Klein
Perform phase stops once migration switched to post-copy. Confirm phase waits for post-copy to finish before killing the VM. Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- src/qemu/qemu_driver.c| 8 src/qemu/qemu_migration.c | 25 ++--- 2 files

[libvirt] [PATCH v2 5/8] Added job type VIR_DOMAIN_JOB_PHASE1_COMPLETED

2014-09-30 Thread Cristian Klein
. Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- include/libvirt/libvirt.h.in | 1 + tools/virsh-domain.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 84cd5a4..81044f0 100644 --- a/include

[libvirt] [PATCH v2 7/8] Implement virDomainMigrateStartPostCopy in qemu

2014-09-30 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- src/qemu/qemu_driver.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3fe2216..1242b77 100644 --- a/src/qemu/qemu_driver.c

[libvirt] [PATCH v2 1/8] Added public API to enable post-copy migration

2014-09-30 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- include/libvirt/libvirt.h.in | 1 + src/libvirt.c| 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 5217ab3..82f3aeb 100644 --- a/include/libvirt

[libvirt] [PATCH v2 8/8] virsh: add postcopy-after option to migrate command

2014-09-30 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- tools/virsh-domain.c | 72 ++-- tools/virsh.pod | 5 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 36a6d52

Re: [libvirt] [PATCH 2/6] Added public API to enable post-copy migration

2014-09-25 Thread Cristian KLEIN
On 2014-09-24 14:32, Jiri Denemark wrote: On Tue, Sep 23, 2014 at 16:09:57 +0200, Cristian Klein wrote: Added a new `libvirt` migration flag `VIR_MIGRATE_POSTCOPY` and the necessary code to pass this flag to qemu as migration capability. Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se

Re: [libvirt] [PATCH 4/6] Added domainMigrateStartPostCopy in qemu driver

2014-09-25 Thread Cristian KLEIN
On 2014-09-24 15:06, Jiri Denemark wrote: On Tue, Sep 23, 2014 at 16:09:59 +0200, Cristian Klein wrote: Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- src/qemu/qemu_driver.c | 44 src/qemu/qemu_monitor.c | 19

Re: [libvirt] [PATCH 6/6] virsh: added migrate --postcopy-after

2014-09-25 Thread Cristian KLEIN
On 2014-09-24 17:19, Jiri Denemark wrote: On Tue, Sep 23, 2014 at 16:10:01 +0200, Cristian Klein wrote: Added a new parameter to the `virsh migrate` command to switch to post-copy migration after a given timeout. Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- tools/virsh-domain.c

Re: [libvirt] [PATCH 2/6] Added public API to enable post-copy migration

2014-09-25 Thread Cristian KLEIN
On 2014-09-25 14:21, Jiri Denemark wrote: On Thu, Sep 25, 2014 at 11:42:16 +0200, Cristian KLEIN wrote: On 2014-09-24 14:32, Jiri Denemark wrote: On Tue, Sep 23, 2014 at 16:09:57 +0200, Cristian Klein wrote: Added a new `libvirt` migration flag `VIR_MIGRATE_POSTCOPY` and the necessary code

Re: [libvirt] [PATCH 4/6] Added domainMigrateStartPostCopy in qemu driver

2014-09-25 Thread Cristian KLEIN
On 2014-09-25 14:20, Daniel P. Berrange wrote: On Thu, Sep 25, 2014 at 02:12:24PM +0200, Jiri Denemark wrote: On Thu, Sep 25, 2014 at 12:00:41 +0200, Cristian KLEIN wrote: On 2014-09-24 15:06, Jiri Denemark wrote: This mostly looks good in isolation but I think this is not going to work. When

[libvirt] [PATCH 0/6] Post-copy live migration support

2014-09-23 Thread Cristian Klein
migration is activated by sending the `migrate-start-postcopy` command. Qemu acknowledges by setting migration status to `postcopy-active`. Cristian Klein (6): Added qemu postcopy-active migration status Added public API to enable post-copy migration Added new public API

[libvirt] [PATCH 2/6] Added public API to enable post-copy migration

2014-09-23 Thread Cristian Klein
Added a new `libvirt` migration flag `VIR_MIGRATE_POSTCOPY` and the necessary code to pass this flag to qemu as migration capability. Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- include/libvirt/libvirt.h.in | 1 + src/libvirt.c| 7 +++ src/qemu

[libvirt] [PATCH 5/6] Added domainMigrateStartPostCopy in remote driver

2014-09-23 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 12 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 75a3a7b..9a6a974 100644

[libvirt] [PATCH 3/6] Added new public API virDomainMigrateStartPostCopy

2014-09-23 Thread Cristian Klein
The user first start migration using the `VIR_MIGRATE_POSTCOPY` flag, then calls `virDomainMigrateStartPostCopy` asynchronously to switch from pre-copy to post-copy. Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- include/libvirt/libvirt.h.in | 2 ++ src/driver.h | 4

[libvirt] [PATCH 4/6] Added domainMigrateStartPostCopy in qemu driver

2014-09-23 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- src/qemu/qemu_driver.c | 44 src/qemu/qemu_monitor.c | 19 +++ src/qemu/qemu_monitor.h | 2 ++ src/qemu/qemu_monitor_json.c | 18 ++ src/qemu

[libvirt] [PATCH 1/6] Added qemu postcopy-active migration status

2014-09-23 Thread Cristian Klein
Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- src/qemu/qemu_migration.c| 1 + src/qemu/qemu_monitor.c | 2 +- src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 3 ++- src/qemu/qemu_monitor_text.c | 3 ++- 5 files changed, 7 insertions(+), 3 deletions

[libvirt] [PATCH 6/6] virsh: added migrate --postcopy-after

2014-09-23 Thread Cristian Klein
Added a new parameter to the `virsh migrate` command to switch to post-copy migration after a given timeout. Signed-off-by: Cristian Klein cristian.kl...@cs.umu.se --- tools/virsh-domain.c | 72 ++-- tools/virsh.pod | 5 2 files changed