[libvirt] [PATCH] 1/1: virt-aa-helper-test cleanups

2010-09-23 Thread Jamie Strandboge
Attached is a patch for tests/virt-aa-helper-test to use sed instead of 'cat ... | sed ...', as suggested by Eric Blake. This assumes that 0001-apparmor-hostdev.patch from my last submission for usb and pci hot attach is already applied. -- Jamie Strandboge | http://www.canonical.com

[libvirt] RFC: add element

2010-09-23 Thread Eric Blake
Some hypervisors have the ability to hot-plug VCPUs exposed to the guest. Right now, libvirt XML only has the ability to describe the total number of vcpus assigned to a domain (the element under ). It has the following APIs: virConnectGetMaxVcpus - provide maximum that host can assign to g

[libvirt] [PATCH] 1/1: implement usb and pci hot attach in AppArmor driver

2010-09-23 Thread Jamie Strandboge
The AppArmor security driver has partial support for hostdev devices in that if they already exist in the XML, virt-aa-helper can find them and add them to the profile. Hot attach does not work[1] because AppArmorSetSecurityHostdevLabel and AppArmorRestoreSecurityHostdevLabel are not currently impl

Re: [libvirt] Error starting VM as a root user, but works fine as a normal (non-root) user

2010-09-23 Thread Justin Clift
On 09/24/2010 03:34 AM, Eric Blake wrote: It looks like the attempt to execute 'path/to/qemu-system-x86_64 -version' is failing, leaving an empty string instead of version output. Could this be a SELinux issue preventing the execution of a file as root that doesn't have proper labelling? Does an

Re: [libvirt] PATCH 3/4: AppArmor updates

2010-09-23 Thread Jamie Strandboge
On Thu, 2010-09-23 at 18:03 +0100, Daniel P. Berrange wrote: > On Thu, Sep 23, 2010 at 11:49:21AM -0500, Jamie Strandboge wrote: > > On Thu, 2010-09-23 at 16:10 +0100, Daniel P. Berrange wrote: > > > On Mon, Aug 16, 2010 at 02:45:02PM -0500, Jamie Strandboge wrote: > > > > Author: Jamie Strandboge

Re: [libvirt] [PATCH] esx: Allow '-' in VMX entry names

2010-09-23 Thread Justin Clift
On 09/23/2010 06:43 PM, Matthias Bolte wrote: Thanks, pushed. Hi Frank, Matthias has applied a fix for the dumpxml problem to the main libvirt source code. Would you have the time to download and try the very latest libvirt development source code, to confirm it fixes the problem? :) Rega

Re: [libvirt] [PATCH] Add automatic generation of a todo item page

2010-09-23 Thread Eric Blake
On 09/21/2010 09:42 AM, Daniel P. Berrange wrote: This adds a script to generate the todo item page from bugzilla. This requires a valid username+password for bugzilla, so it is intended that this only be run on the libvirt.org website via cron. Normal usage will just generate an empty stub page.

Re: [libvirt] [PATCH V2] virsh: rework command parsing

2010-09-23 Thread Eric Blake
On 09/16/2010 03:36 AM, Lai Jiangshan wrote: The first step is needed when we use virsh as a shell. And the usage was changed: old: virsh [options] [commands] new: virsh [options]... [ args...] virsh [options]... Actually, thinking about it more, maybe it looks better with this synopsis: vi

Re: [libvirt] Error starting VM as a root user, but works fine as a normal (non-root) user

2010-09-23 Thread Eric Blake
On 09/22/2010 11:45 PM, Harsh Bora wrote: [ha...@harshbora libvirt]$ sudo virsh create ~/testVMs/my_vm.xml error: Failed to create domain from /home/harsh/testVMs/my_vm.xml error: internal error cannot parse /home/harsh/local/qemu/bin/qemu-system-x86_64 version number in '' It looks like the at

Re: [libvirt] PATCH 1/4: AppArmor updates

2010-09-23 Thread Eric Blake
On 09/23/2010 09:08 AM, Daniel P. Berrange wrote: I tested this quite a bit more and you are correct that virt-aa-helper does not have to be adjusted. I've attached an updated patch which only adds the new test cases for the -p option. Thanks again for your review. ACK Pushed. -- Eric Bla

