Re: [libvirt] doc: write separate module for hostdev passthrough and in-use tracking

2013-03-25 Thread Chunyan Liu
2013/3/22 Osier Yang jy...@redhat.com: On 2013年03月22日 17:36, Chunyan Liu wrote: Hi, List, As the mail I've sent a week before: https://www.redhat.com/archives/libvir-list/2013-March/msg00730.html I'm willing to push this work forward so that the passthrough APIs could be reused by qemu

[libvirt] [PATCH] python: set default value to optional arguments

2013-03-25 Thread Guannan Ren
When prefixing with string (optional) or optional in the description of arguments to libvirt C APIs, in python, these arguments will be set as optional arugments, for example: * virDomainSaveFlags: * @domain: a domain object * @to: path for the output file * @dxml: (optional) XML config for

[libvirt] [libvirt-sandbox][PATCH] Docs: update network options configuration

2013-03-25 Thread Alex Jia
Signed-off-by: Alex Jia a...@redhat.com --- bin/virt-sandbox-service-create.pod |7 ++- bin/virt-sandbox.c |7 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service-create.pod b/bin/virt-sandbox-service-create.pod index

[libvirt] [PATCH] log: Separate thread ID from timestemp in ring buffer

2013-03-25 Thread Jiri Denemark
When we write a log message into a log, we separate thread ID from timestamp using : . However, when storing the message into the ring buffer, we omitted the separator, e.g.: 2013-02-27 11:49:11.852+3745: ... --- src/util/virlog.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [libvirt] [PATCH] log: Separate thread ID from timestemp in ring buffer

2013-03-25 Thread Peter Krempa
On 03/25/13 11:43, Jiri Denemark wrote: When we write a log message into a log, we separate thread ID from timestamp using : . However, when storing the message into the ring buffer, we omitted the separator, e.g.: 2013-02-27 11:49:11.852+3745: ... --- src/util/virlog.c | 1 + 1

Re: [libvirt] [PATCH v2] qemu: Don't set address type too early during virtio disk hotplug

2013-03-25 Thread Guido Günther
On Fri, Mar 22, 2013 at 06:52:46PM +0100, Guido Günther wrote: f946462e14ac036357b7c11ce5c23f94a3ee4e49 changed behavior by settings VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI upfront. If we do so before invoking qemuDomainPCIAddressEnsureAddr we merely try to set the PCI slot via

Re: [libvirt] [PATCH] lxc: Prevent shutting down the host

2013-03-25 Thread Martin Kletzander
On 03/23/2013 09:25 PM, Doug Goldstein wrote: On Sat, Mar 23, 2013 at 5:21 AM, Martin Kletzander mklet...@redhat.com wrote: On 03/22/2013 06:17 PM, Daniel P. Berrange wrote: On Thu, Mar 21, 2013 at 04:10:45PM +0100, Martin Kletzander wrote: When the container has the same '/dev' mount as

Re: [libvirt] [PATCH v2 0/4]Add startupPolicy attribute support for hard disks

2013-03-25 Thread Guannan Ren
On 03/19/2013 09:55 PM, Guannan Ren wrote: v1 to v2: added relax schema for disk of block and dir type removed original patch 3/5. The set of patches is trying to add 'startupPolicy' attribute support to the source element of hard disks. Policy levels are using the mandatory,

Re: [libvirt] [PATCH] make: obey WITH_TESTS; do not run test suite when --enable-test-suite=no

2013-03-25 Thread Eric Blake
On 03/24/2013 04:54 PM, TJ wrote: make: obey WITH_TESTS; do not run test suite when --enable-test-suite=no Even when --enable-test-suite=no a build would run the test suite. Fix the Makefile so that tests are conditional on WITH_TESTS. Signed-off-by: TJ libv...@iam.tj --- Makefile.am

Re: [libvirt] [PATCH] virsh: Fix docs for virsh setmaxmem

2013-03-25 Thread Peter Krempa
On 03/22/13 22:01, Eric Blake wrote: On 03/22/2013 04:08 AM, Peter Krempa wrote: The docs assumed the command works always for QEMU and other hypervisors. Unfortunately until qemu will add memory hotplug this can't be done. Fix the docs to mention this limitation. The setmaxmem command

[libvirt] Entering freeze for libvirt-1.0.4

2013-03-25 Thread Daniel Veillard
Based on the discussions from last week, we are entering freeze now, I tagged v1.0.4-rc1 in git and pushed libvirt-1.0.4-rc1.tar.gz as well as rpms for F17 at the usual place: ftp://libvirt.org/libvirt/ This looks functional for my limited testing, but give it a try. Hopefully since

[libvirt] [PATCH 2/5] util: allow using virCommandAllowCap with setuid helpers

