[libvirt] virsh --connect not working

2012-09-28 Thread hiren panchasara
I've installed libvirt-0.9.13 from ports on my freebsd machine. I started libvirtd: $ ps awwux | grep libvirtd root 11470 0.0 0.4 103100 31948 - I10:41PM 0:00.35 libvirtd -v -d $ sudo virsh --connect qemu:///system error: no connection driver available for No connection for

Re: [libvirt] virsh --connect not working

2012-09-28 Thread hiren panchasara
On Thu, Sep 27, 2012 at 11:15 PM, hiren panchasara hiren.panchas...@gmail.com wrote: I've installed libvirt-0.9.13 from ports on my freebsd machine. I started libvirtd: $ ps awwux | grep libvirtd root 11470 0.0 0.4 103100 31948 - I10:41PM 0:00.35 libvirtd -v -d $ sudo

Re: [libvirt] [PATCH 1/2] python: cleanup vcpu related binding APIs

2012-09-28 Thread Guannan Ren
On 09/27/2012 09:51 PM, Michal Privoznik wrote: On 26.09.2012 19:33, Guannan Ren wrote: libvirt_virDomainGetVcpus: add error handling, return -1 instead of None libvirt_virDomainPinVcpu and libvirt_virDomainPinVcpuFlags: make use of libvirt_boolUnwrap Set bitmap according to these values

Re: [libvirt] [PATCH] Move most of qemuProcessKill into virProcessKillPainfully

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 04:31:10PM -0400, Laine Stump wrote: On 09/26/2012 10:44 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In the cgroups APIs we have a virCgroupKillPainfully function which does the loop sending SIGTERM, then SIGKILL and waiting for the

Re: [libvirt] [PATCH 2/9] s/long long/size_t/ for file line numbers in logging code

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 01:05:55PM -0600, Eric Blake wrote: On 09/27/2012 10:44 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The __LINE__ macro value is specified to fit in the size_t Not quite accurate. C99 merely says: 6.10.4 p3: ... a line number as

Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 02:51:35PM -0600, Eric Blake wrote: On 09/27/2012 10:44 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add support for logging to the systemd journal, using its simple client library. The benefit over syslog is that it accepts

Re: [libvirt] [PATCH 0/9] Use the systemd journal for logging

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 07:31:41PM -0500, Doug Goldstein wrote: On Thu, Sep 27, 2012 at 11:44 AM, Daniel P. Berrange berra...@redhat.com wrote: The systemd journal provides a highly efficient way for apps to generate structured log messages. Since systemd will be used by default on future

Re: [libvirt] virsh --connect not working

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 11:15:56PM -0700, hiren panchasara wrote: I've installed libvirt-0.9.13 from ports on my freebsd machine. I started libvirtd: $ ps awwux | grep libvirtd root 11470 0.0 0.4 103100 31948 - I10:41PM 0:00.35 libvirtd -v -d $ sudo virsh --connect

Re: [libvirt] [PATCH v3] Fix dnsmasq/radvd on bridges not being able to be bound to IPv6 address on recent kernels

2012-09-28 Thread Benjamin Cama
Le jeudi 27 septembre 2012 à 11:18 -0600, Eric Blake a écrit : ACK with those changes, so I fixed it and pushed, along with your .mailmap update. Thanks a lot! -- Benjamin Cama benjamin.c...@telecom-bretagne.eu -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 2/2] python: return error if PyObject obj is NULL for unwrapper helper functions

2012-09-28 Thread Guannan Ren
On 09/27/2012 09:51 PM, Michal Privoznik wrote: On 26.09.2012 19:33, Guannan Ren wrote: The result is indeterminate for NULL argument to python functions as follows. It's better to return negative value in these situations. PyObject_IsTrue will segfault if the argument is NULL

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

2012-09-28 Thread Guannan Ren
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 contained in given argument of vcpu tuple and turn

Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 02:51:35PM -0600, Eric Blake wrote: On 09/27/2012 10:44 AM, Daniel P. Berrange wrote: +/* Message was too large, so dump to temporary file + * and pass an FD to the journal + */ + +if ((buffd = mkostemp(path, O_CLOEXEC|O_RDWR)) 0) Is mkostemp

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

2012-09-28 Thread Eric Blake
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 it. Signed-off-by: liguang

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

