Re: [libvirt] [Qemu-devel] [PATCH v4 3/7] qapi: Add pass-fd QMP command

2012-06-22 Thread Eric Blake
On 06/22/2012 12:36 PM, Corey Bryant wrote: > This patch adds the pass-fd QMP command using the QAPI framework. > Like the getfd command, it is used to pass a file descriptor via > SCM_RIGHTS and associate it with a name. However, the pass-fd > command also returns the received file descriptor, wh

Re: [libvirt] [Qemu-devel] [PATCH v4 7/7] osdep: Enable qemu_open to dup pre-opened fd

2012-06-22 Thread Eric Blake
On 06/22/2012 12:36 PM, Corey Bryant wrote: > This patch adds support to qemu_open to dup(fd) a pre-opened file > descriptor if the filename is of the format /dev/fd/X. > > This can be used when QEMU is restricted from opening files, and > the management application opens files on QEMU's behalf. >

Re: [libvirt] [Qemu-devel] [PATCH v4 1/7] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg

2012-06-22 Thread Eric Blake
On 06/22/2012 12:36 PM, Corey Bryant wrote: > This sets the close-on-exec flag for the file descriptor received > via SCM_RIGHTS. > > Signed-off-by: Corey Bryant > --- > v4 > -This patch is new in v4 (ebl...@redhat.com) > > qemu-char.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

[libvirt] [PATCH v4 3/7] qapi: Add pass-fd QMP command

2012-06-22 Thread Corey Bryant
This patch adds the pass-fd QMP command using the QAPI framework. Like the getfd command, it is used to pass a file descriptor via SCM_RIGHTS and associate it with a name. However, the pass-fd command also returns the received file descriptor, which is a difference in behavior from the getfd comma

[libvirt] [PATCH v4 6/7] block: Convert open calls to qemu_open

2012-06-22 Thread Corey Bryant
This patch converts all block layer open calls to qemu_open. This enables all block layer open paths to dup(X) a pre-opened file descriptor if the filename is of the format /dev/fd/X. This is useful if QEMU is restricted from opening certain files. Note that this adds the O_CLOEXEC flag to the c

[libvirt] [PATCH v4 1/7] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg

2012-06-22 Thread Corey Bryant
This sets the close-on-exec flag for the file descriptor received via SCM_RIGHTS. Signed-off-by: Corey Bryant --- v4 -This patch is new in v4 (ebl...@redhat.com) qemu-char.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index c2aaaee..f890113

[libvirt] [PATCH v4 7/7] osdep: Enable qemu_open to dup pre-opened fd

2012-06-22 Thread Corey Bryant
This patch adds support to qemu_open to dup(fd) a pre-opened file descriptor if the filename is of the format /dev/fd/X. This can be used when QEMU is restricted from opening files, and the management application opens files on QEMU's behalf. If the fd was passed to the monitor with the pass-fd c

[libvirt] [PATCH v4 2/7] qapi: Convert getfd and closefd

2012-06-22 Thread Corey Bryant
Signed-off-by: Corey Bryant --- v2: -Convert getfd and closefd to QAPI (lcapitul...@redhat.com) -Remove changes that returned fd from getfd (lcapitul...@redhat.com) -Wrap hmp_* functions around qmp_* functions (kw...@redhat.com) -Move hmp_* functions to hmp.c (lcapitul...@redhat.com) -Drop .u

[libvirt] [PATCH v4 4/7] qapi: Re-arrange monitor.c functions

2012-06-22 Thread Corey Bryant
Signed-off-by: Corey Bryant --- v4: -This patch is new in v4. monitor.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/monitor.c b/monitor.c index 3433c06..153e949 100644 --- a/monitor.c +++ b/monitor.c @@ -2239,26 +2239,6 @@ sta

[libvirt] [PATCH v4 0/7] file descriptor passing using pass-fd

2012-06-22 Thread Corey Bryant
libvirt's sVirt security driver provides SELinux MAC isolation for Qemu guest processes and their corresponding image files. In other words, sVirt uses SELinux to prevent a QEMU process from opening files that do not belong to it. sVirt provides this support by labeling guests and resources with

[libvirt] [PATCH v4 5/7] block: Prevent /dev/fd/X filename from being detected as floppy

2012-06-22 Thread Corey Bryant
Reported-by: Kevin Wolf Reviewed-by: Paolo Bonzini Signed-off-by: Corey Bryant --- v3: -This patch is new in v3. It was previously submitted on its own, and is now being included in this series. v4 -Moved patch to be earlier in series (lcapitul...@redhat.com) block/raw-posix.c |4 +++