2013-03-25 Thread Paolo Bonzini
When running unprivileged, virSetUIDGIDWithCaps will fail because it tries to add the requested capabilities to the permitted and effective sets. Detect this case, and invoke the child with cleared permitted and effective sets. If it is a setuid program, it will get them. Some care is needed

[libvirt] [PATCH 4/5] virnetdevtap: add virNetDevTapGetName

2013-03-25 Thread Paolo Bonzini
This will be used on a tap file descriptor returned by the bridge helper to populate the target element, because the helper does not provide the interface name. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virnetdevtap.c | 33

[libvirt] [PATCH 3/5] qemu_conf: add new configuration key bridge_helper

2013-03-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf | 8 src/qemu/qemu_conf.c | 3 +++ src/qemu/qemu_conf.h | 1 + src/qemu/test_libvirtd_qemu.aug.in | 1 + 5 files changed, 14

[libvirt] [PATCH 1/5] util: simplify virSetUIDGIDWithCaps

2013-03-25 Thread Paolo Bonzini
The need_prctl variable is not really needed. If it is false, capng_apply will be called twice with the same set, causing a little extra work but no problem. This keeps the code a bit simpler. It is also clearer to invoke capng_apply(CAPNG_SELECT_BOUNDS) separately, to make sure it is done

[libvirt] [PATCH 5/5] qemu: launch bridge helper from libvirtd

2013-03-25 Thread Paolo Bonzini
source type='bridge' uses a helper application to do the necessary TUN/TAP setup to use an existing network bridge, thus letting unprivileged users use TUN/TAP interfaces. However, libvirt should be preventing QEMU from running any setuid programs at all, which would include this helper program.

[libvirt] [PATCH 0/5] qemu: invoke qemu-bridge-helper from libvirtd

2013-03-25 Thread Paolo Bonzini
The interface type='bridge' is working mostly because of a bad design decision in Linux. Ideally, QEMU would run with an empty capability bounding set and would not be able to do any privileged operation (not even by running a helper program). This is not the case because dropping capabilities

Re: [libvirt] [PATCH] Revert qemu: detect multi-head qxl via more than version check

2013-03-25 Thread Eric Blake
On 03/15/2013 12:33 PM, Eric Blake wrote: This reverts commit 5ac846e42e5b7e0475f6aa9cc1e0b0c8dac84d44. Ping - this really needs to go in 1.0.4. After further discussions with Alon Levy, I learned the following: The use of '-vga qxl' vs. '-device qxl-vga' is completely orthogonal to

Re: [libvirt] Entering freeze for libvirt-1.0.4

2013-03-25 Thread Osier Yang
On 25/03/13 21:42, Daniel Veillard wrote: Based on the discussions from last week, we are entering freeze now, I tagged v1.0.4-rc1 in git and pushed libvirt-1.0.4-rc1.tar.gz as well as rpms for F17 at the usual place: ftp://libvirt.org/libvirt/ This looks functional for my limited

Re: [libvirt] [PATCH] libvirt-guests: newline between output sentences

2013-03-25 Thread Eric Blake
On 03/20/2013 10:08 PM, Osier Yang wrote: On 2013年03月20日 22:56, Eric Blake wrote: Right now, libvirt-guests gives awkward output. It's possible to force faster failure by setting /etc/sysconfig/libvirt-guests to use: * tools/libvirt-guests.sh.in (shutdown_guest): Add missing newline.

Re: [libvirt] [PATCH] python: set default value to optional arguments

2013-03-25 Thread Martin Kletzander
On 03/25/2013 10:18 AM, Guannan Ren wrote: When prefixing with string (optional) or optional in the description of arguments to libvirt C APIs, in python, these arguments will be set as optional arugments, for example: * virDomainSaveFlags: * @domain: a domain object * @to: path for the

[libvirt] [PATCH] Fix virConnectOpen.*() name requirements

2013-03-25 Thread Martin Kletzander
virConnectOpenAuth didn't require 'name' to be specified (VIR_DEBUG used NULLSTR() for the output) and by default, if name == NULL, the default connection uri is used. This was not indicated in the documentation and wasn't checked for in other API's VIR_DEBUG outputs. --- Thanks to Guannan's

[libvirt] [PATCH 0/7 v3] Persistent vHBA support in storage driver

2013-03-25 Thread Osier Yang
v2: https://www.redhat.com/archives/libvir-list/2013-February/msg00118.html v2 - v3: * 6/8 of v1 is ACKed/pushed. * Use virStringToLong_ui instead of sscanf * Fixed various nits pointed out by John This is the 3rd part to implement NPIV migration support [1]. Part 1: (pushed)

[libvirt] [PATCH 6/7] storage: Add startPool and stopPool for scsi backend