Re: [libvirt] [PATCH] maint: grammar cleanups

2010-09-23 Thread Eric Blake
On 09/23/2010 09:13 AM, Daniel Veillard wrote: On Wed, Sep 22, 2010 at 03:35:04PM -0600, Eric Blake wrote: * docs/logging.html.in: Fix spelling and grammar. --- This quickly grew into something large enough that I no longer feel comfortable applying it under the obvious rule, even though it onl

Re: [libvirt] PATCH 2/4: AppArmor updates

2010-09-23 Thread Eric Blake
On 09/23/2010 09:08 AM, Daniel P. Berrange wrote: On Mon, Aug 16, 2010 at 02:33:01PM -0500, Jamie Strandboge wrote: Hrmm. I always did it this. Maybe something changed and I missed it. Regardless, thanks for this feedback! :) Attached is an updated patch. ACK Pushed as-is. That leaves 3/4

Re: [libvirt] PATCH 3/4: AppArmor updates

2010-09-23 Thread Daniel P. Berrange
On Thu, Sep 23, 2010 at 11:49:21AM -0500, Jamie Strandboge wrote: > On Thu, 2010-09-23 at 16:10 +0100, Daniel P. Berrange wrote: > > On Mon, Aug 16, 2010 at 02:45:02PM -0500, Jamie Strandboge wrote: > > > Author: Jamie Strandboge > > > Description: AppArmor example profile adjustments: > > > - li

Re: [libvirt] PATCH 3/4: AppArmor updates

2010-09-23 Thread Jamie Strandboge
On Thu, 2010-09-23 at 16:10 +0100, Daniel P. Berrange wrote: > On Mon, Aug 16, 2010 at 02:45:02PM -0500, Jamie Strandboge wrote: > > Author: Jamie Strandboge > > Description: AppArmor example profile adjustments: > > - libvirt-qemu: allow guests setgid and setuid so qemu can drop privileges > >

Re: [libvirt] [PATCH] Enable support for nested SVM

2010-09-23 Thread Jiri Denemark
> diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c > index def6974..c7a282e 100644 > --- a/src/cpu/cpu.c > +++ b/src/cpu/cpu.c > @@ -424,3 +424,27 @@ cpuUpdate(virCPUDefPtr guest, > > return driver->update(guest, host); > } > + > +bool > +cpuHasFeature(const char *arch, > + const uni

[libvirt] [PATCH] nwfilter: report if ip(6)tables rules would not be effective

2010-09-23 Thread Stefan Berger
The patch below reports a warning in the log if the generated ip(6)tables rules would not be effective due to the proc filesystem entries /proc/sys/net/bridge/bridge-nf-call-iptables /proc/sys/net/bridge/bridge-nf-call-ip6tables containing a '0'. The warning tells the user what to do.

Re: [libvirt] [PATCH] Fix spelling of Xen

2010-09-23 Thread Daniel Veillard
On Thu, Sep 23, 2010 at 01:03:10PM +0200, Philipp Hahn wrote: > Trivial s/Xem/Xen/ in 4 comments. > > Signed-off-by: Philipp Hahn Ah right :-) one can see a slight abuse of cut'n paste ! Applied, Thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ d

Re: [libvirt] [PATCH] maint: grammar cleanups

2010-09-23 Thread Daniel Veillard
On Wed, Sep 22, 2010 at 03:35:04PM -0600, Eric Blake wrote: > * docs/logging.html.in: Fix spelling and grammar. > --- > > This quickly grew into something large enough that I no longer > feel comfortable applying it under the obvious rule, even though > it only touches documentation. ACK, Dani

Re: [libvirt] PATCH 3/4: AppArmor updates

2010-09-23 Thread Daniel P. Berrange
On Mon, Aug 16, 2010 at 02:45:02PM -0500, Jamie Strandboge wrote: > On Mon, 2010-08-16 at 17:15 +0100, Daniel P. Berrange wrote: > > On Fri, Aug 13, 2010 at 05:00:06PM -0500, Jamie Strandboge wrote: > > > Attached is 0003-apparmor-examples.patch > > > > Can you include full commit messages with ea

