Re: [libvirt] [PATCH] qemu: Fix QMP detection of QXL graphics

2012-10-08 Thread Martin Kletzander
On 10/09/2012 08:30 AM, Jiri Denemark wrote: > With the recent introduction of QMP capabilities probing, libvirt failed > to detect support for QXL graphics in QEMU 1.2 and newer. In addition to > fixing that, this patch also causes libvirt to detect QXL support for > qemu-kvm-0.13.0, which doesn't

Re: [libvirt] [PATCH] hooks: let virCommand do the error reporting

2012-10-08 Thread Martin Kletzander
On 10/09/2012 05:47 AM, Eric Blake wrote: > The code was reporting raw exit status without decoding it into > normal vs. signal exit. virCommandRun already does this, but > with a different error type, so all we have to do is recast > the error to the correct type. > Reported by li guang. > > * s

[libvirt] [PATCH] qemu: Fix QMP detection of QXL graphics

2012-10-08 Thread Jiri Denemark
With the recent introduction of QMP capabilities probing, libvirt failed to detect support for QXL graphics in QEMU 1.2 and newer. In addition to fixing that, this patch also causes libvirt to detect QXL support for qemu-kvm-0.13.0, which doesn't advertise it in -help output but mentions it in devi

Re: [libvirt] question about the commands: domhostname and hostname

2012-10-08 Thread Li Zhang
On Thu, Sep 13, 2012 at 3:18 PM, Guido Günther wrote: > On Wed, Sep 12, 2012 at 08:40:12AM +0200, Martin Kletzander wrote: >> On 09/12/2012 07:59 AM, Li Zhang wrote: >> > Sorry for wrong subject prefix of my mail, correct it. -:) >> > >> >> The [libvirt] tag in the prefix is done automatically, yo

Re: [libvirt] virsh blockcommit tests (w/ libvirt & qemu git)

2012-10-08 Thread Kashyap Chamarthy
On 10/09/2012 08:01 AM, Eric Blake wrote: > On 10/08/2012 03:54 AM, Kashyap Chamarthy wrote: > >> >> (3) (NEGATIVE-TEST) Try blockcommit to a base image which is a 'raw' device >> - Question: I assume the below is expected, right? We cannot do >> blockcommit into a >> NON-qcow2 base file? >

Re: [libvirt] [re-send][PATCH v9] support offline migration

2012-10-08 Thread li guang
ping ... 在 2012-10-08一的 09:20 +0800,li guang写道: > ping ... > > 在 2012-09-28五的 11:48 +0800,liguang写道: > > 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 AP

Re: [libvirt] [re-send][PATCH 1/3] add qemu driver hook

2012-10-08 Thread li guang
在 2012-10-08一的 21:54 -0600,Eric Blake写道: > On 10/08/2012 08:33 PM, li guang wrote: > > 在 2012-10-08一的 20:05 -0600,Eric Blake写道: > >> On 10/08/2012 07:51 PM, liguang wrote: > >>> this hook aimed at migration only, it supposed > >>> to be used as a helper of migrate --copy-storage-* > >>> features to

Re: [libvirt] [re-send][PATCH 1/3] add qemu driver hook

2012-10-08 Thread Eric Blake
On 10/08/2012 08:33 PM, li guang wrote: > 在 2012-10-08一的 20:05 -0600,Eric Blake写道: >> On 10/08/2012 07:51 PM, liguang wrote: >>> this hook aimed at migration only, it supposed >>> to be used as a helper of migrate --copy-storage-* >>> features to remove the unreasonable limitation >>> of pre-exist

[libvirt] [PATCH] hooks: let virCommand do the error reporting

2012-10-08 Thread Eric Blake
The code was reporting raw exit status without decoding it into normal vs. signal exit. virCommandRun already does this, but with a different error type, so all we have to do is recast the error to the correct type. Reported by li guang. * src/util/hooks.c (virHookCall): Simplify. --- In respons

Re: [libvirt] [re-send][PATCH 2/3] use WIFEXITED macro to see exit status of child

2012-10-08 Thread li guang
在 2012-10-08一的 21:05 -0600,Eric Blake写道: > On 10/08/2012 08:51 PM, li guang wrote: > > 在 2012-10-08一的 20:05 -0600,Eric Blake写道: > >> On 10/08/2012 07:51 PM, liguang wrote: > >>> this usage was suggested by man-page of waitpid, > >>> returns true if the child terminated normally > >> > >> NACK.

Re: [libvirt] [re-send][PATCH 2/3] use WIFEXITED macro to see exit status of child

2012-10-08 Thread Eric Blake
On 10/08/2012 08:51 PM, li guang wrote: > 在 2012-10-08一的 20:05 -0600,Eric Blake写道: >> On 10/08/2012 07:51 PM, liguang wrote: >>> this usage was suggested by man-page of waitpid, >>> returns true if the child terminated normally >> >> NACK. virCommandRun already did this for you. > > right, bu

Re: [libvirt] [PATCH] fix-up an implicit build dead-loop in cfg.mk