2013-03-25 Thread Osier Yang
startPool creates the vHBA if it's not existed yet, stopPool destroys the vHBA. Also to support autostart, checkPool will creates the vHBA if it's not existed yet. --- src/storage/storage_backend_scsi.c | 64 ++ 1 file changed, 64 insertions(+) diff --git

[libvirt] [PATCH 5/7] util: Add helper to get the scsi host name by iterating over sysfs

2013-03-25 Thread Osier Yang
The helper iterates over sysfs, to find out the matched scsi host name by comparing the wwnn,wwpn pair. It will be used by checkPool and refreshPool of storage scsi backend. New helper getAdapterName is introduced in storage_backend_scsi.c, which uses the new util helper virGetFCHostNameByWWN to

[libvirt] [PATCH 7/7] storage: Guess the parent if it's not specified for vHBA

2013-03-25 Thread Osier Yang
This finds the parent for vHBA by iterating over all the HBA which supports vport_ops capability on the host, and return the first one which is online, not saturated (vports in use is less than max_vports). --- src/libvirt_private.syms | 1 + src/storage/storage_backend_scsi.c | 10

[libvirt] [PATCH 1/7] New XML attributes for storage pool source adapter

2013-03-25 Thread Osier Yang
This introduces 4 new attributes for storage pool source adapter. E.g. adapter type='fc_host' parent='scsi_host5' wwnn='2000c9831b4b' wwpn='1000c9831b4b'/ Attribute 'type' can be either 'scsi_host' or 'fc_host', and defaults to 'scsi_host' if attribute 'name' is specified. I.e. It's

[libvirt] [PATCH 4/7] phyp: Prohibit fc_host adapter for phyp driver

2013-03-25 Thread Osier Yang
It's possible to support fc_host adapter for phyp driver too, but at this stage I'd like to not allow it when I'm not that clear how it works. --- src/phyp/phyp_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index

[libvirt] [PATCH 3/7] storage: Move virStorageBackendSCSIGetHostNumber into iscsi backend

2013-03-25 Thread Osier Yang
It's only used by iscsi backend. --- src/storage/storage_backend_iscsi.c | 39 - src/storage/storage_backend_scsi.c | 39 - src/storage/storage_backend_scsi.h | 3 --- 3 files changed, 38 insertions(+), 43 deletions(-)

[libvirt] [PATCH 2/7] storage: Make the adapter name be consistent with node device driver

2013-03-25 Thread Osier Yang
node device driver names the HBA like scsi_host5, but storage driver uses host5, which could make the user confused. This changes them to be consistent. However, for back-compat reason, adapter name like host5 is still supported. v1 - v2: * Use virStrToLong_ui instead of sscanf * No tests

Re: [libvirt] [PATCH] Fix virConnectOpen.*() name requirements

2013-03-25 Thread Martin Kletzander
On 03/25/2013 04:54 PM, Martin Kletzander wrote: virConnectOpenAuth didn't require 'name' to be specified (VIR_DEBUG used NULLSTR() for the output) and by default, if name == NULL, the default connection uri is used. This was not indicated in the documentation and wasn't checked for in other

[libvirt] [PATCHv4 10/9] virCaps: Get rid of defaultConsoleTargetType callback

2013-03-25 Thread Peter Krempa
This patch refactors various places to allow removing of the defaultConsoleTargetType callback from the virCaps structure. A new console character device target type is introduced - VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was specified in the XML. This type is at the end

[libvirt] [PATCH] virsh: Let the compiler check usage of all fields in vshCmdOptType enum

2013-03-25 Thread Peter Krempa
Get rid of the default labels to do so. --- tools/virsh.c | 4 1 file changed, 4 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index b574d7e..0a9ac6f 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -1172,8 +1172,6 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)

Re: [libvirt] [PATCH] Revert qemu: detect multi-head qxl via more than version check

2013-03-25 Thread Jiri Denemark
On Mon, Mar 25, 2013 at 08:48:02 -0600, Eric Blake wrote: On 03/15/2013 12:33 PM, Eric Blake wrote: This reverts commit 5ac846e42e5b7e0475f6aa9cc1e0b0c8dac84d44. Ping - this really needs to go in 1.0.4. ACK Jirka -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] virsh: Let the compiler check usage of all fields in vshCmdOptType enum

2013-03-25 Thread Peter Krempa
On 03/25/13 17:21, Peter Krempa wrote: Get rid of the default labels to do so. --- tools/virsh.c | 4 1 file changed, 4 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index b574d7e..0a9ac6f 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -1172,8 +1172,6 @@

Re: [libvirt] [PATCH] python: set default value to optional arguments

2013-03-25 Thread Martin Kletzander
On 03/25/2013 04:28 PM, Martin Kletzander wrote: On 03/25/2013 10:18 AM, Guannan Ren wrote: When prefixing with string (optional) or optional in the description of arguments to libvirt C APIs, in python, these arguments will be set as optional arugments, for example: [...] We have a check