Re: [libvirt] PATCH 2/4: AppArmor updates

2010-09-23 Thread Daniel P. Berrange
On Mon, Aug 16, 2010 at 02:33:01PM -0500, Jamie Strandboge wrote: > On Mon, 2010-08-16 at 17:14 +0100, Daniel P. Berrange wrote: > > > You can't blindly de-reference data.file.path - The 'file' struct > > is inside a union and is only valid for certain types of character > > device VIR_DOMAIN_

Re: [libvirt] PATCH 1/4: AppArmor updates

2010-09-23 Thread Daniel P. Berrange
On Mon, Aug 16, 2010 at 03:59:17PM -0500, Jamie Strandboge wrote: > On Mon, 2010-08-16 at 20:11 +0100, Daniel P. Berrange wrote: > > How can the domain start if the configured disk file doesn't exist on > > the host filesystem ? QEMU will try to open a non-existant file, fail, > > and abort. Failin

Re: [libvirt] [PATCH] nwfilter: enable bridge netfilter calls via proc filesystem

2010-09-23 Thread Daniel P. Berrange
On Thu, Sep 23, 2010 at 10:31:38AM -0400, Stefan Berger wrote: > On 09/23/2010 09:09 AM, Daniel P. Berrange wrote: > >On Thu, Sep 23, 2010 at 08:45:41AM -0400, Stefan Berger wrote: > >> On 09/23/2010 07:33 AM, Daniel P. Berrange wrote: > >>>On Thu, Sep 23, 2010 at 11:36:11AM +0100, Daniel P. Berr

Re: [libvirt] [PATCH] nwfilter: enable bridge netfilter calls via proc filesystem

2010-09-23 Thread Stefan Berger
On 09/23/2010 09:09 AM, Daniel P. Berrange wrote: On Thu, Sep 23, 2010 at 08:45:41AM -0400, Stefan Berger wrote: On 09/23/2010 07:33 AM, Daniel P. Berrange wrote: On Thu, Sep 23, 2010 at 11:36:11AM +0100, Daniel P. Berrange wrote: On Wed, Sep 22, 2010 at 02:19:31PM -0400, Stefan Berger wrot

Re: [libvirt] [RFC PATCH] maint: update to latest gnulib

2010-09-23 Thread Eric Blake
On 09/23/2010 07:50 AM, Daniel Veillard wrote: On Wed, Sep 22, 2010 at 02:21:29PM -0600, Eric Blake wrote: On 09/22/2010 12:15 PM, Eric Blake wrote: * .gnulib: Update to latest. Gnulib commit 6fe217 is now in place; you may use that or any later patch as an acceptable replacement for testin

Re: [libvirt] [PATCH] Implement support for virtio plan9fs filesystem passthrough in QEMU (v2)

2010-09-23 Thread Daniel Veillard
On Wed, Sep 22, 2010 at 06:04:48PM +0100, Daniel P. Berrange wrote: > > Rebased version of my original patch, changing to use 'passthrough' > security model by default. Support for other models can be added > in a follow up patch > > Make use of the existing element to support plan9fs > filesyst

Re: [libvirt] [RFC PATCH] maint: update to latest gnulib

2010-09-23 Thread Daniel Veillard
On Wed, Sep 22, 2010 at 02:21:29PM -0600, Eric Blake wrote: > On 09/22/2010 12:15 PM, Eric Blake wrote: > >* .gnulib: Update to latest. > >* bootstrap.conf (gnulib_modules): Add new termios module. > >(gnulib_tool_option_extras): Make libtool usage explicit. > >* src/util/util.c (includes): Gnulib

Re: [libvirt] [PATCH] Set sensible defaults for cpu match and feature policy

2010-09-23 Thread Daniel Veillard
On Wed, Sep 22, 2010 at 05:50:10PM +0100, Daniel P. Berrange wrote: > To enable the CPU XML from the capabilities to be pasted directly > into the guest XML with no editing, pick a sensible default for > match and feature policy. The CPU match will be exact and the > feature policy will be require.