2012-10-08 Thread li guang
在 2012-10-08一的 20:13 -0600,Eric Blake写道: > On 09/28/2012 06:25 AM, Eric Blake wrote: > > On 09/27/2012 09:51 PM, liguang wrote: > >> if gnulib submodule happened to be dirty, build > >> process will fall into '_autogen' target trap > >> in cfg.mk recursively, so break this dead-loop. > > > > Yes,

Re: [libvirt] [re-send][PATCH 1/3] add qemu driver hook

2012-10-08 Thread li guang
在 2012-10-08一的 20:05 -0600,Eric Blake写道: > On 10/08/2012 07:51 PM, liguang wrote: > > this hook aimed at migration only, it supposed > > to be used as a helper of migrate --copy-storage-* > > features to remove the unreasonable limitation > > of pre-exist disk images at migration target. > > someon

Re: [libvirt] [re-send][PATCH 2/3] use WIFEXITED macro to see exit status of child

2012-10-08 Thread li guang
在 2012-10-08一的 20:05 -0600,Eric Blake写道: > On 10/08/2012 07:51 PM, liguang wrote: > > this usage was suggested by man-page of waitpid, > > returns true if the child terminated normally > > NACK. virCommandRun already did this for you. right, but not exactly, virCommandRun will leave raw exi

Re: [libvirt] [PATCH] esx: Fix dynamic dispatch for types with more than one level of inheritance

2012-10-08 Thread Eric Blake
On 10/06/2012 10:32 AM, Matthias Bolte wrote: > Traverse the whole inheritance hierarchy for dynamic dispatch as it is > already done for the dynamic cast. > > Also make AnyType cast errors more verbose. > > Reported by Ata Bohra. > --- > src/esx/esx_vi_generator.py | 36 ++

Re: [libvirt] virsh blockcommit tests (w/ libvirt & qemu git)