2012-09-28 Thread Guannan Ren
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 example dom.setSchedulerParameters({'vcpu_quota': 0.88}) 0 libvirt_longlongUnwrap treats

Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-28 Thread Eric Blake
On 09/28/2012 02:08 AM, Daniel P. Berrange wrote: +static int virLogAddOutputToJournald(int priority) +{ +if ((journalfd = socket(AF_UNIX, SOCK_DGRAM, 0)) 0) +return -1; +if (virSetInherit(journalfd, false) 0) { Why not use SOCK_DGRAM | SOCK_CLOEXEC in the socket() call?

Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-28 Thread Eric Blake
On 09/28/2012 04:09 AM, Daniel P. Berrange wrote: On Thu, Sep 27, 2012 at 02:51:35PM -0600, Eric Blake wrote: On 09/27/2012 10:44 AM, Daniel P. Berrange wrote: +/* Message was too large, so dump to temporary file + * and pass an FD to the journal + */ + +if ((buffd =

[libvirt] [PATCH v2] Add systemd journal support

2012-09-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add support for logging to the systemd journal, using its simple client library. The benefit over syslog is that it accepts structured log data, so the journald can store individual items like code file/line/func separately from the string message.

Re: [libvirt] [PATCH v3 20/20] Add support for detecting capablities using QMP commands

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 03:00:14PM +0200, Jiri Denemark wrote: On Tue, Sep 25, 2012 at 19:00:13 +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Start a QEMU process using $QEMU -S -no-user-config -nodefconfig -nodefaults \ -nographic -M none

Re: [libvirt] [PATCH v2] Add systemd journal support

2012-09-28 Thread Eric Blake
On 09/28/2012 07:08 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add support for logging to the systemd journal, using its simple client library. The benefit over syslog is that it accepts structured log data, so the journald can store individual items like

Re: [libvirt] Memory free in libvirt JNA

2012-09-28 Thread Daniel Veillard
Hi Claudio, sorry for the delay, I need to focuse one something else ATM ! On Mon, Sep 24, 2012 at 04:11:19PM +0200, Claudio Bley wrote: At Wed, 12 Sep 2012 20:23:28 +0800, Daniel Veillard wrote: I think we must provide the free functions for all the memory allocated by libvirt.

[libvirt] [PATCH 4/4] Ignore error from query-cpu-definitions

2012-09-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Some architectures provide the query-cpu-definitions command, but are set to always return a GenericError from it :-( Catch this treat it as if there was an empty list of CPUs returned Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 1/4] Remove need to pass in a virDomainObjPtr instance to qemuMonitorOpen

2012-09-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The qemuMonitorOpen method only needs a virDomainObjPtr in order to access the QEMU pid. This is not critical when detecting the QEMU capabilties, so can easily be skipped Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 0/4] Switch to using QMP for capabilities detection

2012-09-28 Thread Daniel P. Berrange
This is a fixup of the last patch in my previous series based on the feedback obtained, and some flaws I identified myself -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 3/4] Add support for detecting capablities using QMP commands

2012-09-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Start a QEMU process using $QEMU -S -no-user-config -nodefaults \ -nographic -M none -qmp unix:/some/path,server,nowait and talk QMP over stdio to discover what capabilities the binary supports. This works for QEMU 1.2.0 or later and for

[libvirt] [PATCH 2/4] Avoid bogus I/O event errors when closing the QEMU monitor

2012-09-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com After calling qemuMonitorClose(), it is still possible for the QEMU monitor I/O event callback to get invoked. This will trigger an error message because mon-fd has been set to -1 at this point. Silently ignore the case where mon-fd is -1, likewise for

Re: [libvirt] [PATCH 1/4] Remove need to pass in a virDomainObjPtr instance to qemuMonitorOpen

2012-09-28 Thread Eric Blake
On 09/28/2012 08:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The qemuMonitorOpen method only needs a virDomainObjPtr in order to access the QEMU pid. This is not critical when detecting the QEMU capabilties, so can easily be skipped Signed-off-by: Daniel

Re: [libvirt] [PATCH 2/4] Avoid bogus I/O event errors when closing the QEMU monitor

2012-09-28 Thread Eric Blake
On 09/28/2012 08:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com After calling qemuMonitorClose(), it is still possible for the QEMU monitor I/O event callback to get invoked. This will trigger an error message because mon-fd has been set to -1 at this point.

Re: [libvirt] [PATCH 3/4] Add support for detecting capablities using QMP commands

2012-09-28 Thread Eric Blake
On 09/28/2012 08:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Start a QEMU process using $QEMU -S -no-user-config -nodefaults \ -nographic -M none -qmp unix:/some/path,server,nowait and talk QMP over stdio to discover what capabilities the

Re: [libvirt] [PATCH 4/4] Ignore error from query-cpu-definitions

2012-09-28 Thread Eric Blake
On 09/28/2012 08:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Some architectures provide the query-cpu-definitions command, but are set to always return a GenericError from it :-( Catch this treat it as if there was an empty list of CPUs returned

Re: [libvirt] [PATCH 4/4] Ignore error from query-cpu-definitions

2012-09-28 Thread Daniel P. Berrange
On Fri, Sep 28, 2012 at 03:58:23PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Some architectures provide the query-cpu-definitions command, but are set to always return a GenericError from it :-( Catch this treat it as if there was an empty list of CPUs

Re: [libvirt] [PATCH 3/4] Add support for detecting capablities using QMP commands

2012-09-28 Thread Daniel P. Berrange
On Fri, Sep 28, 2012 at 09:20:01AM -0600, Eric Blake wrote: On 09/28/2012 08:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Start a QEMU process using $QEMU -S -no-user-config -nodefaults \ -nographic -M none -qmp

[libvirt] [PATCH] node_memory: Add new parameter field to tune the new sysfs knob

2012-09-28 Thread Osier Yang
Upstream kernel introduced new sysfs knob merge_across_nodes to specify if pages from different numa nodes can be merged. When set to 0, only pages which physically reside in the memory area of same NUMA node can be merged. When set to 1, pages from all nodes can be merged. This patch supports

Re: [libvirt] virsh --connect not working

2012-09-28 Thread hiren panchasara
On Fri, Sep 28, 2012 at 1:11 AM, Daniel P. Berrange berra...@redhat.comwrote: On Thu, Sep 27, 2012 at 11:15:56PM -0700, hiren panchasara wrote: I've installed libvirt-0.9.13 from ports on my freebsd machine. I started libvirtd: $ ps awwux | grep libvirtd root 11470 0.0 0.4

[libvirt] [PATCH] Add support for detecting capablities using QMP commands

2012-09-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Start a QEMU process using $QEMU -S -no-user-config -nodefaults \ -nographic -M none -qmp unix:/some/path,server,nowait and talk QMP over stdio to discover what capabilities the binary supports. This works for QEMU 1.2.0 or later and for

Re: [libvirt] virsh --connect not working

2012-09-28 Thread Daniel P. Berrange
On Fri, Sep 28, 2012 at 08:37:54AM -0700, hiren panchasara wrote: On Fri, Sep 28, 2012 at 1:11 AM, Daniel P. Berrange berra...@redhat.comwrote: On Thu, Sep 27, 2012 at 11:15:56PM -0700, hiren panchasara wrote: I've installed libvirt-0.9.13 from ports on my freebsd machine. I

Re: [libvirt] [PATCH] Add support for detecting capablities using QMP commands

2012-09-28 Thread Eric Blake
On 09/28/2012 09:43 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Start a QEMU process using $QEMU -S -no-user-config -nodefaults \ -nographic -M none -qmp unix:/some/path,server,nowait and talk QMP over stdio to discover what capabilities the

Re: [libvirt] virsh --connect not working

2012-09-28 Thread hiren panchasara
On Fri, Sep 28, 2012 at 8:40 AM, Daniel P. Berrange berra...@redhat.comwrote: On Fri, Sep 28, 2012 at 08:37:54AM -0700, hiren panchasara wrote: On Fri, Sep 28, 2012 at 1:11 AM, Daniel P. Berrange berra...@redhat.com wrote: On Thu, Sep 27, 2012 at 11:15:56PM -0700, hiren panchasara wrote:

Re: [libvirt] virsh --connect not working

2012-09-28 Thread Daniel P. Berrange
On Fri, Sep 28, 2012 at 08:51:40AM -0700, hiren panchasara wrote: On Fri, Sep 28, 2012 at 8:40 AM, Daniel P. Berrange berra...@redhat.comwrote: On Fri, Sep 28, 2012 at 08:37:54AM -0700, hiren panchasara wrote: On Fri, Sep 28, 2012 at 1:11 AM, Daniel P. Berrange berra...@redhat.com

[libvirt] [PATCH] Fix QEMU test with 1.2.0 help output

2012-09-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The help output for QEMU 1.2.0 changed 'pci-assign' to 'kvm-pci-assign'. Since the new capabilities code does exact device name matching instead of substring matching, this caused the capabilities to go missing. Pushed as a build break fix

Re: [libvirt] [PATCH 2/3] openvswitch: Add utility functions for getting and setting Open vSwitch per-port data

2012-09-28 Thread Laine Stump
On 09/21/2012 05:16 PM, Kyle Mestery wrote: Add utility functions for Open vSwitch to both save per-port data before a live migration, and restore the per-port data after a live migration. Signed-off-by: Kyle Mestery kmest...@cisco.com --- src/libvirt_private.syms| 2 ++

Re: [libvirt] [PATCH 1/3] qemu_migration: Add hooks to transport network port data during migration

2012-09-28 Thread Laine Stump
On 09/21/2012 05:16 PM, Kyle Mestery wrote: Add the ability for the Qemu V3 migration protocol to include transporting network configuration. A generic framework is proposed with this patch to allow for the transfer of opaque data. Functionally this all looks good (and sounds like it lives up

Re: [libvirt] [PATCH 3/3] qemu_migration: Transport Open vSwitch per-port data during live migration

2012-09-28 Thread Laine Stump
On 09/21/2012 05:16 PM, Kyle Mestery wrote: Transport Open vSwitch per-port data during live migration by using the utility functions virNetDevOpenvswitchGetMigrateData() and virNetDevOpenvswitchSetMigrateData(). I like how the first part is all re-usable infrastructure, and the final patch

Re: [libvirt] virsh --connect not working

2012-09-28 Thread Jason Helfman
On Fri, Sep 28, 2012 at 8:53 AM, Daniel P. Berrange berra...@redhat.comwrote: On Fri, Sep 28, 2012 at 08:51:40AM -0700, hiren panchasara wrote: On Fri, Sep 28, 2012 at 8:40 AM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Sep 28, 2012 at 08:37:54AM -0700, hiren panchasara wrote:

Re: [libvirt] virsh --connect not working

2012-09-28 Thread hiren panchasara
On Fri, Sep 28, 2012 at 9:14 AM, Jason Helfman j...@freebsd.org wrote: On Fri, Sep 28, 2012 at 8:53 AM, Daniel P. Berrange berra...@redhat.comwrote: Looks somewhat like your libvirt has been built without support for the QEMU driver Daniel Thanks for looking into it, Daniel. Libvirt

Re: [libvirt] [PATCH 0/3] Transport network port data during live migration

2012-09-28 Thread Daniel P. Berrange
On Fri, Sep 21, 2012 at 05:16:45PM -0400, Kyle Mestery wrote: This series of commits has the end goal of allowing per-port data stored in the Open vSwitch DB to be transported during live migration. This is done by first providing a generic infrastructure for transporting network data, adding

Re: [libvirt] [PATCH 1/3] qemu_migration: Add hooks to transport network port data during migration

2012-09-28 Thread Eric Blake
On 09/28/2012 10:14 AM, Laine Stump wrote: On 09/21/2012 05:16 PM, Kyle Mestery wrote: Add the ability for the Qemu V3 migration protocol to include transporting network configuration. A generic framework is proposed with this patch to allow for the transfer of opaque data. Functionally

[libvirt] [libvirt-glib 1/2] gobject: Handle PMSUSPENDED state from libvirt

2012-09-28 Thread Christophe Fergeau
Emit a signal when switching to the PMSUSPENDED state, and add an enum entry to describe this state. This avoids runtime warnings with newer libvirt. --- libvirt-gobject/libvirt-gobject-connection.c | 7 +++ libvirt-gobject/libvirt-gobject-domain.c | 11 +++

[libvirt] [libvirt-glib 2/2] gobject: Emit a signal on WAKEUP events

2012-09-28 Thread Christophe Fergeau
This avoids a runtime warning about this kind of event not being handled. --- libvirt-gobject/libvirt-gobject-connection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c index ad7aa07..9628989

[libvirt] Patch to default selinuxfs mount point to /sys/fs/selinux

2012-09-28 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Currently if you build on a machine that does not support SELinux we end up with the default mount point being /selinux, since this is moved to /sys/fs/selinux, we should start defaulting there. I believe this is causing a bug in libvirt-lxc when

Re: [libvirt] Patch to default selinuxfs mount point to /sys/fs/selinux

2012-09-28 Thread Eric Blake
On 09/28/2012 12:11 PM, Daniel J Walsh wrote: OpenPGP: *Attachments to this message have not been signed or encrypted* Currently if you build on a machine that does not support SELinux we end up with the default mount point being /selinux, since this is moved to /sys/fs/selinux, we should

Re: [libvirt] [PATCH 0/3] Transport network port data during live migration

2012-09-28 Thread Kyle Mestery (kmestery)
On Sep 28, 2012, at 11:42 AM, Daniel P. Berrange wrote: On Fri, Sep 21, 2012 at 05:16:45PM -0400, Kyle Mestery wrote: This series of commits has the end goal of allowing per-port data stored in the Open vSwitch DB to be transported during live migration. This is done by first providing a

Re: [libvirt] [PATCH 1/3] qemu_migration: Add hooks to transport network port data during migration

2012-09-28 Thread Kyle Mestery (kmestery)
On Sep 28, 2012, at 11:14 AM, Laine Stump wrote: On 09/21/2012 05:16 PM, Kyle Mestery wrote: Add the ability for the Qemu V3 migration protocol to include transporting network configuration. A generic framework is proposed with this patch to allow for the transfer of opaque data.

Re: [libvirt] TSC scaling interface to management

2012-09-28 Thread Marcelo Tosatti
On Tue, Sep 25, 2012 at 11:08:58AM +0100, Daniel P. Berrange wrote: On Wed, Sep 12, 2012 at 12:39:39PM -0300, Marcelo Tosatti wrote: HW TSC scaling is a feature of AMD processors that allows a multiplier to be specified to the TSC frequency exposed to the guest. KVM also contains