[libvirt] [PATCH v2 10/11] Implements virDomainSetMemoryParameters for the remote driver

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania Signed-off-by: Nikunj A. Dadhania --- daemon/remote.c | 66 ++ daemon/remote_dispatch_prototypes.h |8 daemon/remote_dispatch_table.h |5 +++ src/libvirt.c |1 - src/remote

[libvirt] [PATCH v2 09/11] Adding memtune command to virsh tool

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania The command helps to control the memory/swap parameters for the system, for eg. hard_limit (max memory the vm can use), soft_limit (limit during memory contention), swap_hard_limit(max swap the vm can use) v2: + Use #define string constants for "hard_limit", etc Signed-

[libvirt] [PATCH v2 07/11] Adding memtunables to libvirt-lxc command

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania libvirt-lxc now configures the hardlimit, softlimit and swaplimit, if specified in the domain xml file or picks up the defaults. Signed-off-by: Nikunj A. Dadhania --- src/lxc/lxc_controller.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions

[libvirt] [PATCH v2 05/11] Implement cgroup memory controller tunables

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania Provides interfaces for setting/getting memory tunables like hard_limit, soft_limit and swap_hard_limit Signed-off-by: Nikunj A. Dadhania --- src/libvirt_private.syms |6 +++ src/util/cgroup.c| 106 ++ src/util/c

[libvirt] [PATCH v2 04/11] XML parsing for memory tunables

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania Adding parsing code for memory tunables in the domain xml file v2: + Fix typo min_guarantee Signed-off-by: Nikunj A. Dadhania --- src/conf/domain_conf.c | 50 +--- src/conf/domain_conf.h | 12 --- src/esx/esx

[libvirt] [PATCH v2 03/11] Adds xml entries for memory tunables

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania The patch adds xml entries to the domain.rng file. v2: + Fix typo min_guarantee Signed-off-by: Nikunj A. Dadhania --- docs/schemas/domain.rng | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/docs/schemas/domain.rn

[libvirt] [PATCH v2 11/11] Implement domainSetMemoryParameters function

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania Add support in the lxc driver for various memory controllable parameters v2: + Use #define string constants for "hard_limit", etc + fix typo: min_guarantee Signed-off-by: Nikunj A. Dadhania --- src/lxc/lxc_driver.c | 90 ++

[libvirt] [PATCH v2 02/11] Adding virDomainSetMemoryParameters API

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania Public api to set memory tunables supported by the hypervisors. RFC: https://www.redhat.com/archives/libvir-list/2010-August/msg00607.html v2: Initialize domainSetMemoryParameters to NULL in all the driver interface structure. Signed-off-by: Nikunj A. Dadhania --- src

[libvirt] [PATCH v2 06/11] Implement driver interface domainSetMemoryParamters for QEmu

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania Driver interface for setting memory hard_limit, soft_limit and swap hard_limit. v2: + Use #define string constants for "hard_limit", etc. + fix typo: min_guarantee Signed-off-by: Nikunj A. Dadhania --- src/qemu/qemu_driver.c | 94

[libvirt] [PATCH v2 08/11] Adding memtunables to qemuSetupCgroup

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania QEmu startup would pick up the memory tunables specified in the domain configuration file. Signed-off-by: Nikunj A. Dadhania --- src/qemu/qemu.conf |4 ++-- src/qemu/qemu_conf.c |3 ++- src/qemu/qemu_driver.c | 27 +++ 3 files ch

[libvirt] [PATCH v2 01/11] Adding structure and defines for virDomainSetMemoryParameter

2010-09-23 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania This patch adds a structure virMemoryParameter, it contains the name of the parameter and the type of the parameter along with a union. v2: + Includes dummy python bindings for the library to build cleanly. + Define string constants like "hard_limit", etc. + re-order thi

[libvirt] [PATCH v2 00/11] Implement memory control api

2010-09-23 Thread Nikunj A. Dadhania
Changelog from v1: * Patch re-ordering for compilation * Folded python bindings changes to patch 01 * Added defines for string constants for memory tunables * Typo fix: min_guarantee * Moved initialization of function pointers in driver.h patch This patch series implement public api for