Re: [libvirt] libvirtd deadlock on shutdown

2012-06-22 Thread Jim Fehlig
Hu Tao wrote: >> >From 583be33213e922899b23f036494886397b2549dc Mon Sep 17 00:00:00 2001 >> From: Jim Fehlig >> Date: Thu, 21 Jun 2012 09:21:44 -0600 >> Subject: [PATCH] Fix deadlock on libvirtd shutdown >> >> When shutting down libvirtd, the virNetServer shutdown can deadlock >> if there are in-f

Re: [libvirt] [Qemu-devel] qemu -numa option and non-contiguous CPU ranges

2012-06-22 Thread Eduardo Habkost
On Fri, Jun 22, 2012 at 11:00:57AM +0100, Daniel P. Berrange wrote: > On Thu, Jun 21, 2012 at 11:39:46PM +0200, Andre Przywara wrote: > > On 06/21/2012 07:51 PM, Eduardo Habkost wrote: > > >Hi, > > > > > >I just noticed libvirt tries to use the -numa option in a way that qemu > > >never understood:

[libvirt] [PATCH] virsh: Check for existence of storage before undefining the domain

2012-06-22 Thread Peter Krempa
When undefining a domain and removing associated storage using "virsh undefine --storage" the domain was at first undefined and after that the storage removal proces was started. If the user specified an invalid disk to remove, the error could not be corrected. This patch moves enumeration and fil

Re: [libvirt] [PATCH] virsh: Add domdisplay command for VNC and SPICE

2012-06-22 Thread Michal Privoznik
On 22.06.2012 07:30, Doug Goldstein wrote: > Add a new 'domdisplay' command that provides a URI for both VNC and > SPICE connections. Presently the 'vncdisplay' command provides you with > the port info that QEMU is listening on but there is no counterpart for > SPICE. Additionally this provides yo

[libvirt] This patch creates a mount point for libvirt-lxc containers to mount on the destination system if it does not exist.

2012-06-22 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Currently libvirt-lxc checks to see if the destination exists and is a directory. If it is not a directory then the mount fails. Since libvirt-lxc can bind mount files on an inode, this patch is needed to allow us to bind mount files on files. Curre

[libvirt] This patch mounts /run and /var/run before running a sandbox container

2012-06-22 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 We do not want to share /run between containers and the host. This patch mounts a tmpfs on /run and then bind mounts /run on /var/run. Reason this is pach 0003 is that this is a part of a previous patch set that was never applied. Sorry to those who

[libvirt] [PATCH] conf: Fill listenAddr from driver if none set

2012-06-22 Thread Michal Privoznik
Currently, if domain's graphic has no listenAddr set we provide the one from qemu.conf. However, we must make this transient to not overwrite future changes to the config file. Moreover, we have to store this into domain state XML so we remain consistent on eventual config file edits. --- Since use

[libvirt] [PATCH] storage backend rbd: Do not prefix rbd: on volume names.

2012-06-22 Thread Wido den Hollander
We used to prefix 'rbd:' to volume names, this is not necessary. Qemu takes RBD devices in this way, like: qemu -drive rbd:pool/image When attaching a network disk like RBD to a guest we however do not use this prefix. Currently you can't map a RBD volume name directly to a domain without remov

[libvirt] KVM Forum and oVirt Workshop Europe 2012 Save the Date

2012-06-22 Thread KVM Forum 2012 Program Committee
KVM is an industry leading open source hypervisor that provides an ideal platform for datacenter virtualization, virtual desktop infrastructure, and cloud computing. Once again, it's time to bring together the community of developers and users that define the KVM ecosystem for our annual technical

[libvirt] [PATCHv2 5/5] S390: Adding testcases for s390

2012-06-22 Thread Viktor Mihajlovski
Add minimal s390-virtio domain testcase and testcases for virtio serial, net, disk for the virtio-s390 bus. Signed-off-by: Viktor Mihajlovski --- .../qemuxml2argv-console-virtio-s390.args |9 ++ .../qemuxml2argv-console-virtio-s390.xml | 24 +++ .../qemux

[libvirt] [PATCH v3/5] S390: Add support for virtio-s390 devices.

2012-06-22 Thread Viktor Mihajlovski
The s390(x) architecture doesn't feature a PCI bus. For the purpose of supporting virtio devices a virtual bus called virtio-s390 is used. A new address type VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390 is used to distinguish the virtio devices on s390 from PCI-based virtio devices. Signed-off-by: V