Re: [libvirt] [PATCH] Revert qemu: detect multi-head qxl via more than version check

2013-03-25 Thread Eric Blake
On 03/25/2013 10:24 AM, Jiri Denemark wrote: On Mon, Mar 25, 2013 at 08:48:02 -0600, Eric Blake wrote: On 03/15/2013 12:33 PM, Eric Blake wrote: This reverts commit 5ac846e42e5b7e0475f6aa9cc1e0b0c8dac84d44. Ping - this really needs to go in 1.0.4. ACK Thanks; pushed. -- Eric Blake

Re: [libvirt] [PATCH] virsh: Let the compiler check usage of all fields in vshCmdOptType enum

2013-03-25 Thread Eric Blake
On 03/25/2013 10:31 AM, Peter Krempa wrote: On 03/25/13 17:21, Peter Krempa wrote: Get rid of the default labels to do so. --- tools/virsh.c | 4 1 file changed, 4 deletions(-) case VSH_OT_ALIAS: continue; -default: -

[libvirt] [PATCH] net: use newer iptables syntax

2013-03-25 Thread Stefan Seyfried
Hi all, iptables-1.4.18 removed the long deprecated state match. Use conntrack instead in forwarding rules. Fixes openSUSE bug https://bugzilla.novell.com/811251 #811251. real patch is attached as I'm pretty sure that thunderbird will mess it up otherwise :( Basically it's s/--match

Re: [libvirt] [PATCHv4 1/9] conf: Add post XML parse callbacks and prepare for cleaning of virCaps

2013-03-25 Thread Laine Stump
On 03/15/2013 11:26 AM, Peter Krempa wrote: This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued requesing to fill and

Re: [libvirt] [Qemu-devel] libvirt-QEMU interfaces for CPU models

2013-03-25 Thread Eduardo Habkost
On Fri, Mar 01, 2013 at 11:56:00PM +0100, Jiri Denemark wrote: [...] = Getting information about CPU models = Requirement: libvirt uses the predefined CPU models from QEMU, but it needs to be able to query for CPU model details, to find out how it can create a VM that

Re: [libvirt] [PATCHv4 2/9] qemu: Record the default NIC model in the domain XML

2013-03-25 Thread Laine Stump
On 03/15/2013 11:26 AM, Peter Krempa wrote: This patch implements the devices post parse cllback and uses it to fill the default qemu network card model into the XML if none is specified. Libvirt assumes that the network card model for qemu is the rtl8139. Record this in the XML using the new

Re: [libvirt] [PATCHv4 6/9] conf: Enforce ranges on cputune variables

2013-03-25 Thread Laine Stump
On 03/15/2013 11:26 AM, Peter Krempa wrote: The limits are documented at http://libvirt.org/formatdomain.html#elementsCPUTuning . Enforce them when going through XML parsing in addition to being enforced by the API. What's the rationale for doing this validation during the post-parse rather

[libvirt] [PATCH] Remove the redundant parentheses in migrate help

2013-03-25 Thread Yanbing Du
Signed-off-by: Yanbing Du y...@redhat.com --- tools/virsh-domain.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 128e516..592a6e8 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8286,7 +8286,7 @@ static

Re: [libvirt] [PATCH] net: use newer iptables syntax

2013-03-25 Thread Hu Tao
On Mon, Mar 25, 2013 at 08:39:40PM +0100, Stefan Seyfried wrote: Hi all, iptables-1.4.18 removed the long deprecated state match. Use conntrack instead in forwarding rules. Fixes openSUSE bug https://bugzilla.novell.com/811251 #811251. real patch is attached as I'm pretty sure that

Re: [libvirt] [PATCH] Remove the redundant parentheses in migrate help

2013-03-25 Thread Hu Tao
On Tue, Mar 26, 2013 at 11:02:17AM +0800, Yanbing Du wrote: Signed-off-by: Yanbing Du y...@redhat.com --- tools/virsh-domain.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 128e516..592a6e8 100644 ---

Re: [libvirt] [PATCH] Remove the redundant parentheses in migrate help

2013-03-25 Thread Guannan Ren
On 03/26/2013 11:27 AM, Hu Tao wrote: On Tue, Mar 26, 2013 at 11:02:17AM +0800, Yanbing Du wrote: Signed-off-by: Yanbing Du y...@redhat.com --- tools/virsh-domain.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index

Re: [libvirt] [PATCH] python: set default value to optional arguments

2013-03-25 Thread Guannan Ren
On 03/26/2013 12:48 AM, Martin Kletzander wrote: On 03/25/2013 04:28 PM, Martin Kletzander wrote: On 03/25/2013 10:18 AM, Guannan Ren wrote: When prefixing with string (optional) or optional in the description of arguments to libvirt C APIs, in python, these arguments will be set as optional