Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-03 Thread Han Cheng
On 04/03/2013 01:06 PM, Hu Tao wrote: On Mon, Apr 01, 2013 at 08:00:57PM +0800, Han Cheng wrote: +struct _virSCSIDevice { +unsigned int adapter; +unsigned int bus; +unsigned int target; +unsigned int unit; + +char *name; /*

Re: [libvirt] [PATCH v2] Allow multiple parameters for schedinfo

2013-04-03 Thread Martin Kletzander
On 04/03/2013 01:22 AM, Eric Blake wrote: On 03/21/2013 10:22 AM, Martin Kletzander wrote: virsh schedinfo was able to set only one parameter at a time (not counting the deprecated options), but it is useful to set more at once, so this patch adds the possibility to do stuff like this: virsh

Re: [libvirt] [PATCH v2 03/10] conf: Introduce scsi hostdev

2013-04-03 Thread Osier Yang
On 01/04/13 20:00, Han Cheng wrote: Adding scsi hostdev, it should like: s/Adding/Add, s/should/looks/, hostdev mode='subsystem' type='scsi' source adapter name='scsi_host0'/ address bus='0' target='0' unit='0'/ /source address type='drive'

Re: [libvirt] [PATCH v2 03/10] conf: Introduce scsi hostdev

2013-04-03 Thread Osier Yang
On 03/04/13 16:29, Osier Yang wrote: On 01/04/13 20:00, Han Cheng wrote: Adding scsi hostdev, it should like: s/Adding/Add, s/should/looks/, hostdev mode='subsystem' type='scsi' source adapter name='scsi_host0'/ address bus='0' target='0' unit='0'/

Re: [libvirt] [PATCH] sec_manager: Refuse to start domain with unsupported seclabel

2013-04-03 Thread Michal Privoznik
On 02.04.2013 18:38, Eric Blake wrote: On 04/02/2013 10:07 AM, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=947387 If a user configures a domain to use a seclabel of a specific type, but the appropriate driver is not accessible, we should refuse to start the domain.

[libvirt] [PATCH 2/2] qemu-blockjob: Fix limit of bandwidth for block jobs to supported value

2013-04-03 Thread Peter Krempa
The JSON generator is able to represent only values less than LLONG_MAX, fix the bandwidth limit checks when converting to value to catch overflows before they reach the parser. --- src/qemu/qemu_monitor.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git

Re: [libvirt] [PATCH 1/1] Fix the crash when seclable is freed

2013-04-03 Thread Michal Privoznik
On 03.04.2013 04:24, Li Zhang wrote: On 2013年04月02日 19:29, Michal Privoznik wrote: On 02.04.2013 07:58, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com When seclabel's type is VIR_DOMAIN_SECLABEL_NONE, virSecurityLabelDefPtr's members are not allocated. So it will cause crash

[libvirt] [PATCH 1/2] qemu-JSON: Error out if number is out of range instead of overflowing to negative

2013-04-03 Thread Peter Krempa
Commit 78eb8b60d59662271c4a9a1be8c9002ee84dc8cf works around qemu's inability to parse unsigned 64 bit integers by representing them as signed. This introduces a bug where if the requested integer is greater than LLONG_MAX the result is wrapped to negative numbers. This patch adds a check to

Re: [libvirt] [PATCH v2 03/10] conf: Introduce scsi hostdev

2013-04-03 Thread Han Cheng
On 04/03/2013 04:29 PM, Osier Yang wrote: On 01/04/13 20:00, Han Cheng wrote: @@ -10773,6 +10911,16 @@ virDomainDefParseXML(virCapsPtr caps, goto error; } + if (hostdev-source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI + hostdev-info-type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { + /*

Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-03 Thread Osier Yang
On 01/04/13 20:00, Han Cheng wrote: This patch add util functions for scsi hostdev. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com --- po/POTFILES.in |1 + src/Makefile.am |1 + src/libvirt_private.syms | 22 +++ src/util/virscsi.c | 399

Re: [libvirt] [PATCH v2 06/10] qemu: Build qemu command line for scsi-generic

2013-04-03 Thread Osier Yang
On 01/04/13 20:00, Han Cheng wrote: For scsi-generic, the command line will be like: -drive file=/dev/sg0,if=none,id=drive-hostdev-scsi_host0-0-0-0 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ drive=drive-hostdev-scsi_host0-0-0-0,id=hostdev-scsi_host0-0-0-0 The

[libvirt] [libvirt-designer 3/3] Rework disk bus type handling

2013-04-03 Thread Christophe Fergeau
The current handling of bus types has some issues: - it assumes that if the design uses a disk controller hanging off a PCI bus, then it can use virtio, which is not true for Windows for example unless an additional driver is installed - it checks for ide, sata, virtio bus names, but they are

[libvirt] Improve disk bus type generation

2013-04-03 Thread Christophe Fergeau
This is mostly an excuse to add a _get_supported_devices() method used in fallback cases (when the deployment does not specify a disk driver to be used) as this will be useful later. The list of supported devices is generated with - devices supported both by the OS and the platform (hypervisor) -

[libvirt] [libvirt-designer 2/3] Add gvir_designer_domain_get_supported_devices()

2013-04-03 Thread Christophe Fergeau
This method gathers the list of devices supported by the hypervisor, and intersects this list with the list of devices supported by the OS, natively or using a driver (added with gvir_designer_domain_add_driver()). The lists can be filtered if needed. This commit changes

[libvirt] [libvirt-designer 1/3] Add driver handling methods to GVirDesignerDomain

2013-04-03 Thread Christophe Fergeau
They are useful to tell libvirt-designer about which drivers are install/will be installed in the OS associated with the domain. This in turns allows libvirt-designer code to use these devices when it's making some guesses about what to enable/not enable in the VM being created. ---

[libvirt] [libvirt-designer 2/9] Add sound device upon GVirDesignerDomain creation

2013-04-03 Thread Christophe Fergeau
--- libvirt-designer/libvirt-designer-domain.c | 120 + 1 file changed, 120 insertions(+) diff --git a/libvirt-designer/libvirt-designer-domain.c b/libvirt-designer/libvirt-designer-domain.c index c0b0e19..7b1cb33 100644 ---

[libvirt] [libvirt-designer 3/9] Update copyright notice

2013-04-03 Thread Christophe Fergeau
--- libvirt-designer/libvirt-designer-domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libvirt-designer/libvirt-designer-domain.c b/libvirt-designer/libvirt-designer-domain.c index 7b1cb33..df8f0cb 100644 --- a/libvirt-designer/libvirt-designer-domain.c +++

[libvirt] [libvirt-designer 7/9] Implement gvir_designer_domain_add_usb_redir()

2013-04-03 Thread Christophe Fergeau
This will add an USB redirection channel to the VM. This can be called multiple times to redirect several USB devices at once. This will also adds the needed controllers if they are not already present in the VM. The current code has 2 shortcomings: - USB redirection is only supported with SPICE,

[libvirt] [libvirt-designer 9/9] Implement gvir_designer_domain_add_video()

2013-04-03 Thread Christophe Fergeau
This takes into account the devices specified by the deployment, if this fails, consider the intersection of devices supported by the OS and by the platform, and if this still fails, falls back to a hardcoded hypervisor type - video model mapping. --- examples/virtxml.c |

[libvirt] [PATCH] virsh: Fix typo in docs

2013-04-03 Thread Peter Krempa
s/persitent/persistent/ --- Pushed under trivial rule. tools/virsh.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 9ca4435..1c8f9ee 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2152,7 +2152,7 @@ Returns basic information

Re: [libvirt] [PATCH 1/1] Fix the crash when seclable is freed

2013-04-03 Thread Li Zhang
On 2013年04月03日 16:42, Michal Privoznik wrote: On 03.04.2013 04:24, Li Zhang wrote: On 2013年04月02日 19:29, Michal Privoznik wrote: On 02.04.2013 07:58, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com When seclabel's type is VIR_DOMAIN_SECLABEL_NONE, virSecurityLabelDefPtr's members

[libvirt] [libvirt-designer 0/9] Handle more devices in GVirDesignerDomain

2013-04-03 Thread Christophe Fergeau
This series builds on the previous one (the one adding gvir_designer_domain_get_supported_devices()). It adds methods to add more devices disks/network interfaces to GVirDesignDomain. Some parts like 'Automatically add SPICE channel with SPICE graphics' may not be what we want, but I've tried to

[libvirt] [libvirt-designer 5/9] Automatically add SPICE channel with SPICE graphics

2013-04-03 Thread Christophe Fergeau
When the user sets up the graphical framebuffer to use SPICE, we now add automatically the SPICE agent channel if it's not present already. --- libvirt-designer/libvirt-designer-domain.c | 85 ++ 1 file changed, 85 insertions(+) diff --git

[libvirt] [libvirt-designer 1/9] Improve VM skeleton created by gvir_designer_domain_setup_guest()

2013-04-03 Thread Christophe Fergeau
Add various devices/configuration to libvirt XML config when creating the VM. This configuration is generic enough that it should be useful on all created VMs, that's why no public API is added to set them up. However, they are split in several helpers that can easily be exported if needed. What

[libvirt] [libvirt-designer 8/9] Implement gvir_designer_domain_add_smartcard()

2013-04-03 Thread Christophe Fergeau
This setups smartcard redirection to the guest. I'm not yet fully sure what users could want to tweak there (there are various ways of setting up the smartcard redirection), so this code may need to be made more flexible. The current code is also not checking whether the hypervisor supports this

[libvirt] [libvirt-designer 4/9] Implement gvir_designer_domain_add_graphics()

2013-04-03 Thread Christophe Fergeau
This allows to choose between SPICE, VNC or a local display, which will go through SDL or 'desktop' depending on the hypervisor. --- configure.ac | 2 +- examples/virtxml.c | 4 ++ libvirt-designer/libvirt-designer-domain.c | 111

[libvirt] [libvirt-designer 6/9] Check for vioserial availability before adding a SPICE agent

2013-04-03 Thread Christophe Fergeau
This makes use of the new gvir_designer_domain_get_supported_devices() method. --- libvirt-designer/libvirt-designer-domain.c | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/libvirt-designer/libvirt-designer-domain.c

Re: [libvirt] [PATCH v2 07/10] qemu: Basic management functions for scsi hostdev

2013-04-03 Thread Osier Yang
On 01/04/13 20:00, Han Cheng wrote: Although virtio-scsi support SCSI PR, the device in host may do not support this. To avoid losing data, we only allow one scsi hostdev be passthrough to one guest. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com --- src/qemu/qemu_conf.h|2 +

Re: [libvirt] [PATCH 3/5] virstring: Introduce virVasprintfNOOM and make virVasprintf report OOM

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 02:19:35PM -0600, Eric Blake wrote: On 04/02/2013 08:22 AM, Michal Privoznik wrote: --- src/libvirt_private.syms | 1 + src/qemu/qemu_domain.c | 4 +--- src/util/viraudit.c | 2 +- src/util/vircommand.c| 4 ++-- src/util/virerror.c | 2 +-

Re: [libvirt] [libvirt-designer 2/9] Add sound device upon GVirDesignerDomain creation

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 11:38:01AM +0200, Christophe Fergeau wrote: --- libvirt-designer/libvirt-designer-domain.c | 120 + 1 file changed, 120 insertions(+) diff --git a/libvirt-designer/libvirt-designer-domain.c b/libvirt-designer/libvirt-designer-domain.c

Re: [libvirt] [PATCH v2 08/10] qemu: cgroup and selinux for scsi hostdev

2013-04-03 Thread Osier Yang
On 01/04/13 20:01, Han Cheng wrote: As libvirt gives guest minimal cgroup, we need to add sg into guest cgroup whitelist for scsi hostdev. And we should set and restore selinux label correctly for scsi hostdev. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com --- src/qemu/qemu_cgroup.c

[libvirt] Networking options in libvirt_lxc

2013-04-03 Thread Purcareata Bogdan-B43198
Hello, I am doing some research on [subject] and I would like to find out some information regarding various scenarios. I've studied the official documentation at [1] and some of the mailing list archives. The configurations I have in mind are somewhat inspired by what the sf LXC package

Re: [libvirt] Networking options in libvirt_lxc

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 10:04:20AM +, Purcareata Bogdan-B43198 wrote: Hello, I am doing some research on [subject] and I would like to find out some information regarding various scenarios. I've studied the official documentation at [1] and some of the mailing list archives. The

Re: [libvirt] [PATCH v2 09/10] qemu: hotplug support for scsi hostdev

2013-04-03 Thread Osier Yang
On 01/04/13 20:01, Han Cheng wrote: This patch add hotplug for scsi hostdev. s/add/adds/ And user should hotplug a virtio-scsi controller if doesn't exist. I'm wondering if it could be implicitly added. Usb hostdev related codes are in qemuDomainAttachHostDevice, push down to

Re: [libvirt] [PATCH v2 10/10] tests: tests for scsi hostdev

2013-04-03 Thread Osier Yang
On 01/04/13 20:01, Han Cheng wrote: This patch add tests for scsi hostdev. s/add/adds/ Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com --- tests/qemuhelpdata/qemu-1.0-device | 10 ++ tests/qemuhelpdata/qemu-1.1.0-device | 10 ++

Re: [libvirt] [PATCH 1/1] Fix the crash when seclable is freed

2013-04-03 Thread Li Zhang
On 2013年04月03日 16:42, Michal Privoznik wrote: On 03.04.2013 04:24, Li Zhang wrote: On 2013年04月02日 19:29, Michal Privoznik wrote: On 02.04.2013 07:58, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com When seclabel's type is VIR_DOMAIN_SECLABEL_NONE, virSecurityLabelDefPtr's members

Re: [libvirt] Networking options in libvirt_lxc

2013-04-03 Thread Purcareata Bogdan-B43198
Hello, Thank you for the fast and detailed clarifications! I have some more questions, please find them inline. Best regards, Bogdan P. -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Wednesday, April 03, 2013 1:12 PM To: Purcareata Bogdan-B43198

Re: [libvirt] libvirtd segfault

2013-04-03 Thread AL13N
AL13N wrote: Op woensdag 20 maart 2013 08:42:52 schreef Jim Fehlig: AL13N wrote: Thread 1 (Thread 0x7fdef683b800 (LWP 20522)): #0 0x in ?? () #1 0x7fdee9a72dc7 in libxl_osevent_occurred_timeout (ctx=optimized out, for_libxl=0x7fdedc001608) at libxl_event.c:1039 #2

Re: [libvirt] [PATCH 01/16] Free memory on exit, fixes a problem found by coverity.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:17PM -0400, Dan Walsh wrote: Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service-util.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service-util.c b/bin/virt-sandbox-service-util.c index

Re: [libvirt] [PATCH 02/16] Current virt-sandbox-service-util only supports service sandbox/containers

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:18PM -0400, Dan Walsh wrote: We need to add support for interactive sandbox/containers for OpenShift. This patch will create the correct container type based off the /etc/libvirt-sandbox/service/* Signed-off-by: Dan Walsh dwa...@redhat.com ---

Re: [libvirt] [PATCH 03/16] bash_completion scripts have added a new way to do completions, where you place you scripts in /usr/share/bash_completion/completions rather then /etc/bash_completions.d. W

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:19PM -0400, Dan Walsh wrote: GIT commit messages should have one initial line less than 70 characters, then a blank line, then the body of the commit message. This avoids getting crazy subject lines like you have here. Signed-off-by: Dan Walsh dwa...@redhat.com

Re: [libvirt] [PATCH 05/16] The command option is --copy not --clone

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:21PM -0400, Dan Walsh wrote: Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service-create.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/virt-sandbox-service-create.pod b/bin/virt-sandbox-service-create.pod

Re: [libvirt] [PATCH 06/16] Wrap all output strings with _() to make sure we get proper translations.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:22PM -0400, Dan Walsh wrote: Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 48 1 file changed, 24 insertions(+), 24 deletions(-) Well, we haven't enabled localization at all in

Re: [libvirt] [PATCH 08/16] Move CONFIG_PATH to external from the Class, so you will not need a to create a container to get the path

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:24PM -0400, Dan Walsh wrote: The subject line is too long again. Please re-write with a short first line, then a blank line, and then the full description Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 13 + 1 file

Re: [libvirt] [PATCH 07/16] Change all internal functions that use __METHOD to use _METHOD. __METHOD's.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:23PM -0400, Dan Walsh wrote: Python makes assumptions about __METHOD names that will break some of the other patches that I am adding, involving inheritance of classes. The _METHODS are treated the same as any methods, but still give maintainers an idea that

Re: [libvirt] [PATCH 09/16] GlibGerror can be raised by virt-sandbox-service, need to catch and write to stderr

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:25PM -0400, Dan Walsh wrote: Again, bad subject line which is too long. Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 4 1 file changed, 4 insertions(+) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index

Re: [libvirt] [PATCH 10/16] Change variable name to be more specific to avoid confusion

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:26PM -0400, Dan Walsh wrote: Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index ca472f5..f32fd4a

Re: [libvirt] [PATCH 11/16] Change makedirs and makefiles to be internal methods

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:27PM -0400, Dan Walsh wrote: --- bin/virt-sandbox-service | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) Per my earlier comments, I'd rather not use _ anywhere here. Daniel -- |: http://berrange.com -o-

Re: [libvirt] [PATCH 15/16] Use args.uri rather then hard coding lxc:///

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:31PM -0400, Dan Walsh wrote: --- bin/virt-sandbox-service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index ceb05b3..1cce6a5 100755 --- a/bin/virt-sandbox-service +++

Re: [libvirt] [PATCH 16/16] Add cehck for execute command, since it will only work in lxc containers

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:32PM -0400, Dan Walsh wrote: Typo in commit message it is also too long. --- bin/virt-sandbox-service | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 1cce6a5..fe659e2 100755

[libvirt] [libvirt-designer PATCHv2] Add support for floppies and CDROMs

2013-04-03 Thread Christophe Fergeau
This mirrors disk_file/disk_device API so that it's possible to add CDROMs and floppies to a GVirDesignerDomain. This also adds the corresponding -C/-F options to virtxml --- Here is a reworked version of my patch to add support for CDROMs which does not override the 'format' parameter this time.

[libvirt] [PATCH 1/2] Build all binaries with PIE

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com PIE (position independent executable) adds security to executables by composing them entirely of position-independent code (PIC. The .so libraries already build with -fPIC. This adds -fPIE which is the equivalent to -fPIC, but for executables. This for

[libvirt] [PATCH 2/2] Enable full RELRO mode

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com By passing the flags -z relro -z now to the linker, we can force it to resolve all library symbols at startup, instead of on-demand. This allows it to then make the global offset table (GOT) read-only, which makes some security attacks harder.

[libvirt] [PATCH 0/2] Improve security hardening of binaries

2013-04-03 Thread Daniel P. Berrange
Fedora has a hardened build option in RPM specfiles: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE While we could enable that in the RPM, this would only apply to Fedora. Thus these patches directly integrate it in libvirt's configure.ac / Makefile.am files. With these 2 patches all

Re: [libvirt] [libvirt-designer 2/3] Accept 'iso' format in gvir_designer_domain_add_disk_full()

2013-04-03 Thread Christophe Fergeau
On Tue, Apr 02, 2013 at 11:12:29AM +0100, Daniel P. Berrange wrote: I don't think it is a good idea to overload 'format' for this purpose. It is perfectly acceptable to back a CDROM device by a qcow2 files. I think we should just have a gvir_designer_domain_add_cdrom() method or some other

Re: [libvirt] [PATCH 12/16] Split Container class definition into Container Class and ServiceContainer Class.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:28PM -0400, Dan Walsh wrote: This way we can share common methods between the ServiceContainer and the InteractiveContainer --- bin/virt-sandbox-service | 823 ++- 1 file changed, 450 insertions(+), 373 deletions(-)

Re: [libvirt] [PATCH 13/16] Add InteractiveContainer support. First use case will be OpenShift.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:29PM -0400, Dan Walsh wrote: Differentiating on which kind of container to create based off of the --command == InteractiveContainer --unitfile == ServiceContainer Resorted create args to be shown aphabetically except for the --command and --unitfile which I

Re: [libvirt] [PATCH 14/16] Listing running sandbox containers takes a long time using the current protocol.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:30PM -0400, Dan Walsh wrote: So I am execing a virsh list command to show all of the running containers. --- bin/virt-sandbox-service | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/virt-sandbox-service

Re: [libvirt] [PATCH 1/2] Build all binaries with PIE

2013-04-03 Thread Eric Blake
On 04/03/2013 05:41 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com PIE (position independent executable) adds security to executables by composing them entirely of position-independent code (PIC. The .so libraries already build with -fPIC. This adds -fPIE which is

Re: [libvirt] [PATCH 2/2] Enable full RELRO mode

2013-04-03 Thread Eric Blake
On 04/03/2013 05:41 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com By passing the flags -z relro -z now to the linker, we can force it to resolve all library symbols at startup, instead of on-demand. This allows it to then make the global offset table (GOT)

Re: [libvirt] [PATCH 04/16] This patch adds a -u UNITFILE qualifier to the virt-sandbox-service reload command.

2013-04-03 Thread Daniel P. Berrange
s/This patch adds/Adds/ in the subject On Tue, Apr 02, 2013 at 06:11:20PM -0400, Dan Walsh wrote: The basic idea is to allow administrators or the systemd service to reload units which are running within a container. If you have one or more units defined Line wrapping is missing here for

Re: [libvirt] [PATCH 1/2] qemu-JSON: Error out if number is out of range instead of overflowing to negative

2013-04-03 Thread Eric Blake
On 04/03/2013 02:46 AM, Peter Krempa wrote: Commit 78eb8b60d59662271c4a9a1be8c9002ee84dc8cf works around qemu's inability to parse unsigned 64 bit integers by representing them as signed. This introduces a bug where if the requested integer is greater than LLONG_MAX the result is wrapped

Re: [libvirt] [PATCH 2/2] qemu-blockjob: Fix limit of bandwidth for block jobs to supported value

2013-04-03 Thread Eric Blake
On 04/03/2013 02:46 AM, Peter Krempa wrote: The JSON generator is able to represent only values less than LLONG_MAX, fix the bandwidth limit checks when converting to value to catch overflows before they reach the parser. --- src/qemu/qemu_monitor.c | 21 - 1 file

Re: [libvirt] (no subject)

2013-04-03 Thread Eric Blake
On 04/02/2013 04:11 PM, Dan Walsh wrote: Most of them effect virt-sandbox-service, with the biggest change beeing the addition of InteractiveContainers. The subject line on the cover letter needs to be relevant to the rest of the series; using (no subject) is generally wrong. Also, since

Re: [libvirt] [PATCH 07/16] Change all internal functions that use __METHOD to use _METHOD. __METHOD's.

2013-04-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2013 07:28 AM, Daniel P. Berrange wrote: On Tue, Apr 02, 2013 at 06:11:23PM -0400, Dan Walsh wrote: Python makes assumptions about __METHOD names that will break some of the other patches that I am adding, involving inheritance of classes.

Re: [libvirt] [PATCH 1/2] qemu-JSON: Error out if number is out of range instead of overflowing to negative

2013-04-03 Thread Peter Krempa
On 04/03/13 15:29, Eric Blake wrote: On 04/03/2013 02:46 AM, Peter Krempa wrote: Commit 78eb8b60d59662271c4a9a1be8c9002ee84dc8cf works around qemu's inability to parse unsigned 64 bit integers by representing them as signed. This introduces a bug where if the requested integer is greater than

Re: [libvirt] [PATCH 13/16] Add InteractiveContainer support. First use case will be OpenShift.

2013-04-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2013 08:47 AM, Daniel P. Berrange wrote: On Tue, Apr 02, 2013 at 06:11:29PM -0400, Dan Walsh wrote: Differentiating on which kind of container to create based off of the --command == InteractiveContainer --unitfile == ServiceContainer

Re: [libvirt] [PATCH 2/2] qemu-blockjob: Fix limit of bandwidth for block jobs to supported value

2013-04-03 Thread Peter Krempa
On 04/03/13 15:32, Eric Blake wrote: On 04/03/2013 02:46 AM, Peter Krempa wrote: The JSON generator is able to represent only values less than LLONG_MAX, fix the bandwidth limit checks when converting to value to catch overflows before they reach the parser. --- src/qemu/qemu_monitor.c | 21

Re: [libvirt] [PATCH v3 00/11] Add support for guests with TPM passthrough device

2013-04-03 Thread Stefan Berger
Is anyone planning on reviewing this series? I have forward-ported it now with some nits fixed on the way. Regards, Stefan On 03/21/2013 11:42 AM, Stefan Berger wrote: Hello! The following set of patches adds support to libvirt for adding a TPM passthrough device to a QEMU guest.

Re: [libvirt] [PATCH 13/16] Add InteractiveContainer support. First use case will be OpenShift.

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 10:34:33AM -0400, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2013 08:47 AM, Daniel P. Berrange wrote: On Tue, Apr 02, 2013 at 06:11:29PM -0400, Dan Walsh wrote: Differentiating on which kind of container to create based off of the

[libvirt] [PATCH 7/7] Avoid cast alignment warnings in port allocator test

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com To avoid virportallocatortest.c: In function 'bind': virportallocatortest.c:34:33: warning: cast increases required alignment of target type [-Wcast-align] struct sockaddr_in *saddr = (struct sockaddr_in *)addr;

[libvirt] [PATCH 4/7] Copy struct inotify_event entries to avoid alignment problems

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When reading the inotify FD, we get back a sequence of struct inotify_event, each with variable length data following. It is not safe to simply cast from the char *buf to the struct inotify_event struct since this may violate data alignment rules. Thus

[libvirt] [PATCH 0/7] Fix multiple compiler warnings on ARMv7

2013-04-03 Thread Daniel P. Berrange
The ARMv7 builds of libvirt generate a number of warnings, mostly about cast alignment http://arm.koji.fedoraproject.org/packages/libvirt/1.0.4/1.fc19/data/logs/armv7hl/build.log this patch series fixes as many as possible, and then disables warnings for the rest using a pragma -- libvir-list

[libvirt] [PATCH 6/7] Disable of unused sysinfotest functions

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Certain functions in the sysinfotest.c are not used unless a whitelisted architecture is being built. Disable those functions unless required to avoid warnings about unused functions. sysinfotest.c:93:1: warning: 'sysinfotest_run' defined but not used

[libvirt] [PATCH 2/7] Avoid casts between unsigned char * and struct nlmsghdr

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virNetlinkCommand() method takes an 'unsigned char **' parameter to be filled with the received netlink message. The callers then immediately cast this to 'struct nlmsghdr', triggering (bogus) warnings about increasing alignment requirements

[libvirt] [PATCH 5/7] Disable cast-align warnings in various places

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com There are a number of places which generate cast alignment warnings, which are difficult or impossible to address. Use pragmas to disable the warnings in these few places conf/nwfilter_conf.c: In function 'virNWFilterRuleDetailsParse':

[libvirt] [PATCH 3/7] Use VIR_ALLOC_VAR instead of VIR_ALLOC_N for creating virObject

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The current way virObject instances are allocated using VIR_ALLOC_N causes alignment warnings util/virobject.c: In function 'virObjectNew': util/virobject.c:195:11: error: cast increases required alignment of target type [-Werror=cast-align]

[libvirt] [PATCH 1/7] qemu: QEMU_PCI constant consistency

2013-04-03 Thread Ján Tomko
Change QEMU_PCI_ADDRESS_LAST_SLOT to the number of slots in the bus, not the maximum slot value, to match QEMU_PCI_ADDRESS_LAST_FUNCTION. --- src/qemu/qemu_command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

[libvirt] [PATCH 0/7] qemu: PCI bridge support

2013-04-03 Thread Ján Tomko
This series allows PCI bridges to be added and used. After patch 6/7 more buses are usable if the bridges and addresses are explicitly specified in the XML. After 7/7 bridges are auto-added and the new buses are used automatically. (This only works if there is enough space on bus 0 for the

[libvirt] [PATCH 2/7] qemu: move PCI address check out of qemuPCIAddressAsString

2013-04-03 Thread Ján Tomko
Move bus and domain checks from qemuPCIAddressAsString to a separate function and add a check for function and slot so that we can switch from a hash table to an array. Remove redundant checks in qemuBuildDeviceAddressStr. --- src/qemu/qemu_command.c | 111

[libvirt] [PATCH 4/7] add pci-bridge controller type

2013-04-03 Thread Ján Tomko
From: liguang lig.f...@cn.fujitsu.com add a new controller type, then one can define a pci-bridge controller like this: controller type='pci-bridge' index='0'/ controller type='pci-bridge' index='1' address type='pci' domain='0x' bus='0x00' slot='0x05' function='0x0'/

[libvirt] [PATCH 3/7] qemu: switch PCI address set from hash table to an array

2013-04-03 Thread Ján Tomko
Each bus (just one so far) is represented by an array with 32 slots where each slot is stored as an 8-bit integer where each bit represents a function. This makes operations with whole slots easier. --- src/qemu/qemu_command.c | 152 +++- 1 file

[libvirt] [PATCH 7/7] qemu: auto-add and use bridges

2013-04-03 Thread Ján Tomko
Add a dry run address allocation to figure out how many bridges will be needed for all the devices without explicit addresses. Auto-add just enough bridges to put all the devices on, or up to the bridge with the largest specified index. --- src/qemu/qemu_command.c | 138

[libvirt] [PATCH 5/7] qemu: build command line for pci-bridge device

2013-04-03 Thread Ján Tomko
From: liguang lig.f...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 15 ++- tests/qemuhelptest.c | 21 ++--- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCH 1/3] Remove support for old kernels lacking private devpts

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Early on kernel support for private devpts was not widespread, so we had compatibiltiy codepaths. Such old kernels are not seriously used for LXC these days, so the compat code can go away Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 6/7] qemu: Add support for plugging devices into PCI bridges

2013-04-03 Thread Ján Tomko
Allow specifying addresses with non-zero buses in the XML. Check that the bridge topology results in their indexes matching the PCI buses they provide. --- src/qemu/qemu_command.c | 207 +--- src/qemu/qemu_command.h | 3 +- 2 files changed, 196

[libvirt] [PATCH 3/3] Revert lxc: Prevent shutting down the host

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com This reverts commit c9c87376f2b2197ad774533ad6a6dd2f631ca105. Now that we force all containers to have a root filesystem, there is no way the host's /dev is ever exposed Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/lxc/lxc_driver.c

[libvirt] [PATCH 2/3] Auto-add a root filesystem element to LXC containers on startup

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the LXC container code has two codepaths, depending on whether there is a filesystem element with a target path of '/'. If we automatically add a filesystem device with src=/ and dst=/, for any container which has not specified a root

Re: [libvirt] [PATCH v3 1/2] Optimize machine option to set more options with it

2013-04-03 Thread John Ferlan
On 04/02/2013 09:50 PM, Li Zhang wrote: On 2013年04月02日 20:52, Eric Blake wrote: On 04/02/2013 04:05 AM, Daniel P. Berrange wrote: On Fri, Mar 29, 2013 at 01:22:46PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com Currently, -machine option is used only when dump-guest-core

Re: [libvirt] [PATCH v3 2/2] Add USB option capability

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 10:14:15AM +0800, Li Zhang wrote: On 2013年04月02日 18:06, Daniel P. Berrange wrote: On Fri, Mar 29, 2013 at 01:22:47PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com To avoid the collision for creating USB controllers in machine-init() and -device xx

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

2013-04-03 Thread Eric Blake
On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This reverts commit c9c87376f2b2197ad774533ad6a6dd2f631ca105. Now that we force all containers to have a root filesystem, there is no way the host's /dev is ever exposed Signed-off-by: Daniel

Re: [libvirt] [PATCH 1/3] Remove support for old kernels lacking private devpts

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 10:59:04AM -0600, Eric Blake wrote: On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Early on kernel support for private devpts was not widespread, so we had compatibiltiy codepaths. Such old kernels are not

Re: [libvirt] [PATCH 1/3] Remove support for old kernels lacking private devpts

2013-04-03 Thread Eric Blake
On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Early on kernel support for private devpts was not widespread, so we had compatibiltiy codepaths. Such old kernels are not seriously used for LXC these days, so the compat code can go away

Re: [libvirt] [PATCH 2/3] Auto-add a root filesystem element to LXC containers on startup

2013-04-03 Thread Eric Blake
On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the LXC container code has two codepaths, depending on whether there is a filesystem element with a target path of '/'. If we automatically add a filesystem device with src=/ and dst=/,

Re: [libvirt] [PATCH v3 1/2] Optimize machine option to set more options with it

2013-04-03 Thread Eric Blake
On 04/03/2013 10:14 AM, John Ferlan wrote: } else { +virBuffer buf = VIR_BUFFER_INITIALIZER; virCommandAddArg(cmd, -machine); -virBufferAsprintf(buf, %s, def-os.machine); +virBufferAdd(buf, def-os.machine, -1); if (def-mem.dump_core) {

[libvirt] [PATCH] Add support for SD cards in nodedev driver

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The nodedev driver currently only detects harddisk, cdrom and floppy devices. This adds support for SD cards, which are common storage for ARM devices, eg the Google ChromeBook device nameblock_mmcblk0_0xb1c7c08b/name parentcomputer/parent

Re: [libvirt] [PATCH 2/3] Auto-add a root filesystem element to LXC containers on startup

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 11:17:30AM -0600, Eric Blake wrote: On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the LXC container code has two codepaths, depending on whether there is a filesystem element with a target path of '/'.

[libvirt] [PATCH] qemu: fix memory leak on -machine usage error

2013-04-03 Thread Eric Blake
Commit f84b92ea introduced a memory leak on error; John Ferlan reported that valgrind caught it during 'make check'. * src/qemu/qemu_command.c (qemuBuildMachineArgStr): Plug leak. --- Pushing under the trivial rule. src/qemu/qemu_command.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [libvirt] [PATCH 1/3] Remove support for old kernels lacking private devpts

2013-04-03 Thread Eric Blake
On 04/03/2013 11:12 AM, Daniel P. Berrange wrote: We already reject compilation of LXC on RHEL 5 due to other configure-time checks; is this something worth turning into an additional configure test of whether a kernel is new enough, or are we okay with just leaving it as a runtime test? We

[libvirt] [PATCH] Implement minimal sysinfo for ARM platforms

2013-04-03 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Implement the bare minimal sysinfo for ARM platforms by reading the CPU models from /proc/cpuinfo Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virsysinfo.c | 129 +++-

  1   2   >