[libvirt] [PATCH v1/5] S390: Extended qemuDomainAssignAddresses to be callable from everywhere.

2012-06-22 Thread Viktor Mihajlovski
This is in preparation of the enablement of s390 guests with virtio devices. The assignment of device addresses happens in different places, i.e. the qemu driver and process modules as well as in the unit tests in slightly different flavors. Currently, these are PPC spapr-vio and PCI devices, virt

[libvirt] [PATCHv2 1/5] S390: Override QEMU_CAPS_NO_ACPI for s390x

2012-06-22 Thread Viktor Mihajlovski
Starting a KVM guest on s390 fails immediately. This is because "qemu --help" reports -no-acpi even for the s390(x) architecture but -no-acpi isn't supported there. Workaround is to remove QEMU_CAPS_NO_ACPI from the capability set after the version/capability extraction. Signed-off-by: Viktor Miha

[libvirt] [PATCHv2 0/5] Virtio support for S390

2012-06-22 Thread Viktor Mihajlovski
Resending as a thread, same content. Please ignore previous submission. This series adds support for the s390 flavor of virtio devices. Since the s390 virtio devices are not implemented as PCI devices it is necessary to refactor some of the device address assignment code. Viktor Mihajlovski (5):

[libvirt] [PATCHv2 5/5] S390: Added sysinfo for host on s390x.

2012-06-22 Thread Viktor Mihajlovski
From: Thang Pham In order to retrieve some sysinfo data we need to parse /proc/sysinfo and /proc/cpuinfo. Signed-off-by: Thang Pham Signed-off-by: Viktor Mihajlovski --- src/util/sysinfo.c | 154 1 files changed, 154 insertions(+), 0 delet

[libvirt] [PATCHv2 4/5] S390: Fixed core identification for s390

2012-06-22 Thread Viktor Mihajlovski
For the s390x architecture the sysfs core_id alone is not unique. As a result it can happen that libvirt thinks there are less host CPUs available than really present. Currently, a logical CPU is equivalent to a core for s390x. We therefore produce a fake core id from the CPU number. Signed-off-by

[libvirt] [PATCHv2 3/5] S390: Fixed Parser for /proc/cpuinfo needs to be adapted for your architecture

2012-06-22 Thread Viktor Mihajlovski
From: Thang Pham Minimal CPU "parser" for s390 to avoid compile time warning. Signed-off-by: Thang Pham Signed-off-by: Viktor Mihajlovski --- src/nodeinfo.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index f7d0cc6..7eb5ae5 1006

[libvirt] [PATCH v2/5] S390: Change tests to use (modified) qemuDomainAssignAddresses

2012-06-22 Thread Viktor Mihajlovski
Rewrote the device assignment parts in tests to use qemuDomainAssignAddresses. This way the tests will work for new device address types as they show up in the future (like s390 device types). Signed-off-by: Viktor Mihajlovski --- tests/qemuxml2argvtest.c | 12 +--- tests/qemuxmlnstest

[libvirt] [PATCHv2 0/5] Basic Enablement of s390

2012-06-22 Thread Viktor Mihajlovski
Resending as a thread, same content. Please ignore previous submission. The first series of patches aimed to enable libvirt to manage qemu/kvm domains hosted on the System z platform. The patches in this series address s390 specifics of node and hypervisor. Patches 2,3 and 5 are written by Thang

[libvirt] [PATCHv2 2/5] S390: CPU support for s390(x)

2012-06-22 Thread Viktor Mihajlovski
From: Thang Pham Adding CPU encoder/decoder for s390 to avoid runtime error messages. Signed-off-by: Thang Pham Signed-off-by: Viktor Mihajlovski --- src/Makefile.am |1 + src/cpu/cpu.c |2 + src/cpu/cpu_s390x.c | 80 +++ src

[libvirt] [PATCHv2 4/5] S390: Domain Schema for s390-virtio machines.

2012-06-22 Thread Viktor Mihajlovski
Added s390-virtio machine type to the XML schema for domains in order to not fail the domain schema tests. Signed-off-by: Viktor Mihajlovski --- docs/schemas/domaincommon.rng | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/docs/schemas/domaincommon.rn

Re: [libvirt] [PATCH 0/5] Basic Enablement of s390

2012-06-22 Thread Viktor Mihajlovski
On 06/22/2012 06:22 AM, Eric Blake wrote: On 06/21/2012 10:11 AM, Viktor Mihajlovski wrote: Hi, although there's already some code in libvirt for qemu on s390 it has experienced a certain level of degradation over time. Or, to put it short: it is not compatible with upstream qemu/kvm. Thank

