Re: [libvirt] [PATCH v2 02/22] qemu: Introduce qemuBlockJobUpdate

2015-06-10 Thread Jiri Denemark
On Wed, Jun 10, 2015 at 07:21:27 -0400, John Ferlan wrote: On 06/02/2015 08:34 AM, Jiri Denemark wrote: The wrapper is useful for calling qemuBlockJobEventProcess with the event details stored in disk's privateData, which is the most likely usage of qemuBlockJobEventProcess.

[libvirt] [sandbox PATCH 0/3] Disk support for libvirt-sandbox

2015-06-10 Thread Eren Yagdiran
Hello, These patches provide disk support for libvirt-sandbox. Implemented '--disk' parameter will be useful when integrating Docker image support for libvirt-sandbox. Currently, we only support qcow2 file format and fallback is set to RAW type. Eren Yagdiran (3): Add an utility function for

[libvirt] [sandbox PATCH 1/3] Add an utility function for guessing filetype from file extension

2015-06-10 Thread Eren Yagdiran
Consider the file name extension as the image type, except for .img that are usually RAW images --- libvirt-sandbox/Makefile.am| 1 + libvirt-sandbox/libvirt-sandbox-util.c | 79 ++ libvirt-sandbox/libvirt-sandbox-util.h | 6 +++ 3 files changed, 86

[libvirt] [sandbox PATCH 2/3] Add configuration object for disk support

2015-06-10 Thread Eren Yagdiran
Add the config gobject, functions to store and load the new configuration fragments and test. This will allow creating sandboxes with attached disk with a parameter formatted like file:hda=/source/file.qcow2,format=qcow2 --- libvirt-sandbox/Makefile.am | 2 +

Re: [libvirt] [PATCH v2 02/22] qemu: Introduce qemuBlockJobUpdate

2015-06-10 Thread John Ferlan
On 06/02/2015 08:34 AM, Jiri Denemark wrote: The wrapper is useful for calling qemuBlockJobEventProcess with the event details stored in disk's privateData, which is the most likely usage of qemuBlockJobEventProcess. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes:

[libvirt] [sandbox PATCH 3/3] Add disk parameter to virt-sandbox

2015-06-10 Thread Eren Yagdiran
Allow users to add disk images to their sandbox. Only disk images are supported so far, but the parameter is intentionally designed for future changes. --- bin/virt-sandbox.c | 37 ++ .../libvirt-sandbox-builder-container.c| 36

Re: [libvirt] [PATCH v2 22/22] qemu: cancel drive mirrors when p2p connection breaks

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:27 +0200, Jiri Denemark wrote: When a connection to the destination host during a p2p migration drops, we know we will have to cancel the migration; it doesn't make sense to waste resources by trying to finish the migration. We already do so after sending migrate

Re: [libvirt] [PATCH v2 02/22] qemu: Introduce qemuBlockJobUpdate

2015-06-10 Thread John Ferlan
On 06/10/2015 07:31 AM, Jiri Denemark wrote: On Wed, Jun 10, 2015 at 07:21:27 -0400, John Ferlan wrote: On 06/02/2015 08:34 AM, Jiri Denemark wrote: The wrapper is useful for calling qemuBlockJobEventProcess with the event details stored in disk's privateData, which is the most likely

[libvirt] [PATCH 1/4] parallels: change parallels prefixes to vz

2015-06-10 Thread Maxim Nestratov
This patch changes all parallels/vz driver structure and function prefixes from parallels to vz. No functional changes. Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/libvirt.c | 2 +- src/parallels/parallels_driver.c | 378

[libvirt] [PATCH 2/4] parallels: substitute parallels with vz in strings

2015-06-10 Thread Maxim Nestratov
Here we stop referencing vz driver by different names in error messages. 'parallels driver', 'Parallels Cloud Server', 'Parallels driver' all become just 'vz driver'. No functional changes. Only renaming and a bit of rewording. Signed-off-by: Maxim Nestratov mnestra...@parallels.com ---

[libvirt] [PATCH 4/4] parallels: substitute parallels with vz spec file and Makefile

2015-06-10 Thread Maxim Nestratov
Since we have changed the name of the driver to vz, let's reference it as vz everywhere. Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- configure.ac | 26 +- libvirt.spec.in | 10 +- mingw-libvirt.spec.in | 6 +++--- src/Makefile.am

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-10 Thread Daniel P. Berrange
On Wed, Jun 10, 2015 at 10:28:08AM +0100, Daniel P. Berrange wrote: On Wed, Jun 10, 2015 at 05:24:50PM +0800, zhang bo wrote: On 2015/6/10 16:39, Vasiliy Tolstov wrote: 2015-06-10 11:37 GMT+03:00 Daniel P. Berrange berra...@redhat.com: The udev rules are really something the OS vendor