Re: [libvirt] [PATCH] nwfilter: enable bridge netfilter calls via proc filesystem

2010-09-23 Thread Daniel P. Berrange
On Thu, Sep 23, 2010 at 08:45:41AM -0400, Stefan Berger wrote: > On 09/23/2010 07:33 AM, Daniel P. Berrange wrote: > >On Thu, Sep 23, 2010 at 11:36:11AM +0100, Daniel P. Berrange wrote: > >>On Wed, Sep 22, 2010 at 02:19:31PM -0400, Stefan Berger wrote: > >>> On a recent installation of FC13, the

Re: [libvirt] [PATCH] nwfilter: enable bridge netfilter calls via proc filesystem

2010-09-23 Thread Stefan Berger
On 09/23/2010 07:33 AM, Daniel P. Berrange wrote: On Thu, Sep 23, 2010 at 11:36:11AM +0100, Daniel P. Berrange wrote: On Wed, Sep 22, 2010 at 02:19:31PM -0400, Stefan Berger wrote: On a recent installation of FC13, the filtering of IP/IPv6 using iptables/ip6tables traffic did not work since

Re: [libvirt] [PATCH] nwfilter: enable bridge netfilter calls via proc filesystem

2010-09-23 Thread Daniel P. Berrange
On Thu, Sep 23, 2010 at 11:36:11AM +0100, Daniel P. Berrange wrote: > On Wed, Sep 22, 2010 at 02:19:31PM -0400, Stefan Berger wrote: > > On a recent installation of FC13, the filtering of IP/IPv6 using > > iptables/ip6tables traffic did not work since the proc filesystem > > entries /proc/sys/ne

[libvirt] [PATCH] Fix spelling of Xen

2010-09-23 Thread Philipp Hahn
Trivial s/Xem/Xen/ in 4 comments. Signed-off-by: Philipp Hahn --- src/xen/xend_internal.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 1870d5b..fce0233 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xen

Re: [libvirt] [PATCH] nwfilter: enable bridge netfilter calls via proc filesystem

2010-09-23 Thread Daniel P. Berrange
On Wed, Sep 22, 2010 at 02:19:31PM -0400, Stefan Berger wrote: > On a recent installation of FC13, the filtering of IP/IPv6 using > iptables/ip6tables traffic did not work since the proc filesystem > entries /proc/sys/net/bridge/bridge-nf-call-iptables and > /proc/sys/net/bridge/bridge-nf-call-

Re: [libvirt] [PATCH] nwfilter: enable bridge netfilter calls via proc filesystem

2010-09-23 Thread Stefan Berger
On 09/23/2010 05:31 AM, Daniel P. Berrange wrote: On Wed, Sep 22, 2010 at 03:35:54PM -0400, Stefan Berger wrote: On 09/22/2010 02:49 PM, Daniel P. Berrange wrote: On Wed, Sep 22, 2010 at 02:19:31PM -0400, Stefan Berger wrote: On a recent installation of FC13, the filtering of IP/IPv6 usin

Re: [libvirt] [PATCH] nwfilter: enable bridge netfilter calls via proc filesystem

2010-09-23 Thread Daniel P. Berrange
On Wed, Sep 22, 2010 at 03:35:54PM -0400, Stefan Berger wrote: > On 09/22/2010 02:49 PM, Daniel P. Berrange wrote: > >On Wed, Sep 22, 2010 at 02:19:31PM -0400, Stefan Berger wrote: > >> On a recent installation of FC13, the filtering of IP/IPv6 using > >>iptables/ip6tables traffic did not work si

Re: [libvirt] [PATCH] esx: Allow '-' in VMX entry names

2010-09-23 Thread Matthias Bolte
2010/9/23 Eric Blake : > On 09/22/2010 04:34 PM, Matthias Bolte wrote: >> >> Add a test for this. > > Always the best part of a one-liner patch :) > >> >> Reported by Frank Dirks. >> --- >>  src/util/conf.c                                 |    2 +- >>  src/util/conf.h