Re: [libvirt] [PATCH] virsh: Add domdisplay command for VNC and SPICE

2012-06-22 Thread Daniel P. Berrange
On Fri, Jun 22, 2012 at 01:18:49PM +0200, Michal Privoznik wrote: > On 22.06.2012 12:07, Daniel P. Berrange wrote: > > On Fri, Jun 22, 2012 at 10:19:06AM +0200, Michal Privoznik wrote: > >> On 22.06.2012 07:38, Doug Goldstein wrote: > >>> On Fri, Jun 22, 2012 at 12:30 AM, Doug Goldstein > >>> wro

Re: [libvirt] [PATCH] virsh: Add domdisplay command for VNC and SPICE

2012-06-22 Thread Michal Privoznik
On 22.06.2012 12:07, Daniel P. Berrange wrote: > On Fri, Jun 22, 2012 at 10:19:06AM +0200, Michal Privoznik wrote: >> On 22.06.2012 07:38, Doug Goldstein wrote: >>> On Fri, Jun 22, 2012 at 12:30 AM, Doug Goldstein wrote: Add a new 'domdisplay' command that provides a URI for both VNC and

Re: [libvirt] [PATCH][libvirt-sandbox] configure: Require higher version of glib

2012-06-22 Thread Michal Privoznik
On 22.06.2012 12:10, Daniel P. Berrange wrote: > On Fri, Jun 22, 2012 at 12:01:01PM +0200, Michal Privoznik wrote: >> On 21.06.2012 12:51, Daniel P. Berrange wrote: >>> On Thu, Jun 21, 2012 at 12:34:18PM +0200, Michal Privoznik wrote: Since commit cfd4460b we must require glib-2.32.0 at least

Re: [libvirt] [PATCH 1/5] S390: Override QEMU_CAPS_NO_ACPI for s390x

2012-06-22 Thread Viktor Mihajlovski
On 06/22/2012 11:59 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 09:50:25AM +0200, Michal Privoznik wrote: On 21.06.2012 18:15, Viktor Mihajlovski wrote: Starting a KVM guest on s390 fails immediately. This is because "qemu --help" reports -no-acpi even for the s390(x) architecture bu

[libvirt] [PATCH] Add support for guest bind mounts with LXC

2012-06-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Currently you can configure LXC to bind a host directory to a guest directory, but not to bind a guest directory to a guest directory. While the guest container init could do this itself, allowing it in the libvirt XML means a stricter SELinux policy can be written ---

[libvirt] [PATCH] Add support for RAM filesystems for LXC

2012-06-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce a new syntax for filesystems to allow use of a RAM filesystem The usage units default to KiB to limit consumption of host memory. * docs/formatdomain.html.in: Document new syntax * docs/schemas/domaincommon.rng: Add new attributes * sr

Re: [libvirt] [PATCH][libvirt-sandbox] configure: Require higher version of glib

2012-06-22 Thread Daniel P. Berrange
On Fri, Jun 22, 2012 at 12:01:01PM +0200, Michal Privoznik wrote: > On 21.06.2012 12:51, Daniel P. Berrange wrote: > > On Thu, Jun 21, 2012 at 12:34:18PM +0200, Michal Privoznik wrote: > >> Since commit cfd4460b we must require glib-2.32.0 at least > >> because we are using g_value_set_schar which

Re: [libvirt] [PATCH] virsh: Add domdisplay command for VNC and SPICE

2012-06-22 Thread Daniel P. Berrange
On Fri, Jun 22, 2012 at 10:19:06AM +0200, Michal Privoznik wrote: > On 22.06.2012 07:38, Doug Goldstein wrote: > > On Fri, Jun 22, 2012 at 12:30 AM, Doug Goldstein wrote: > >> Add a new 'domdisplay' command that provides a URI for both VNC and > >> SPICE connections. Presently the 'vncdisplay' com

Re: [libvirt] [PATCH][libvirt-sandbox] configure: Require higher version of glib

2012-06-22 Thread Michal Privoznik
On 21.06.2012 12:51, Daniel P. Berrange wrote: > On Thu, Jun 21, 2012 at 12:34:18PM +0200, Michal Privoznik wrote: >> Since commit cfd4460b we must require glib-2.32.0 at least >> because we are using g_value_set_schar which was introduced >> in that release. >> --- >> configure.ac |2 +- >> 1

Re: [libvirt] [Qemu-devel] qemu -numa option and non-contiguous CPU ranges