Re: [libvirt] [libvirt-php][PATCH 00/10] Couple of PHP fixes

2015-06-10 Thread Vasiliy Tolstov
2015-06-10 12:23 GMT+03:00 Michal Privoznik mpriv...@redhat.com: Ping? No php knowledge is required to review these patches. They are merely Makefile and configure.ac cleanups. Michal Michal Novotny says that he busy now and you can accept/review my patches.. i think in this case - you can

Re: [libvirt] [PATCH v2 14/22] qemu: Refactor qemuMigrationUpdateJobStatus

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:19 +0200, Jiri Denemark wrote: Once we start waiting for migration events instead of polling query-migrate, priv-job.current will not be regularly updated anymore because we will get the current status directly from the events. Thus virDomainGetJob{Info,Stats}

Re: [libvirt] [PATCH v2 07/22] qemu: Make qemuMigrationCancelDriveMirror usable without async job

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:12 +0200, Jiri Denemark wrote: We don't have an async job when reconnecting to existing domains after libvirtd restart. Signed-off-by: Jiri Denemark jdene...@redhat.com --- ACK, Peter signature.asc Description: Digital signature -- libvir-list mailing list

[libvirt] [PATCH 3/4] parallels: rename all parallels files and driver directory to vz

2015-06-10 Thread Maxim Nestratov
This patch moves all src/parallels/parallels* files to vz/vz* and fixes build accordingly. No functional changes. Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- po/POTFILES.in | 12 src/Makefile.am| 32

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-10 Thread Daniel P. Berrange
On Wed, Jun 10, 2015 at 02:05:16PM +0800, zhang bo wrote: On 2015/6/10 13:40, Vasiliy Tolstov wrote: 2015-06-10 5:28 GMT+03:00 zhang bo oscar.zhan...@huawei.com: Thank you for your reply. Before this patch, we needed to manually online memory blocks inside the guest, after dimm memory

Re: [libvirt] [PATCH v2 13/22] qemu: Refactor qemuDomainGetJob{Info, Stats}

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:18 +0200, Jiri Denemark wrote: Move common parts of qemuDomainGetJobInfo and qemuDomainGetJobStats into a separate API (qemuDomainGetJobStatsInternal). Signed-off-by: Jiri Denemark jdene...@redhat.com --- ACK, Peter signature.asc Description: Digital

Re: [libvirt] [PATCH] add some more missing libvirt functions

2015-06-10 Thread Michal Privoznik
On 10.06.2015 10:18, Vasiliy Tolstov wrote: * libvirt_connect_get_all_domain_stats * libvirt_domain_block_resize * libvirt_domain_block_job_abort * libvirt_domain_block_job_set_speed Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- src/libvirt-php.c | 177

Re: [libvirt] [sandbox PATCH 0/3] Disk support for libvirt-sandbox

2015-06-10 Thread Cedric Bosdonnat
On Wed, 2015-06-10 at 13:06 +0100, Daniel P. Berrange wrote: On Wed, Jun 10, 2015 at 01:40:07PM +0200, Eren Yagdiran wrote: Hello, These patches provide disk support for libvirt-sandbox. Implemented '--disk' parameter will be useful when integrating Docker image support for

Re: [libvirt] [PATCH v2 04/22] qemu: Use domain condition for synchronous block jobs

2015-06-10 Thread John Ferlan
On 06/02/2015 08:34 AM, Jiri Denemark wrote: By switching block jobs to use domain conditions, we can drop some pretty complicated code in NBD storage migration. Moreover, we are getting ready for migration events (to replace our 50ms polling on query-migrate). The ultimate goal is to have a

Re: [libvirt] [PATCH v2 21/22] qemu: Wait for migration events on domain condition

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:26 +0200, Jiri Denemark wrote: Since we already support the MIGRATION event, we just need to make sure the domain condition is signalled whenever a p2p connection drops or the domain is paused due to IO error and we can avoid waking up every 50 ms to check whether

Re: [libvirt] [PATCH v2 19/22] qemu: Work around weired migration status changes