2012-10-08 Thread Eric Blake
On 10/08/2012 10:12 AM, Kashyap Chamarthy wrote: >> Question: >> At this point in time, I guess 'snapshot-revert' command is not uhelpful for >> any practical >> purposes while dealing with external snapshots,right? >> - To rephrase, is there a way(in future?), to use 'blockcommit'(or >> blo

Re: [libvirt] virsh blockcommit tests (w/ libvirt & qemu git)

2012-10-08 Thread Eric Blake
On 10/08/2012 03:54 AM, Kashyap Chamarthy wrote: > > (3) (NEGATIVE-TEST) Try blockcommit to a base image which is a 'raw' device > - Question: I assume the below is expected, right? We cannot do > blockcommit into a > NON-qcow2 base file? It should work. It may be that you have found a p

Re: [libvirt] [PATCH] fix-up an implicit build dead-loop in cfg.mk

2012-10-08 Thread Eric Blake
On 09/28/2012 06:25 AM, Eric Blake wrote: > On 09/27/2012 09:51 PM, liguang wrote: >> if gnulib submodule happened to be dirty, build >> process will fall into '_autogen' target trap >> in cfg.mk recursively, so break this dead-loop. > > Yes, I've run into this before; thanks for trying to tackle

Re: [libvirt] [re-send][PATCH 0/3] non-shared migration without target disk images

2012-10-08 Thread Eric Blake
On 10/08/2012 07:51 PM, liguang wrote: > by now, if you want a non-shared migration, you have > to create same files at target as source side, which > seems intorlerable! > > this issue was reported by Reinier Schoof > http://www.redhat.com/archives/libvir-list/2011-December/msg00451.html That's

Re: [libvirt] [re-send][PATCH 2/3] use WIFEXITED macro to see exit status of child

2012-10-08 Thread Eric Blake
On 10/08/2012 07:51 PM, liguang wrote: > this usage was suggested by man-page of waitpid, > returns true if the child terminated normally NACK. virCommandRun already did this for you. > > Signed-off-by: liguang > --- > src/util/hooks.c |2 +- > 1 files changed, 1 insertions(+), 1 dele

Re: [libvirt] [re-send][PATCH 1/3] add qemu driver hook

2012-10-08 Thread Eric Blake
On 10/08/2012 07:51 PM, liguang wrote: > this hook aimed at migration only, it supposed > to be used as a helper of migrate --copy-storage-* > features to remove the unreasonable limitation > of pre-exist disk images at migration target. > someone can add more functions to hook files. NACK. Inste

[libvirt] [re-send][PATCH 0/3] non-shared migration without target disk images

2012-10-08 Thread liguang
by now, if you want a non-shared migration, you have to create same files at target as source side, which seems intorlerable! this issue was reported by Reinier Schoof http://www.redhat.com/archives/libvir-list/2011-December/msg00451.html These patches try to let migrate --copy-storage-* work wit

[libvirt] [re-send][PATCH 2/3] use WIFEXITED macro to see exit status of child

2012-10-08 Thread liguang
this usage was suggested by man-page of waitpid, returns true if the child terminated normally Signed-off-by: liguang --- src/util/hooks.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/hooks.c b/src/util/hooks.c index f5890d2..55b98ca 100644 --- a/src/uti

[libvirt] [re-send][PATCH 3/3] install hook file

2012-10-08 Thread liguang
Signed-off-by: liguang --- src/Makefile.am |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 4ae741b..3c84bca 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,6 +49,9 @@ augeas_DATA = augeastestdir = $(datadir)/augeas/lens

[libvirt] [re-send][PATCH 1/3] add qemu driver hook

2012-10-08 Thread liguang
this hook aimed at migration only, it supposed to be used as a helper of migrate --copy-storage-* features to remove the unreasonable limitation of pre-exist disk images at migration target. someone can add more functions to hook files. Signed-off-by: liguang --- hooks/qemu | 55 ++

Re: [libvirt] [PATCH] virsh: add qemu-monitor-command --pretty

2012-10-08 Thread Eric Blake
On 10/08/2012 03:32 PM, Dave Allan wrote: > On Thu, Oct 04, 2012 at 05:22:20PM -0600, Eric Blake wrote: >> I was using qemu-monitor-command during development, and found it quite >> hard to use. Compare the results of this patch on ease of reading: >> >> Note that 'qemu-monitor-command dom --pret

Re: [libvirt] [PATCH] virsh: add qemu-monitor-command --pretty

2012-10-08 Thread Dave Allan
On Thu, Oct 04, 2012 at 05:22:20PM -0600, Eric Blake wrote: > I was using qemu-monitor-command during development, and found it quite > hard to use. Compare the results of this patch on ease of reading: > > $ virsh qemu-monitor-command dom '{"execute":"query-version"}' > {"return":{"qemu

Re: [libvirt] [PATCH v2 0/2] extend virGetUserID and virGetGroupID

2012-10-08 Thread Eric Blake
On 10/08/2012 02:37 PM, Marcelo Cerri wrote: > This patch series moves the logic for parsing users and groups in a > similar way to coreutils' chown from security_dac.c to util.c, as > suggested by Eric Blake. > > This change has two majors side effects: > > 1. Some error messages that were issu

[libvirt] [PATCH v2 2/2] security: update user and group parsing in security_dac.c

2012-10-08 Thread Marcelo Cerri
The functions virGetUserID and virGetGroupID are now able to parse user/group names and IDs in a similar way to coreutils' chown. So, user and group parsing in security_dac can be simplified. --- src/security/security_dac.c | 45 - 1 file changed, 8 inse

[libvirt] [PATCH v2 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Marcelo Cerri
This patch updates virGetUserID and virGetGroupID to be able to parse a user or group name in a similar way to coreutils' chown. This means that a numeric value with a leading plus sign is always parsed as an ID, otherwise the functions try to parse the input first as a user or group name and if th

[libvirt] [PATCH v2 0/2] extend virGetUserID and virGetGroupID

2012-10-08 Thread Marcelo Cerri
This patch series moves the logic for parsing users and groups in a similar way to coreutils' chown from security_dac.c to util.c, as suggested by Eric Blake. This change has two majors side effects: 1. Some error messages that were issued when security_dac.c tried to parse an ID as a name a

Re: [libvirt] Fwd: Failed to get host power management capabilities

2012-10-08 Thread Serge Hallyn
Quoting David Torres (d.tor...@ct.co.cr): > Hi all, > > My name is David Torres, I am from Costa Rica. See this is the problem I have > with the KVM instalation: > > 2012-10-03 20:28:17.395+: 25793: warning : qemuCapsInit:856 : Failed to > get host power management capabilities > 2012-10-03

[libvirt] Fwd: Failed to get host power management capabilities

2012-10-08 Thread David Torres
Hi all, My name is David Torres, I am from Costa Rica. See this is the problem I have with the KVM instalation: 2012-10-03 20:28:17.395+: 25793: warning : qemuCapsInit:856 : Failed to get host power management capabilities 2012-10-03 20:28:17.661+: 25793: error : virExecWithHook:328 : C

Re: [libvirt] [PATCH] Call curl_global_init from virInitialize to avoid thread-safety issues

2012-10-08 Thread Matthias Bolte
2012/10/8 Daniel P. Berrange : > On Sat, Oct 06, 2012 at 08:10:07PM +0200, Matthias Bolte wrote: >> curl_global_init is not thread-safe. curl_easy_init might call >> curl_global_init when it was no called before. But curl_easy_init >> can be called from different threads by the ESX driver. Therefor

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Eric Blake
On 10/08/2012 01:16 PM, Marcelo Cerri wrote: >>> +int virGetUserID(const char *user, uid_t *uid) >>> +{ >>> +unsigned int uint_uid; >> >> Are we sure that 'unsigned int' is large enough for uid_t on all >> platforms? I'd feel safer with something like: >> >> verify(sizeof(unsigned int) >= siz

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Marcelo Cerri
On Mon, Oct 08, 2012 at 11:12:49AM -0600, Eric Blake wrote: > On 10/05/2012 08:52 PM, Marcelo Cerri wrote: > > This patch updates virGetUserID and virGetGroupID to be able to parse a > > user or group name in a similar way to coreutils' chown. This means that > > a numeric value with a leading plus

Re: [libvirt] [PATCH 09/12] Add a JSON properties parameter to virLog{, V}Message

2012-10-08 Thread Miloslav Trmac
Thanks for the review. - Original Message - > On Thu, Sep 20, 2012 at 08:24:08PM +0200, Miloslav Trmač wrote: > > ... and update all users. No change in functionality, the parameter > > will be used in later patches. > > > > diff --git a/src/util/logging.h b/src/util/logging.h > > index

Re: [libvirt] [PATCH 00/12] Structured syslog (Lumberjack/CEE) support

2012-10-08 Thread Miloslav Trmac
Hello, Thanks for the review, and I'm sorry about the late response. - Original Message - > While I agree with the effort to try to standardize on metadata to > be collected with log messages, I can't say I like the Lumberjack > design, or this proposed usage in libvirt. > > First it is n

Re: [libvirt] [PATCH] util: Improve error reporting from getgrnam_r and friends

2012-10-08 Thread Marcelo Cerri
I'll squash it so. I think it makes more sense to have these things merged. On Mon, Oct 08, 2012 at 07:34:26PM +0200, Peter Krempa wrote: > On 10/08/12 19:16, Eric Blake wrote: > >On 10/08/2012 06:54 AM, Peter Krempa wrote: > >>Error reporting for getgrnam_r() isn't that broken as in getgrnam(). >

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Marcelo Cerri
On Mon, Oct 08, 2012 at 08:04:53PM +0200, Peter Krempa wrote: > On 10/08/12 19:57, Eric Blake wrote: > >On 10/08/2012 11:44 AM, Marcelo Cerri wrote: > > > >>This comment is actually wrong... It should be: > >> > >>/* Search in the password database for a user id that matches the user name > >> * `

Re: [libvirt] [PATCH] fix kvm_pv_eoi with kvmclock

2012-10-08 Thread Martin Kletzander
On 10/08/2012 07:52 PM, Peter Krempa wrote: > On 10/08/12 19:32, Martin Kletzander wrote: >> When both kvmclock and kvm_pv_eoi are configured (either disabled or >> enabled) libvirt will generate invalid CPU specification due to the >> fact that even though kvmclock causes the CPU to be specified,

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Peter Krempa
On 10/08/12 19:57, Eric Blake wrote: On 10/08/2012 11:44 AM, Marcelo Cerri wrote: This comment is actually wrong... It should be: /* Search in the password database for a user id that matches the user name * `name`. Returns 0 on success, -1 on failure or 1 if name cannot be found. Are you o

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Eric Blake
On 10/08/2012 11:44 AM, Marcelo Cerri wrote: > This comment is actually wrong... It should be: > > /* Search in the password database for a user id that matches the user name > * `name`. Returns 0 on success, -1 on failure or 1 if name cannot be found. > > Are you ok with this kind of return?

Re: [libvirt] [PATCH] fix kvm_pv_eoi with kvmclock

2012-10-08 Thread Peter Krempa
On 10/08/12 19:32, Martin Kletzander wrote: When both kvmclock and kvm_pv_eoi are configured (either disabled or enabled) libvirt will generate invalid CPU specification due to the fact that even though kvmclock causes the CPU to be specified, it doesn't set have_cpu flag to true (and the new kvm

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Marcelo Cerri
On Mon, Oct 08, 2012 at 11:12:49AM -0600, Eric Blake wrote: > On 10/05/2012 08:52 PM, Marcelo Cerri wrote: > > This patch updates virGetUserID and virGetGroupID to be able to parse a > > user or group name in a similar way to coreutils' chown. This means that > > a numeric value with a leading plus

Re: [libvirt] [PATCH 2/2] security: update user and group parsing in security_dac.c

2012-10-08 Thread Peter Krempa
On 10/08/12 19:22, Eric Blake wrote: On 10/08/2012 07:52 AM, Marcelo Cerri wrote: On Mon, Oct 08, 2012 at 02:11:26PM +0200, Peter Krempa wrote: On 10/06/12 04:52, Marcelo Cerri wrote: The functions virGetUserID and virGetGroupID are now able to parse user/group names and IDs in a similar way t

[libvirt] [PATCH] fix kvm_pv_eoi with kvmclock

2012-10-08 Thread Martin Kletzander
When both kvmclock and kvm_pv_eoi are configured (either disabled or enabled) libvirt will generate invalid CPU specification due to the fact that even though kvmclock causes the CPU to be specified, it doesn't set have_cpu flag to true (and the new kvm_pv_eoi as well). This patch fixes the issue a

Re: [libvirt] [PATCH] util: Improve error reporting from getgrnam_r and friends

2012-10-08 Thread Peter Krempa
On 10/08/12 19:16, Eric Blake wrote: On 10/08/2012 06:54 AM, Peter Krempa wrote: Error reporting for getgrnam_r() isn't that broken as in getgrnam(). This patch enhances virGetUserIDByName() and virGetGroupIDByName() so that they error out if retrieval of the information failed but just log a d

Re: [libvirt] [PATCH 2/2] security: update user and group parsing in security_dac.c

2012-10-08 Thread Eric Blake
On 10/08/2012 07:52 AM, Marcelo Cerri wrote: > On Mon, Oct 08, 2012 at 02:11:26PM +0200, Peter Krempa wrote: >> On 10/06/12 04:52, Marcelo Cerri wrote: >>> The functions virGetUserID and virGetGroupID are now able to parse >>> user/group names and IDs in a similar way to coreutils' chown. So, user

Re: [libvirt] [PATCH] util: Improve error reporting from getgrnam_r and friends

2012-10-08 Thread Eric Blake
On 10/08/2012 06:54 AM, Peter Krempa wrote: > Error reporting for getgrnam_r() isn't that broken as in getgrnam(). > > This patch enhances virGetUserIDByName() and virGetGroupIDByName() so > that they error out if retrieval of the information failed but just log > a debug message if the entry was

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Eric Blake
On 10/05/2012 08:52 PM, Marcelo Cerri wrote: > This patch updates virGetUserID and virGetGroupID to be able to parse a > user or group name in a similar way to coreutils' chown. This means that > a numeric value with a leading plus sign is always parsed as an ID, > otherwise the functions try to pa

Re: [libvirt] [PATCH] util: Improve error reporting from getgrnam_r and friends

2012-10-08 Thread Marcelo Cerri
Good catch! It seems fine to me. I've ran some tests and it is working as expected. On Mon, Oct 08, 2012 at 02:54:21PM +0200, Peter Krempa wrote: > Error reporting for getgrnam_r() isn't that broken as in getgrnam(). > > This patch enhances virGetUserIDByName() and virGetGroupIDByName() so > tha

Re: [libvirt] [PATCH 1/3] Fix typo in HAVE_DBUS automake conditional

2012-10-08 Thread Eric Blake
On 10/08/2012 09:46 AM, Doug Goldstein wrote: > On Mon, Oct 8, 2012 at 9:57 AM, Alexander Larsson wrote: >> The variable that is set in the script is with_dbus, not have_dbus. >> --- >> configure.ac | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/configure.ac b/configu

Re: [libvirt] virsh blockcommit tests (w/ libvirt & qemu git)

2012-10-08 Thread Kashyap Chamarthy
On 10/08/2012 03:24 PM, Kashyap Chamarthy wrote: > Hi, > > Here are a few tests I've done over the weekend to test blockcommit w/ Eric's > block commit > patches: > - https://www.redhat.com/archives/libvir-list/2012-October/msg00091.html > - https://www.redhat.com/archives/libvir-list

Re: [libvirt] [PATCH 1/3] Fix typo in HAVE_DBUS automake conditional

2012-10-08 Thread Doug Goldstein
On Mon, Oct 8, 2012 at 9:57 AM, Alexander Larsson wrote: > The variable that is set in the script is with_dbus, not have_dbus. > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 6d50985..767e06c 100644 > --- a/configur

[libvirt] CPU utilization between physical CPU and virtual CPU in KVM

2012-10-08 Thread Dennis Chen
Hi All, I am confused by the following observed scenario: In my 4-CPU (KVM supported, 2 core with 2 thread for each) host machine box, I create only one VM with 3-vCPU through virsh/libvirt tools and also I pin this VM process to the physical processor 3. I guess the CPU utilization for the proce

Re: [libvirt] [PATCH] qemu: Fix parsing of x86 CPU models

2012-10-08 Thread Daniel P. Berrange
On Mon, Oct 08, 2012 at 05:08:00PM +0200, Jiri Denemark wrote: > On Mon, Oct 08, 2012 at 15:55:09 +0100, Daniel P. Berrange wrote: > > My feeling is that we came to agreement with the QEMU developers that we > > would exclusively useful QMP probing with any QEMU from 1.2.0 or later > > and would no

[libvirt] [ANNOUNCE] libvirt-glib 0.1.3 release

2012-10-08 Thread Daniel P. Berrange
I am pleased to announce that a new release of the libvirt-glib package, version 0.1.3, is now available from ftp://libvirt.org/libvirt/glib/ The packages are GPG signed with Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R) New in this release: - Improve doc

Re: [libvirt] [PATCH] qemu: Fix parsing of x86 CPU models

2012-10-08 Thread Jiri Denemark
On Mon, Oct 08, 2012 at 15:55:09 +0100, Daniel P. Berrange wrote: > My feeling is that we came to agreement with the QEMU developers that we > would exclusively useful QMP probing with any QEMU from 1.2.0 or later > and would not try to follow changes they make to the non-QMP interfaces > we previo

[libvirt] [PATCH 2/3] virdbus: Add virDBusGetSessionBus helper

2012-10-08 Thread Alexander Larsson
This splits out some common code from virDBusGetSystemBus and uses it to implement a new virDBusGetSessionBus helper. --- src/util/virdbus.c | 84 +- src/util/virdbus.h | 1 + 2 files changed, 65 insertions(+), 20 deletions(-) diff --git a/src/

[libvirt] [PATCH 3/3] Add new libvirt-babysitter tool

2012-10-08 Thread Alexander Larsson
This helper registers with the session bus and libvirt and ensures that we properly save the state when the session exits. It does this in two ways: 1) Whenever the session dbus connection is disconnected (typically due to a logout) we save all domains in the session libvirtd. 2) Whenever there i

[libvirt] [PATCH 1/3] Fix typo in HAVE_DBUS automake conditional

2012-10-08 Thread Alexander Larsson
The variable that is set in the script is with_dbus, not have_dbus. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6d50985..767e06c 100644 --- a/configure.ac +++ b/configure.ac @@ -1251,7 +1251,7 @@ if test "$with_dbus" = "yes

[libvirt] [PATCH 0/3] Cleanly save session VMs on logout/shutdown

2012-10-08 Thread Alexander Larsson
Atm, when you exit the sessin (via logout or shutdown for instance) we just leave the qemu:///session handling libvirtd process around, including any running VMs. This is not particularly nice, as there is no way to know that the VMs are running, and you risk data loss if you shutdown while the VMs

Re: [libvirt] [PATCH] qemu: Fix parsing of x86 CPU models

2012-10-08 Thread Daniel P. Berrange
On Mon, Oct 08, 2012 at 04:48:00PM +0200, Jiri Denemark wrote: > On Mon, Oct 08, 2012 at 15:35:38 +0100, Daniel P. Berrange wrote: > > On Mon, Oct 08, 2012 at 04:30:03PM +0200, Jiri Denemark wrote: > > > QEMU changed the output of -cpu ? and CPU models can now be followed by > > > its description.

Re: [libvirt] Core dump caused by misusing openssl in multithread scenario!

2012-10-08 Thread Matthias Bolte
2012/10/8 Benjamin Wang (gendwang) : > -Original Message- > From: Matthias Bolte [mailto:matthias.bo...@googlemail.com] > Sent: 2012年10月7日 2:14 > To: Benjamin Wang (gendwang) > Cc: Daniel P. Berrange; libvir-list@redhat.com; Yang Zhou (yangzho) > Subject: Re: [libvirt] Core dump caused by m

Re: [libvirt] [PATCH] qemu: Fix parsing of x86 CPU models

2012-10-08 Thread Jiri Denemark
On Mon, Oct 08, 2012 at 15:35:38 +0100, Daniel P. Berrange wrote: > On Mon, Oct 08, 2012 at 04:30:03PM +0200, Jiri Denemark wrote: > > QEMU changed the output of -cpu ? and CPU models can now be followed by > > its description. Our parser just used both model name and its > > description as a model

Re: [libvirt] [PATCH] qemu: Fix parsing of x86 CPU models

2012-10-08 Thread Daniel P. Berrange
On Mon, Oct 08, 2012 at 04:30:03PM +0200, Jiri Denemark wrote: > QEMU changed the output of -cpu ? and CPU models can now be followed by > its description. Our parser just used both model name and its > description as a model name, which made any model with a description > unusable with libvirt. W

[libvirt] [PATCH] qemu: Fix parsing of x86 CPU models

2012-10-08 Thread Jiri Denemark
QEMU changed the output of -cpu ? and CPU models can now be followed by its description. Our parser just used both model name and its description as a model name, which made any model with a description unusable with libvirt. --- src/qemu/qemu_capabilities.c | 11 --- 1 file changed, 8 ins

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Peter Krempa
On 10/08/12 16:13, Marcelo Cerri wrote: On Mon, Oct 08, 2012 at 10:36:22AM -0300, Marcelo Cerri wrote: On Mon, Oct 08, 2012 at 02:08:59PM +0200, Peter Krempa wrote: On 10/06/12 04:52, Marcelo Cerri wrote: This patch updates virGetUserID and virGetGroupID to be able to parse a user or group nam

Re: [libvirt] Core dump caused by misusing openssl in multithread scenario!

2012-10-08 Thread Daniel P. Berrange
On Mon, Oct 08, 2012 at 03:22:07PM +0100, Daniel P. Berrange wrote: > On Sat, Oct 06, 2012 at 08:14:09PM +0200, Matthias Bolte wrote: > > 2012/10/2 Benjamin Wang (gendwang) : > > > Hi Daniel, > > >Is this problem fixed in the latest version? What about the question 2 > > > which related to ope

Re: [libvirt] Core dump caused by misusing openssl in multithread scenario!

2012-10-08 Thread Daniel P. Berrange
On Sat, Oct 06, 2012 at 08:14:09PM +0200, Matthias Bolte wrote: > 2012/10/2 Benjamin Wang (gendwang) : > > Hi Daniel, > >Is this problem fixed in the latest version? What about the question 2 > > which related to openssl callbacks in multi-thread? > > As Daniel said, we cannot assume that lib

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Marcelo Cerri
On Mon, Oct 08, 2012 at 10:36:22AM -0300, Marcelo Cerri wrote: > On Mon, Oct 08, 2012 at 02:08:59PM +0200, Peter Krempa wrote: > > On 10/06/12 04:52, Marcelo Cerri wrote: > > >This patch updates virGetUserID and virGetGroupID to be able to parse a > > >user or group name in a similar way to coreuti

Re: [libvirt] Core dump caused by misusing openssl in multithread scenario!

2012-10-08 Thread Benjamin Wang (gendwang)
-Original Message- From: Matthias Bolte [mailto:matthias.bo...@googlemail.com] Sent: 2012年10月7日 2:14 To: Benjamin Wang (gendwang) Cc: Daniel P. Berrange; libvir-list@redhat.com; Yang Zhou (yangzho) Subject: Re: [libvirt] Core dump caused by misusing openssl in multithread scenario! 2012/

Re: [libvirt] [PATCH v3] python: cleanup vcpu related binding APIs

2012-10-08 Thread Guannan Ren
On 10/08/2012 08:17 PM, Michal Privoznik wrote: On 28.09.2012 10:27, Guannan Ren wrote: libvirt_virDomainGetVcpus: add error handling, return -1 instead of None libvirt_virDomainPinVcpu and libvirt_virDomainPinVcpuFlags: check the type of argument make use of libvirt_boolUnwrap Set bit

Re: [libvirt] [PATCH 2/2] security: update user and group parsing in security_dac.c

2012-10-08 Thread Marcelo Cerri
On Mon, Oct 08, 2012 at 02:11:26PM +0200, Peter Krempa wrote: > On 10/06/12 04:52, Marcelo Cerri wrote: > >The functions virGetUserID and virGetGroupID are now able to parse > >user/group names and IDs in a similar way to coreutils' chown. So, user > >and group parsing in security_dac can be simpli

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Marcelo Cerri
On Mon, Oct 08, 2012 at 02:08:59PM +0200, Peter Krempa wrote: > On 10/06/12 04:52, Marcelo Cerri wrote: > >This patch updates virGetUserID and virGetGroupID to be able to parse a > >user or group name in a similar way to coreutils' chown. This means that > >a numeric value with a leading plus sign

Re: [libvirt] IPV6 and routing

2012-10-08 Thread Gene Czarcinski
On 10/07/2012 12:10 PM, Gene Czarcinski wrote: 1. Manually configure the IPv6 address/network on the virtualization host. On the default route system, add a static route to the virtualization host. Things will then work. 2. It hurts, don't do it: use a bridge in the virtualization host for

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Marcelo Cerri
On Fri, Oct 05, 2012 at 11:52:23PM -0300, Marcelo Cerri wrote: > This patch updates virGetUserID and virGetGroupID to be able to parse a > user or group name in a similar way to coreutils' chown. This means that > a numeric value with a leading plus sign is always parsed as an ID, > otherwise the f

Re: [libvirt] [PATCH 7/7] locking: Implement lock failure action in sanlock driver

2012-10-08 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 04:41:37PM +0200, Jiri Denemark wrote: > While the changes to sanlock driver should be stable, the actual > implementation of sanlock_helper is supposed to be replaced in the > future. However, before we can implement a better sanlock_helper, we > need an administrative inte

Re: [libvirt] [PATCH 6/7] locking: Add support for lock failure action

2012-10-08 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 04:41:36PM +0200, Jiri Denemark wrote: > --- > src/Makefile.am | 2 +- > src/locking/domain_lock.c | 11 +++ > src/locking/lock_driver.h | 5 - > src/locking/lock_driver_nop.c | 1 + > src/locking/lock_driver_sanlock.c |

Re: [libvirt] [PATCH 5/7] locking: Pass hypervisor driver name when acquiring locks

2012-10-08 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 04:41:35PM +0200, Jiri Denemark wrote: > This is required in case a lock manager needs to contact libvirtd in > case of an unexpected event. > --- > docs/internals/locking.html.in | 8 > src/locking/domain_lock.c | 25 + > src/locking/

Re: [libvirt] [PATCH 4/7] locking: Add const char * parameter to avoid ugly typecasts

2012-10-08 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 04:41:34PM +0200, Jiri Denemark wrote: > --- > src/locking/lock_driver.h | 2 ++ > src/locking/lock_manager.c | 3 +++ > 2 files changed, 5 insertions(+) > > diff --git a/src/locking/lock_driver.h b/src/locking/lock_driver.h > index 83ef323..c33aea7 100644 > --- a/src/loc

Re: [libvirt] [PATCH 1/7] conf: Generalize life cycle actions to event actions

2012-10-08 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 04:41:31PM +0200, Jiri Denemark wrote: > While current on_{poweroff,reboot,crash} action configuration is about > configuring life cycle actions, they can all be considered events and > actions that need to be done on a particular event. Let's generalize the > code this way

[libvirt] [PATCH] util: Improve error reporting from getgrnam_r and friends

2012-10-08 Thread Peter Krempa
Error reporting for getgrnam_r() isn't that broken as in getgrnam(). This patch enhances virGetUserIDByName() and virGetGroupIDByName() so that they error out if retrieval of the information failed but just log a debug message if the entry was not found. >From the man page for getgrnam_r(): RETU

Re: [libvirt] [PATCH 3/7] qemu: Use macro instead of "qemu" in the context of URI scheme

2012-10-08 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 04:41:33PM +0200, Jiri Denemark wrote: > --- > src/qemu/qemu_conf.h | 2 ++ > src/qemu/qemu_driver.c | 18 +- > 2 files changed, 11 insertions(+), 9 deletions(-) > > diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h > index ca2f694..fe8de36 100644

Re: [libvirt] [PATCH 2/7] conf: Add on_lockfailure event configuration

2012-10-08 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 04:41:32PM +0200, Jiri Denemark wrote: > Using this new element, one can configure an action that should be > performed when resource locks are lost. > --- > docs/formatdomain.html.in | 22 ++ > docs/schemas/domaincommon.rng | 22

Re: [libvirt] [Libvirt-announce] ANNOUNCE: libvirt 0.9.11.6 maintenance release

2012-10-08 Thread Justin Clift
On 08/10/2012, at 10:52 AM, Cole Robinson wrote: > libvirt 0.9.11.6 maintenance release is now available. This is > libvirt 0.9.11 with additional bugfixes that have accumulated > upstream since the initial release. > > This release can be downloaded at: > > http://libvirt.org/sources/stable_upda

Re: [libvirt] Memory free in libvirt JNA

2012-10-08 Thread Claudio Bley
Hi Daniel, At Fri, 28 Sep 2012 22:34:13 +0800, Daniel Veillard wrote: > > sorry for the delay, I need to focuse one something else ATM ! Me too. So, no worries! ;) > First do you have a small pointer indicating where in JNA that kind > of native deallocation must take place, since most of the t

Re: [libvirt] Support for qemu snapshot=on drives in libvirt

2012-10-08 Thread Daniel P. Berrange
On Fri, Oct 05, 2012 at 12:40:39PM +0100, Richard W.M. Jones wrote: > > I notice that the qemu driver doesn't support snapshot drives > (-drive file=foo,snapshot=on). This is important for libguestfs. > > Currently libguestfs hacks this using . That works fine for > static disks in the libvirt

Re: [libvirt] [PATCH v3] python: cleanup vcpu related binding APIs

2012-10-08 Thread Michal Privoznik
On 28.09.2012 10:27, Guannan Ren wrote: > libvirt_virDomainGetVcpus: add error handling, return -1 instead of None > libvirt_virDomainPinVcpu and libvirt_virDomainPinVcpuFlags: > check the type of argument > make use of libvirt_boolUnwrap > > Set bitmap according to these values which are co

Re: [libvirt] [PATCH 2/2] security: update user and group parsing in security_dac.c

2012-10-08 Thread Peter Krempa
On 10/06/12 04:52, Marcelo Cerri wrote: The functions virGetUserID and virGetGroupID are now able to parse user/group names and IDs in a similar way to coreutils' chown. So, user and group parsing in security_dac can be simplified. --- src/security/security_dac.c | 40 ++

Re: [libvirt] [PATCH 1/2] util: extend virGetUserID and virGetGroupID to support names and IDs

2012-10-08 Thread Peter Krempa
On 10/06/12 04:52, Marcelo Cerri wrote: This patch updates virGetUserID and virGetGroupID to be able to parse a user or group name in a similar way to coreutils' chown. This means that a numeric value with a leading plus sign is always parsed as an ID, otherwise the functions try to parse the inp

[libvirt] virsh blockcommit tests (w/ libvirt & qemu git)

2012-10-08 Thread Kashyap Chamarthy
Hi, Here are a few tests I've done over the weekend to test blockcommit w/ Eric's block commit patches: - https://www.redhat.com/archives/libvir-list/2012-October/msg00091.html - https://www.redhat.com/archives/libvir-list/2012-October/msg00091.html Most of these are from an earl

Re: [libvirt] [PATCH] python: keep consistent handling of Python integer conversion

2012-10-08 Thread Guannan Ren
On 10/01/2012 04:08 PM, Michal Privoznik wrote: On 28.09.2012 14:29, Guannan Ren wrote: libvirt_ulonglongUnwrap requires the integer type of python obj. But libvirt_longlongUnwrap still could handle python obj of Pyfloat_type which causes the float value to be rounded up to an integer. For exam

Re: [libvirt] [RFC] Private data pointer for virStoragePool and virStorageVol structs

2012-10-08 Thread Daniel P. Berrange
On Sat, Oct 06, 2012 at 05:15:55PM +0200, Matthias Bolte wrote: > Ata Bohra proposed a backend concept for the ESX storage driver to > simplify the addition of iSCSI support to the ESX storage driver. > > The problem here is that most of the storage driver functions need to > determine the backend

Re: [libvirt] [PATCH] Call curl_global_init from virInitialize to avoid thread-safety issues

2012-10-08 Thread Daniel P. Berrange
On Sat, Oct 06, 2012 at 08:10:07PM +0200, Matthias Bolte wrote: > curl_global_init is not thread-safe. curl_easy_init might call > curl_global_init when it was no called before. But curl_easy_init > can be called from different threads by the ESX driver. Therefore, > call curl_global_init from virI