2012-06-22 Thread Daniel P. Berrange
On Thu, Jun 21, 2012 at 11:39:46PM +0200, Andre Przywara wrote: > On 06/21/2012 07:51 PM, Eduardo Habkost wrote: > >Hi, > > > >I just noticed libvirt tries to use the -numa option in a way that qemu > >never understood: if a node is configured to have a non-contiguous set > >of CPUs, it tries to ge

Re: [libvirt] [PATCH 1/5] S390: Override QEMU_CAPS_NO_ACPI for s390x

2012-06-22 Thread Daniel P. Berrange
On Fri, Jun 22, 2012 at 09:50:25AM +0200, Michal Privoznik wrote: > On 21.06.2012 18:15, Viktor Mihajlovski wrote: > > > > Starting a KVM guest on s390 fails immediately. This is because > > "qemu --help" reports -no-acpi even for the s390(x) architecture but > > -no-acpi isn't supported there. >

Re: [libvirt] [PATCH libvirt-glib] Add async version of gvir_domain_start

2012-06-22 Thread Christophe Fergeau
On Thu, Jun 21, 2012 at 03:12:39PM +0200, Marc-André Lureau wrote: > --- > libvirt-gobject/libvirt-gobject-domain.c | 75 > ++ > libvirt-gobject/libvirt-gobject-domain.h |9 > libvirt-gobject/libvirt-gobject.sym |3 ++ > 3 files changed, 87 insertio

Re: [libvirt] [PATCH] virsh: Add domdisplay command for VNC and SPICE

2012-06-22 Thread Christophe Fergeau
Hey, On Fri, Jun 22, 2012 at 12:30:37AM -0500, Doug Goldstein wrote: > Add a new 'domdisplay' command that provides a URI for both VNC and > SPICE connections. Presently the 'vncdisplay' command provides you with > the port info that QEMU is listening on but there is no counterpart for > SPICE. Ad

Re: [libvirt] [PATCH] virsh: Improve error when trying to change vm's cpu count 0

2012-06-22 Thread Peter Krempa
On 06/22/12 09:25, Martin Kletzander wrote: On 06/21/2012 06:36 PM, Peter Krempa wrote: This patch adds a check for the count of processors the user requests for the guest machine so that invalid values produce a more helpful error message. --- tools/virsh.c |2 +- 1 files changed, 1 inse

Re: [libvirt] [PATCH] virsh: Add domdisplay command for VNC and SPICE

2012-06-22 Thread Michal Privoznik
On 22.06.2012 07:38, Doug Goldstein wrote: > On Fri, Jun 22, 2012 at 12:30 AM, Doug Goldstein wrote: >> Add a new 'domdisplay' command that provides a URI for both VNC and >> SPICE connections. Presently the 'vncdisplay' command provides you with >> the port info that QEMU is listening on but ther

Re: [libvirt] [PATCH] Add support for shared sanlock leases

2012-06-22 Thread Federico Simoncelli
- Original Message - > From: "Eric Blake" > To: "Federico Simoncelli" > Cc: "Daniel P. Berrange" , libvir-list@redhat.com > Sent: Friday, June 22, 2012 6:19:34 AM > Subject: Re: [libvirt] [PATCH] Add support for shared sanlock leases > > On 06/21/2012 11:00 AM, Federico Simoncelli wrot

Re: [libvirt] [PATCH 1/5] S390: Override QEMU_CAPS_NO_ACPI for s390x

2012-06-22 Thread Michal Privoznik
On 21.06.2012 18:15, Viktor Mihajlovski wrote: > > Starting a KVM guest on s390 fails immediately. This is because > "qemu --help" reports -no-acpi even for the s390(x) architecture but > -no-acpi isn't supported there. > Workaround is to remove QEMU_CAPS_NO_ACPI from the capability set > after th

Re: [libvirt] [PATCH] virsh: Improve error when trying to change vm's cpu count 0

2012-06-22 Thread Martin Kletzander
On 06/21/2012 06:36 PM, Peter Krempa wrote: > This patch adds a check for the count of processors the user requests > for the guest machine so that invalid values produce a more helpful > error message. > --- > tools/virsh.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff -

Re: [libvirt] [PATCH] Allow NOCONFIGURE=1 to make autogen.sh skip ./configure

2012-06-22 Thread Martin Kletzander
On 06/21/2012 03:59 PM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Sometimes it is useful to re-bootstrap libvirt without running > through a ./configure invocation immediately. eg if you want > to run ./configure for Mingw32 rather than native. > --- > autogen.sh |2 ++ > 1