2015-06-10 Thread Jiri Denemark
On Wed, Jun 10, 2015 at 13:06:03 +0200, Peter Krempa wrote: On Tue, Jun 02, 2015 at 14:34:24 +0200, Jiri Denemark wrote: When cancelling migration we can see the following conversation on QMP monitor: {execute:migrate_cancel,id:libvirt-33} {timestamp: {seconds: 1432899178,

Re: [libvirt] [PATCH] virNumaSetPagePoolSize: Produce friendlier error message

2015-06-10 Thread Martin Kletzander
On Wed, Jun 10, 2015 at 11:16:38AM +0200, Michal Privoznik wrote: On 09.06.2015 08:42, Martin Kletzander wrote: On Mon, Jun 08, 2015 at 02:41:05PM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1224587 The function takes two important arguments (among many others):

Re: [libvirt] [sandbox PATCH 0/3] Disk support for libvirt-sandbox

2015-06-10 Thread Daniel P. Berrange
On Wed, Jun 10, 2015 at 01:40:07PM +0200, Eren Yagdiran wrote: Hello, These patches provide disk support for libvirt-sandbox. Implemented '--disk' parameter will be useful when integrating Docker image support for libvirt-sandbox. Currently, we only support qcow2 file format and fallback

Re: [libvirt] [PATCH v2 19/22] qemu: Work around weired migration status changes

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:24 +0200, Jiri Denemark wrote: When cancelling migration we can see the following conversation on QMP monitor: {execute:migrate_cancel,id:libvirt-33} {timestamp: {seconds: 1432899178, microseconds: 844907}, event: MIGRATION, data: {status: cancelling}}

Re: [libvirt] [PATCH v2 20/22] qemuDomainGetJobStatsInternal: Support migration events

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:25 +0200, Jiri Denemark wrote: When QEMU supports migration events qemuDomainJobInfo structure is no longer updated with migration statistics. We have to enter a job and explicitly ask QEMU every time virDomainGetJob{Info,Stats} is called. Signed-off-by: Jiri

Re: [libvirt] [PATCH v2 18/22] qemu: Update migration state according to MIGRATION event

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:23 +0200, Jiri Denemark wrote: We don't need to call query-migrate every 50ms when we get the current migration state via MIGRATION event. Signed-off-by: Jiri Denemark jdene...@redhat.com --- ACK, Peter signature.asc Description: Digital signature --

Re: [libvirt] [PATCH v2 04/22] qemu: Use domain condition for synchronous block jobs

2015-06-10 Thread Jiri Denemark
On Wed, Jun 10, 2015 at 07:56:32 -0400, John Ferlan wrote: On 06/02/2015 08:34 AM, Jiri Denemark wrote: By switching block jobs to use domain conditions, we can drop some pretty complicated code in NBD storage migration. Moreover, we are getting ready for migration events (to replace

[libvirt] [PATCH 0/4] parallels: rename parallels to vz

2015-06-10 Thread Maxim Nestratov
This change is made in the scope of 'Parallel Cloud Server' pruduct renaming to 'Virtuozzo' to prevent future confusion and make things actual. Previously we introduced a new driver name 'vz' as a synonym to 'parallels'. This patch set finalizes major part of renaming process. Though uri

Re: [libvirt] [PATCH v2 11/22] qemu_monitor: Wire up SPICE_MIGRATE_COMPLETED event

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:16 +0200, Jiri Denemark wrote: Signed-off-by: Jiri Denemark jdene...@redhat.com --- ACK, Peter signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-10 Thread Vasiliy Tolstov
2015-06-10 11:37 GMT+03:00 Daniel P. Berrange berra...@redhat.com: The udev rules are really something the OS vendor should setup, so that it just works I think so, also for vcpu hotplug this also covered by udev. May be we need something to hot remove memory and cpu, because in guest we need

Re: [libvirt] [PATCH v2 09/22] qemu: Cancel disk mirrors after libvirtd restart

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:14 +0200, Jiri Denemark wrote: When libvirtd is restarted during migration, we properly cancel the ongoing migration (unless it managed to almost finished before the restart). But if we were also migrating storage using NBD, we would completely forget about the

Re: [libvirt] [PATCH v2 15/22] qemu: Don't pass redundant job name around

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:20 +0200, Jiri Denemark wrote: Instead of passing current job name to several functions which already know what the current job is we can generate the name where we actually need to use it. Signed-off-by: Jiri Denemark jdene...@redhat.com --- ACK, Peter

Re: [libvirt] [PATCH v2 10/22] qemu: Use domain condition for asyncAbort

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:15 +0200, Jiri Denemark wrote: To avoid polling for asyncAbort flag changes. Signed-off-by: Jiri Denemark jdene...@redhat.com --- ACK, Peter signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-10 Thread zhang bo
On 2015/6/10 16:39, Vasiliy Tolstov wrote: 2015-06-10 11:37 GMT+03:00 Daniel P. Berrange berra...@redhat.com: The udev rules are really something the OS vendor should setup, so that it just works I think so, also for vcpu hotplug this also covered by udev. May be we need something to hot

Re: [libvirt] [PATCH v1] update snapshot api

2015-06-10 Thread Michal Privoznik
On 07.05.2015 16:21, Vasiliy Tolstov wrote: * add constants from libvirt to snapshots api * add flags to snapshot functions Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- src/libvirt-php.c | 87 ++- 1 file changed, 61

Re: [libvirt] [PATCH v2 17/22] qemu_monitor: Wire up MIGRATION event

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:22 +0200, Jiri Denemark wrote: Thanks to Juan's work QEMU finally emits an event whenever migration state changes. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: The MIGRATION event is not supported by QEMU yet, this patch is based on

[libvirt] [PATCH] add some more missing libvirt functions

2015-06-10 Thread Vasiliy Tolstov
* libvirt_connect_get_all_domain_stats * libvirt_domain_block_resize * libvirt_domain_block_job_abort * libvirt_domain_block_job_set_speed Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- src/libvirt-php.c | 177 +- src/libvirt-php.h |

Re: [libvirt] [PATCH v2 12/22] qemu: Do not poll for spice migration status

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:17 +0200, Jiri Denemark wrote: QEMU_CAPS_SEAMLESS_MIGRATION capability says QEMU supports SPICE_MIGRATE_COMPLETED event. Thus we can just drop all code which polls query-spice and replace it with waiting for the event. Signed-off-by: Jiri Denemark

Re: [libvirt] computing the correct rom for seabios to recognize SR-IOV

2015-06-10 Thread Ido Barkan
Thanks Laine. I was told by ghoff...@redhat.com [cc'ed] that: ipxe-roms-qemu.rpm carries only the roms for the hardware emulated by qemu, and qemu has a rpm dependency on it so this is installed on every virt host. ipxe-roms.rpm has everything else, but isn't installed by default. And that

Re: [libvirt] [PATCH v2 16/22] qemu: Refactor qemuMigrationWaitForCompletion

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:21 +0200, Jiri Denemark wrote: Checking status of all part of migration and aborting it when something failed is a complex thing which makes the waiting loop hard to read. This patch moves all the checks into a separate function similarly to what was done for

Re: [libvirt] [PATCH v2 08/22] qemu: Refactor qemuMonitorBlockJobInfo

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:13 +0200, Jiri Denemark wrote: query-block-jobs QMP command returns all running block jobs at once, while qemuMonitorBlockJobInfo would only report one. This is not very nice in case we need to check several block jobs. This patch refactors the monitor code to

Re: [libvirt] [PATCH] virNumaSetPagePoolSize: Produce friendlier error message

2015-06-10 Thread Michal Privoznik
On 09.06.2015 08:42, Martin Kletzander wrote: On Mon, Jun 08, 2015 at 02:41:05PM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1224587 The function takes two important arguments (among many others): @node and @page_size. From these two a path under /sys is

Re: [libvirt] [libvirt-php][PATCH 00/10] Couple of PHP fixes

2015-06-10 Thread Michal Privoznik
On 05.05.2015 11:59, Michal Privoznik wrote: Even though this project is not actively developed, it does not mean we can't make some things better in it. After this patchset, distcheck works, targets are not built everytime, only when necessary, and so on. Michal Privoznik (10): Update

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-10 Thread Daniel P. Berrange
On Wed, Jun 10, 2015 at 05:24:50PM +0800, zhang bo wrote: On 2015/6/10 16:39, Vasiliy Tolstov wrote: 2015-06-10 11:37 GMT+03:00 Daniel P. Berrange berra...@redhat.com: The udev rules are really something the OS vendor should setup, so that it just works I think so, also for vcpu

Re: [libvirt] [PATCH] util: Fix coverity warings in virProcessGetAffinity

2015-06-10 Thread Peter Krempa
On Thu, Jun 04, 2015 at 08:34:00 -0400, John Ferlan wrote: On 06/04/2015 08:15 AM, Peter Krempa wrote: Refactor the code flow a bit more to clear coverity errors. Store the cpu count in an intermediate variable and reuse it rather than caluclating the index. ---

[libvirt] [PATCH v3 13/24] qemu_monitor: Wire up SPICE_MIGRATE_COMPLETED event

2015-06-10 Thread Jiri Denemark
Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in version 2 Version 3: - no change Version 2: - new patch src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 6 ++ src/qemu/qemu_monitor_json.c | 10 ++ 3

[libvirt] [PATCH v3 23/24] qemu: cancel drive mirrors when p2p connection breaks

2015-06-10 Thread Jiri Denemark
When a connection to the destination host during a p2p migration drops, we know we will have to cancel the migration; it doesn't make sense to waste resources by trying to finish the migration. We already do so after sending migrate command to QEMU and we should do it while waiting for drive

[libvirt] [PATCH v3 20/24] qemuDomainGetJobStatsInternal: Support migration events

2015-06-10 Thread Jiri Denemark
When QEMU supports migration events the qemuDomainJobInfo structure will no longer be updated with migration statistics. We have to enter a job and explicitly ask QEMU every time virDomainGetJob{Info,Stats} is called. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in

[libvirt] [PATCH v3 18/24] qemu: Refactor qemuMigrationWaitForCompletion

2015-06-10 Thread Jiri Denemark
Checking status of all part of migration and aborting it when something failed is a complex thing which makes the waiting loop hard to read. This patch moves all the checks into a separate function similarly to what was done for drive mirror loops. Signed-off-by: Jiri Denemark jdene...@redhat.com

[libvirt] [PATCH v3 16/24] qemu: Refactor qemuMigrationUpdateJobStatus

2015-06-10 Thread Jiri Denemark
Once we start waiting for migration events instead of polling query-migrate, priv-job.current will not be regularly updated anymore because we will get the current status directly from the events. Thus virDomainGetJob{Info,Stats} will have to query QEMU, but they can't just blindly update

Re: [libvirt] [RFC] libvirt support multi-thread compression for live migration

2015-06-10 Thread Jiri Denemark
On Fri, Jun 05, 2015 at 08:22:31 +0800, Qiao,Liyong wrote: On 2015年06月04日 20:09, Jiri Denemark wrote: On Tue, Jun 02, 2015 at 11:02:27 -0600, Eric Blake wrote: On 06/02/2015 07:56 AM, Qiao, Liyong wrote: Hi Eric Thanks for replying the mail, replied in lines.

Re: [libvirt] question about virConnectGetAllDomainStats and virTypedParameter

2015-06-10 Thread Michal Privoznik
On 10.06.2015 08:52, Vasiliy Tolstov wrote: I'm try to implement virConnectGetAllDomainStats for php binding api, but have one issue with VIR_TYPED_PARAM_STRING: code part: retval = virConnectGetAllDomainStats(conn-conn, stats, retstats, flags); for (i=0; i retval; i++) {

Re: [libvirt] [PATCH v3 02/24] qemu: Introduce qemuBlockJobUpdate

2015-06-10 Thread Peter Krempa
On Wed, Jun 10, 2015 at 15:42:36 +0200, Jiri Denemark wrote: The wrapper is useful for calling qemuBlockJobEventProcess with the event details stored in disk's privateData, which is the most likely usage of qemuBlockJobEventProcess. Signed-off-by: Jiri Denemark jdene...@redhat.com ---

Re: [libvirt] [PATCH v3 00/24] Add support for migration events

2015-06-10 Thread John Ferlan
On 06/10/2015 09:42 AM, Jiri Denemark wrote: QEMU will soon (patches are available on qemu-devel) get support for migration events which will finally allow us to get rid of polling query-migrate every 50ms. However, we first need to be able to wait for all events related to migration

Re: [libvirt] [sandbox PATCH 0/3] Disk support for libvirt-sandbox

2015-06-10 Thread Daniel P. Berrange
On Wed, Jun 10, 2015 at 03:13:15PM +0200, Cedric Bosdonnat wrote: On Wed, 2015-06-10 at 13:06 +0100, Daniel P. Berrange wrote: On Wed, Jun 10, 2015 at 01:40:07PM +0200, Eren Yagdiran wrote: Hello, These patches provide disk support for libvirt-sandbox. Implemented '--disk'

Re: [libvirt] Problem with setting up KVM guests to use HugePages

2015-06-10 Thread Michal Privoznik
On 10.06.2015 01:05, Vivi L wrote: Kashyap Chamarthy kchamart at redhat.com writes: You might want re-test by explicitly setting the 'page' element and 'size' attribute? From my test, I had something like this: $ virsh dumpxml f21-vm | grep hugepages -B3 -A2 memory

[libvirt] [PATCH v3 08/24] Pass domain object to private data formatter/parser

2015-06-10 Thread Jiri Denemark
So that they can format private data (e.g., disk private data) stored elsewhere in the domain object. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in version 2 Version 2, 3: - no changes src/conf/domain_conf.c | 4 ++-- src/conf/domain_conf.h | 6

[libvirt] [PATCH v3 02/24] qemu: Introduce qemuBlockJobUpdate

2015-06-10 Thread Jiri Denemark
The wrapper is useful for calling qemuBlockJobEventProcess with the event details stored in disk's privateData, which is the most likely usage of qemuBlockJobEventProcess. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in version 1 and 2 Version 3: - better

[libvirt] [PATCH v3 10/24] qemu: Refactor qemuMonitorBlockJobInfo

2015-06-10 Thread Jiri Denemark
query-block-jobs QMP command returns all running block jobs at once, while qemuMonitorBlockJobInfo would only report one. This is not very nice in case we need to check several block jobs. This patch refactors the monitor code to always parse all block jobs and store them in a hash.

[libvirt] [PATCH v3 03/24] qemu: Properly report failed migration

2015-06-10 Thread Jiri Denemark
Because we are polling we may detect some errors after we asked QEMU for migration status even though they occurred before. If this happens and QEMU reports migration completed successfully, we would happily report the migration succeeded even though we should have cancelled it because of the

[libvirt] [PATCH v3 04/24] qemu: Use domain condition for synchronous block jobs

2015-06-10 Thread Jiri Denemark
By switching block jobs to use domain conditions, we can drop some pretty complicated code in NBD storage migration. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: Version 3: - split into 3 patches Version 2: - slightly modified to use domain conditions

[libvirt] [PATCH v3 05/24] qemu: Cancel storage migration in parallel

2015-06-10 Thread Jiri Denemark
Instead of cancelling disk mirrors sequentially, let's just call block-job-cancel for all migrating disks and then wait until all disappear. In case we cancel disk mirrors at the end of successful migration we also need to check all block jobs completed successfully. Otherwise we have to abort

[libvirt] [PATCH v3 06/24] qemu: Abort migration early if disk mirror failed

2015-06-10 Thread Jiri Denemark
Abort migration as soon as we detect that some of the disk mirrors failed. There's no sense in trying to finish memory migration first. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: Version 3: - new patch (separated from qemu: Use domain condition for synchronous

[libvirt] [PATCH v3 11/24] qemu: Cancel disk mirrors after libvirtd restart

2015-06-10 Thread Jiri Denemark
When libvirtd is restarted during migration, we properly cancel the ongoing migration (unless it managed to almost finished before the restart). But if we were also migrating storage using NBD, we would completely forget about the running disk mirrors. Signed-off-by: Jiri Denemark

[libvirt] [PATCH v3 09/24] qemu: Make qemuMigrationCancelDriveMirror usable without async job

2015-06-10 Thread Jiri Denemark
We don't have an async job when reconnecting to existing domains after libvirtd restart. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in version 2 Version 2, 3: - no changes src/qemu/qemu_migration.c | 18 +++--- 1 file changed, 11

[libvirt] [PATCH v3 17/24] qemu: Don't pass redundant job name around

2015-06-10 Thread Jiri Denemark
Instead of passing current job name to several functions which already know what the current job is we can generate the name where we actually need to use it. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in version 2 Version 3: - no change Version

[libvirt] [PATCH v3 00/24] Add support for migration events

2015-06-10 Thread Jiri Denemark
QEMU will soon (patches are available on qemu-devel) get support for migration events which will finally allow us to get rid of polling query-migrate every 50ms. However, we first need to be able to wait for all events related to migration (migration status changes, block job events, async abort

[libvirt] [PATCH v3 14/24] qemu: Do not poll for spice migration status

2015-06-10 Thread Jiri Denemark
QEMU_CAPS_SEAMLESS_MIGRATION capability says QEMU supports SPICE_MIGRATE_COMPLETED event. Thus we can just drop all code which polls query-spice and replace it with waiting for the event. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in version 2 Version 3: -

[libvirt] [libvirt-php][PATCH] libvirt_connect_get_all_domain_stats: Add forgotten breaks

2015-06-10 Thread Michal Privoznik
Unfortunately, during review I haven't spotted the obvious. There's missing break in each switch() case which will definitely produce a segmentation fault as it causes strdup() to be called on non-string types too. Sorry for the noise. Signed-off-by: Michal Privoznik mpriv...@redhat.com ---

[libvirt] [PATCH v3 07/24] qemu: Don't mess with disk-mirrorState

2015-06-10 Thread Jiri Denemark
This patch reverts commit 76c61cdca20c106960af033e5d0f5da70177af0f. VIR_DOMAIN_DISK_MIRROR_STATE_ABORT says we asked for a block job to be aborted rather than saying it was aborted. Let's just use VIR_DOMAIN_DISK_MIRROR_STATE_NONE consistently whenever a block job finishes since no caller depends

[libvirt] [PATCH v3 22/24] qemu: Wait for migration events on domain condition

2015-06-10 Thread Jiri Denemark
Since we already support the MIGRATION event, we just need to make sure the domain condition is signalled whenever a p2p connection drops or the domain is paused due to IO error and we can avoid waking up every 50 ms to check whether something happened. Signed-off-by: Jiri Denemark

[libvirt] [PATCH v3 19/24] qemu_monitor: Wire up MIGRATION event

2015-06-10 Thread Jiri Denemark
Thanks to Juan's work QEMU finally emits an event whenever migration state changes. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: The MIGRATION event is not supported by QEMU yet, this patch is based on the current patches available on qemu-devel mailing list. However,

[libvirt] [PATCH] virt-xml-validate: Allow input to be read from stdin

2015-06-10 Thread Johannes Holmberg
--- Hello, I often find myself wanting to validate a domain xml without having to save it to a file, so I've updated virt-xml-validate to support the standard practice of reading from stdin when - is given as the input file. Of course, the validation is multipass so there still needs to be a

[libvirt] [PATCH v3 12/24] qemu: Use domain condition for asyncAbort

2015-06-10 Thread Jiri Denemark
To avoid polling for asyncAbort flag changes. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in version 2 Version 3: - no change Version 2: - rewritten using domain condition src/qemu/qemu_domain.c| 5 +++-- src/qemu/qemu_domain.h| 2

[libvirt] [PATCH v3 15/24] qemu: Refactor qemuDomainGetJob{Info, Stats}

2015-06-10 Thread Jiri Denemark
Move common parts of qemuDomainGetJobInfo and qemuDomainGetJobStats into a separate API (qemuDomainGetJobStatsInternal). Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in version 2 Version 3: - no change Version 2: - new patch

[libvirt] [PATCH v3 24/24] DO NOT APPLY: qemu: Work around weird migration status changes

2015-06-10 Thread Jiri Denemark
When cancelling migration we can see the following conversation on QMP monitor: {execute:migrate_cancel,id:libvirt-33} {timestamp: {seconds: 1432899178, microseconds: 844907}, event: MIGRATION, data: {status: cancelling}} {return: {}, id: libvirt-33} {timestamp: {seconds: 1432899178,

[libvirt] [PATCH v3 01/24] conf: Introduce per-domain condition variable

2015-06-10 Thread Jiri Denemark
Complex jobs, such as migration, need to monitor several events at once, which is impossible when each of the event uses its own condition variable. This patch adds a single condition variable to each domain object. This variable can be used instead of the other event specific conditions.

[libvirt] [PATCH v3 21/24] qemu: Update migration state according to MIGRATION event

2015-06-10 Thread Jiri Denemark
We don't need to call query-migrate every 50ms when we get the current migration state via MIGRATION event. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: ACKed in vesrion 2 Version 3: - no change Version 2: - new patch src/qemu/qemu_migration.c | 14

Re: [libvirt] [PATCH v3 06/24] qemu: Abort migration early if disk mirror failed

2015-06-10 Thread Peter Krempa
On Wed, Jun 10, 2015 at 15:42:40 +0200, Jiri Denemark wrote: Abort migration as soon as we detect that some of the disk mirrors failed. There's no sense in trying to finish memory migration first. Signed-off-by: Jiri Denemark jdene...@redhat.com --- Notes: Version 3: - new patch

[libvirt] [PATCH] qemu: fix cannot attach a virtio channel

2015-06-10 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1230039 When attach a channel which target type is virtio, we will get an error: error: Failed to attach device from channel-file.xml error: internal error: virtio serial device has invalid address type This issue was introduced in commit 9807c4. We

Re: [libvirt] [PATCH v3 05/24] qemu: Cancel storage migration in parallel

2015-06-10 Thread Peter Krempa
On Wed, Jun 10, 2015 at 15:42:39 +0200, Jiri Denemark wrote: Instead of cancelling disk mirrors sequentially, let's just call block-job-cancel for all migrating disks and then wait until all disappear. In case we cancel disk mirrors at the end of successful migration we also need to check

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-10 Thread zhang bo
On 2015/6/10 13:40, Vasiliy Tolstov wrote: 2015-06-10 5:28 GMT+03:00 zhang bo oscar.zhan...@huawei.com: Thank you for your reply. Before this patch, we needed to manually online memory blocks inside the guest, after dimm memory hotplug for most *nix OSes. (Windows guests automatically get

[libvirt] [PATCH] nodeinfo: fix to parse present cpus rather than possible cpus

2015-06-10 Thread Kothapally Madhu Pavan
Currently we are parsing all the possible cpus to get the nodeinfo. This fix will perform a check for present cpus before parsing. Signed-off-by: Kothapally Madhu Pavan k...@linux.vnet.ibm.com --- src/nodeinfo.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/nodeinfo.c

[libvirt] question about virConnectGetAllDomainStats and virTypedParameter

2015-06-10 Thread Vasiliy Tolstov
I'm try to implement virConnectGetAllDomainStats for php binding api, but have one issue with VIR_TYPED_PARAM_STRING: code part: retval = virConnectGetAllDomainStats(conn-conn, stats, retstats, flags); for (i=0; i retval; i++) { zval *arr2;

Re: [libvirt] [PATCH v2 05/22] qemu: Don't mess with disk-mirrorState

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:10 +0200, Jiri Denemark wrote: This patch reverts commit 76c61cdca20c106960af033e5d0f5da70177af0f. VIR_DOMAIN_DISK_MIRROR_STATE_ABORT says we asked for a block job to be aborted rather than saying it was aborted. Let's just use VIR_DOMAIN_DISK_MIRROR_STATE_NONE

[libvirt] [PATCH v2 0/1] qemu: monitor: Add memory balloon support for virtio-ccw

2015-06-10 Thread Boris Fiuczynski
v2: * corrected historic spelling error in comment * added return code checking of the first qemuMonitorJSONFindLinkPath call to prevent the second call of qemuMonitorJSONFindLinkPath on error bail out return code. A comment on this version: I find that even so this version is

Re: [libvirt] [PATCH v2 06/22] Pass domain object to private data formatter/parser

2015-06-10 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:11 +0200, Jiri Denemark wrote: So that they can format private data (e.g., disk private data) stored elsewhere in the domain object. Signed-off-by: Jiri Denemark jdene...@redhat.com --- ACK, Peter signature.asc Description: Digital signature -- libvir-list

[libvirt] [PATCH v2 1/1] qemu: monitor: Add memory balloon support for virtio-ccw

2015-06-10 Thread Boris Fiuczynski
The search for the memory balloon driver object is extended by a second known name virtio-balloon-ccw in support for virtio-ccw. Signed-off-by: Boris Fiuczynski fiu...@linux.vnet.ibm.com Reviewed-by: Daniel Hansel daniel.han...@linux.vnet.ibm.com Reviewed-by: Eric Farman far...@linux.vnet.ibm.com

Re: [libvirt] [PATCH] util: Fix coverity warings in virProcessGetAffinity

2015-06-10 Thread John Ferlan
On 06/10/2015 09:41 AM, Peter Krempa wrote: On Thu, Jun 04, 2015 at 08:34:00 -0400, John Ferlan wrote: On 06/04/2015 08:15 AM, Peter Krempa wrote: Refactor the code flow a bit more to clear coverity errors. Store the cpu count in an intermediate variable and reuse it rather than

Re: [libvirt] [PATCHv2] qemu: add a check for slot and base when build dimm address

2015-06-10 Thread John Ferlan
On 05/27/2015 05:50 AM, Luyao Huang wrote: When hot-plug a memory device, we don't check if there is a memory device have the same address with the memory device we want hot-pluged. Qemu forbid use/hot-plug 2 memory device with same slot or the same base(qemu side this elemnt named addr).

Re: [libvirt] [PATCH v2 0/2] lxc: properly clean up qemu-nbd

2015-06-10 Thread John Ferlan
On 06/01/2015 09:01 AM, Cédric Bosdonnat wrote: Hi all, Here is the very same patch, but split in two patches. Well, I also moved two comments around between v1 and v2. Cédric Bosdonnat (2): Add virProcessGetPids to get all tasks of a process lxc: properly clean up qemu-nbd

Re: [libvirt] Canging bridge names on live migration

2015-06-10 Thread Philipp Hahn
Hello, On 03.06.2015 13:18, seitan wrote: i wonder, if there's a possibility to change a name of a shared interface in virtual machine config, while doing migration. The problem is: hypervisor1 (source) uses shared interface name br0. hypervisor2 (target) uses shared interface name br500.

Re: [libvirt] Canging bridge names on live migration

2015-06-10 Thread Laine Stump
On 06/10/2015 02:06 PM, Philipp Hahn wrote: Hello, On 03.06.2015 13:18, seitan wrote: i wonder, if there's a possibility to change a name of a shared interface in virtual machine config, while doing migration. The problem is: hypervisor1 (source) uses shared interface name br0.

Re: [libvirt] [PATCH] network: add an option to make dns public

2015-06-10 Thread John Ferlan
On 06/01/2015 07:54 AM, Cédric Bosdonnat wrote: In some use cases we don't want the virtual network's DNS to only listen to the vnet interface. Adding a publiclyAccessible attribute to the dns element in the configuration allows the DNS to listen to all interfaces. It simply disables the

Re: [libvirt] [PATCH] maint: document use of zanata for translations

2015-06-10 Thread John Ferlan
On 05/27/2015 10:43 AM, Eric Blake wrote: Based on recent list questions on how to contribute a translation fix. Signed-off-by: Eric Blake ebl...@redhat.com --- Should be safe for freeze, but as I have never contributed a translation fix, I'll wait for review. HACKING |

Re: [libvirt] [PATCH] maint: document use of zanata for translations

2015-06-10 Thread Eric Blake
On 06/10/2015 02:44 PM, John Ferlan wrote: On 05/27/2015 10:43 AM, Eric Blake wrote: Based on recent list questions on how to contribute a translation fix. Signed-off-by: Eric Blake ebl...@redhat.com --- Should be safe for freeze, but as I have never contributed a translation fix, I'll

Re: [libvirt] Problem with setting up KVM guests to use HugePages

2015-06-10 Thread Vivi L
Michal Privoznik mprivozn at redhat.com writes: On 10.06.2015 01:05, Vivi L wrote: Kashyap Chamarthy kchamart at redhat.com writes: You might want re-test by explicitly setting the 'page' element and 'size' attribute? From my test, I had something like this: $ virsh dumpxml

Re: [libvirt] [PATCH] util: Fix coverity warings in virProcessGetAffinity

2015-06-10 Thread Eric Blake
On 06/10/2015 09:27 AM, John Ferlan wrote: So there are basically three options: 1) Silence the coverity warning So on line just prior to CPU_ISSET_S either: sa_assert(sizeof(unsigned long int) == sizeof(cpu_set_t)); Is that true even on 32-bit platforms? or /*

  1   2   >