Re: [libvirt] [PATCH] qemu: qxl devices don't support multifunction yet

2011-09-30 Thread Laine Stump
On 09/27/2011 05:13 AM, Daniel P. Berrange wrote: On Tue, Sep 27, 2011 at 01:19:20AM -0400, Laine Stump wrote: On 09/19/2011 01:32 PM, Daniel P. Berrange wrote: On Mon, Sep 19, 2011 at 07:16:22PM +0200, Marc-André Lureau wrote: Hi hi On Fri, Sep 16, 2011 at 1:38 PM, Marc-André

Re: [libvirt] bug: try to take disk snapshot for LVM2 Volume

2011-09-30 Thread MATSUDA, Daiki
(2011/09/30 14:26), MATSUDA, Daiki wrote: I tried the new snapshot function implemented by Eric Blake. It works very well for QCOW2 disk image system. But I often use LVM2 volume for QEMU virtual machines and tried to take disk snapshot by virsh command ( snapshot-create DOMNAME

Re: [libvirt] [PATCH] qemu: Check for outstanding async job too

2011-09-30 Thread Michal Privoznik
On 29.09.2011 17:26, Eric Blake wrote: On 09/29/2011 09:01 AM, Michal Privoznik wrote: Currently, qemuDomainGetXMLDesc and qemudDomainGetInfo check for outstanding synchronous job before (eventual) monitor entering. However, there can be already async job set, e.g. migration. ---

Re: [libvirt] [PATCH 1/2] conf: remove unused VIR_ENUM_DECL

2011-09-30 Thread Daniel Veillard
On Fri, Sep 30, 2011 at 01:40:45AM -0400, Laine Stump wrote: While adding a new enum, I noticed a VIR_ENUM_DECL for a type that doesn't exist. There is also of course no matching VIR_ENUM_IMPL for it. --- src/conf/domain_conf.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-)

Re: [libvirt] [PATCH 2/2] qemu: make PCI multifunction support more manual

2011-09-30 Thread Daniel Veillard
On Fri, Sep 30, 2011 at 01:40:46AM -0400, Laine Stump wrote: When support for was added for PCI multifunction cards (in commit 9f8baf, first included in libvirt 0.9.3), it was done by always turning on the multifunction bit for all PCI devices. Since that time it has been realized that this is

Re: [libvirt] [PATCH 1/2] snapshot: implement getparent for esx

2011-09-30 Thread Daniel Veillard
On Thu, Sep 29, 2011 at 02:38:24PM -0600, Eric Blake wrote: Pretty easy to paste together compared to existing functions. * src/esx/esx_driver.c (esxDomainSnapshotGetParent): New function. --- I can only compile-test this; I'm relying on someone with an actual esx setup to actually test

[libvirt] [PATCH] Improve the daemon man page

2011-09-30 Thread Daniel Veillard
Add informations about the handling of USR2 and fatal signals and document the default log location. diff --git a/daemon/libvirtd.pod.in b/daemon/libvirtd.pod.in index 6e699b8..269e81f 100644 --- a/daemon/libvirtd.pod.in +++ b/daemon/libvirtd.pod.in @@ -69,6 +69,10 @@ Display version information

Re: [libvirt] [PATCH 1/2] snapshot: implement getparent for esx

2011-09-30 Thread Matthias Bolte
2011/9/30 Daniel Veillard veill...@redhat.com: On Thu, Sep 29, 2011 at 02:38:24PM -0600, Eric Blake wrote: Pretty easy to paste together compared to existing functions. * src/esx/esx_driver.c (esxDomainSnapshotGetParent): New function. --- I can only compile-test this; I'm relying on

Re: [libvirt] [PATCH 1/1] [RFC] Parallels Server Bare Metal driver stub

2011-09-30 Thread Dmitry Mishin
On Wednesday, September 28, 2011 06:10:19 PM Daniel P. Berrange wrote: Any pointers ? All I found was http://www.parallels.com/ptn/download/sdk/ and it's quite silent on code availability and Licence for the libraries. It has a proprietary license and not open sourced now.

Re: [libvirt] [PATCH 1/1] [RFC] Parallels Server Bare Metal driver stub

2011-09-30 Thread Dmitry Mishin
libvirt will be statically linked with SDK library Sorry, I meant dynamically but at compilation stage instead of dlopen() On Friday, September 30, 2011 12:21:05 PM Dmitry Mishin wrote: On Wednesday, September 28, 2011 06:10:19 PM Daniel P. Berrange wrote: Any pointers ? All I found was

Re: [libvirt] [PATCH 1/1] [RFC] Parallels Server Bare Metal driver stub

2011-09-30 Thread Daniel P. Berrange
On Fri, Sep 30, 2011 at 12:21:05PM +0400, Dmitry Mishin wrote: On Wednesday, September 28, 2011 06:10:19 PM Daniel P. Berrange wrote: Any pointers ? All I found was http://www.parallels.com/ptn/download/sdk/ and it's quite silent on code availability and Licence for the

Re: [libvirt] [RFC] Adding new filesystem 'proxy' to 9p

2011-09-30 Thread Daniel P. Berrange
On Thu, Sep 29, 2011 at 11:42:47PM +0530, M. Mohan Kumar wrote: On Wednesday, September 28, 2011 08:29:06 PM Daniel P. Berrange wrote: On Wed, Sep 28, 2011 at 07:49:34PM +0530, M. Mohan Kumar wrote: Pass-through security model in QEMU 9p server needs root privilege to do few file

[libvirt] [RFC PATCH 0/2] Add some systemtap probes to RPC code

2011-09-30 Thread Daniel P. Berrange
Trying to investigate debug the keepalive series I decided we needed a better way to trace the RPC protocol than the regular debug messages. Ideally we'd have a wireshark dissector but that seems like it will be an awful lot of work todo. So instead I have added a few systemtap probes to the RPC

[libvirt] [PATCH 2/2] Add some DTrace/SystemTAP probes to the RPC code

2011-09-30 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com --- daemon/libvirtd.h| 28 +--- src/Makefile.am | 28 +++-- src/internal.h | 70 ++ src/libvirt.stp | 35 +

[libvirt] [PATCH 1/2] Make libvirt.so include the RPC server code

2011-09-30 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com To avoid static linking libvirtd to the RPC server code, which then prevents sane introduction of DTrace probes, put it all in the libvirt.so, and export it * daemon/Makefile.am: Don't link to RPC libraries * src/Makefile.am: Link all RPC libraries to

[libvirt] [PATCH] build: Add missing package and c:include in gir

2011-09-30 Thread Marc-André Lureau
This is required for generating source-level bindings, for vala --- libvirt-gconfig/Makefile.am |2 ++ libvirt-glib/Makefile.am|2 ++ libvirt-gobject/Makefile.am |2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) diff --git a/libvirt-gconfig/Makefile.am

Re: [libvirt] [Openstack] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-30 Thread Serge Hallyn
Quoting Serge E. Hallyn (serge.hal...@canonical.com): Quoting Daniel P. Berrange (berra...@redhat.com): On Wed, Sep 28, 2011 at 02:14:52PM -0500, Serge E. Hallyn wrote: Nova (openstack) calls libvirt to create a container, then periodically checks using GetInfo to see whether the

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-30 Thread Daniel P. Berrange
On Thu, Sep 29, 2011 at 10:12:17PM -0500, Serge E. Hallyn wrote: Quoting Daniel P. Berrange (berra...@redhat.com): On Wed, Sep 28, 2011 at 02:14:52PM -0500, Serge E. Hallyn wrote: Nova (openstack) calls libvirt to create a container, then periodically checks using GetInfo to see whether

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-30 Thread Serge Hallyn
Quoting Daniel P. Berrange (berra...@redhat.com): On Thu, Sep 29, 2011 at 10:12:17PM -0500, Serge E. Hallyn wrote: Quoting Daniel P. Berrange (berra...@redhat.com): On Wed, Sep 28, 2011 at 02:14:52PM -0500, Serge E. Hallyn wrote: Nova (openstack) calls libvirt to create a container, then

[libvirt] [RFC PATCH] snapshot: better virsh handling of missing current, parent

2011-09-30 Thread Eric Blake
Previously, virsh 'snapshot-parent' and 'snapshot-current' were completely silent in the case where the code conclusively proved there was no parent or current snapshot, but differed in exit status; this silence caused some confusion on whether the commands worked. Furthermore, commit d1be48f

[libvirt] [libvirt-glib] RFC: delay event handle freeing to avoid dead lock

2011-09-30 Thread Marc-André Lureau
Can be reproduced with the updated test. --- examples/conn-test.c | 20 +++- libvirt-glib/libvirt-glib-event.c | 17 + 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/examples/conn-test.c b/examples/conn-test.c index

[libvirt] [PATCHv2 2/2] qemu: make PCI multifunction support more manual

2011-09-30 Thread Laine Stump
(V2: address Daniel Veillard's two review points (don't allow multifunction='default', and add multifunction=off to the qemu commandline when that's what the XML says), and modify the checks for duplicate PCI address usage attempts to account for multifunction=off on a device's function 0, per IRC

[libvirt] [PATCH 0/2] snapshot: add force for risky reverts

2011-09-30 Thread Eric Blake
I first documented the need for force back in my RFC: https://www.redhat.com/archives/libvir-list/2011-August/msg00361.html but only now got around to implementing it. At the moment, I'm posting the code for early review. I'm still in the process of testing out multiple scenarios, and will send

[libvirt] [PATCH 1/2] snapshot: add REVERT_FORCE to API

2011-09-30 Thread Eric Blake
Although reverting to a snapshot is a form of data loss, this is normally expected. However, there are two cases where additional surprises (failure to run the reverted state, or a break in connectivity to the domain) can come into play. Requiring extra acknowledgment in these cases will make it

[libvirt] [PATCH 2/2] snapshot: enforce REVERT_FORCE on qemu

2011-09-30 Thread Eric Blake
Implements the documentation for snapshot revert vs. force. Part of the patch tightens existing behavior (previously, reverting to an old snapshot without domain was blindly attempted, now it requires force), while part of it relaxes behavior (previously, it was not possible to revert an active

Re: [libvirt] [PATCHv2 2/2] qemu: make PCI multifunction support more manual

2011-09-30 Thread Eric Blake
On 09/30/2011 12:02 PM, Laine Stump wrote: (V2: address Daniel Veillard's two review points (don't allow multifunction='default', and add multifunction=off to the qemu commandline when that's what the XML says), and modify the checks for duplicate PCI address usage attempts to account for

Re: [libvirt] [PATCH] Improve the daemon man page

2011-09-30 Thread Eric Blake
On 09/30/2011 01:56 AM, Daniel Veillard wrote: Add informations about the handling of USR2 and fatal signals and document the default log location. diff --git a/daemon/libvirtd.pod.in b/daemon/libvirtd.pod.in index 6e699b8..269e81f 100644 --- a/daemon/libvirtd.pod.in +++

Re: [libvirt] bug: try to take disk snapshot for LVM2 Volume

2011-09-30 Thread Eric Blake
On 09/29/2011 11:26 PM, MATSUDA, Daiki wrote: I tried the new snapshot function implemented by Eric Blake. It works very well for QCOW2 disk image system. But I often use LVM2 volume for QEMU virtual machines and tried to take disk snapshot by virsh command ( snapshot-create DOMNAME

Re: [libvirt] [PATCH 1/2] Make libvirt.so include the RPC server code

2011-09-30 Thread Eric Blake
On 09/30/2011 07:54 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com To avoid static linking libvirtd to the RPC server code, which then prevents sane introduction of DTrace probes, put it all in the libvirt.so, and export it * daemon/Makefile.am: Don't link to RPC

Re: [libvirt] [PATCH 2/2] Add some DTrace/SystemTAP probes to the RPC code

2011-09-30 Thread Eric Blake
On 09/30/2011 07:54 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Not much of a commit comment. Even mentioning that half of the patch is code motion rather than new content might be useful. + +/* Systemtap 1.2 headers have a bug where they cannot handle a + *

Re: [libvirt] RPM build failure on Redhat6

2011-09-30 Thread Eric Blake
On 09/28/2011 10:48 PM, Wayne Xia wrote: Hi, I want to build rpm for latest libvit version on Redhat6, but when I type: ./autogen.sh --system make rpm -j4 error happens: sitemap.html.tmp index.html.tmp archdomain.html.tmp downloads.html.tmp auth.html.tmp internals/locking.html.tmp

Re: [libvirt] [PATCH 1/1] lvm storage backend: handle command_names=1 in lvm.conf (v2)

2011-09-30 Thread Eric Blake
On 09/28/2011 02:08 PM, Serge E. Hallyn wrote: [ Thanks for the feedback, Eric. Hopefully I correctly incorporated it in this version. This version still tests fine with and without lvm.conf command_names=1 ] Glad that it passed testing (as I had not tested my suggestions). If the regexes

[libvirt] [libvirt-glib] gir: fix introspection of asyncs and array delegate

2011-09-30 Thread Marc-André Lureau
--- libvirt-gobject/libvirt-gobject-connection.c | 24 libvirt-gobject/libvirt-gobject-connection.h |6 +++--- libvirt-gobject/libvirt-gobject-storage-pool.c |8 libvirt-gobject/libvirt-gobject-storage-pool.h |2 +-

Re: [libvirt] [PATCH 2.6/4] snapshot: virsh fallback for snapshot-list --from children

2011-09-30 Thread Eric Blake
On 09/29/2011 04:02 PM, Eric Blake wrote: Iterating over one level of children requires parsing all snapshots and their parents; a bit of code shuffling makes it pretty easy to do this as well. * tools/virsh.c (cmdSnapshotList): Add another fallback. --- Applies anywhere after 2.5/4, but

[libvirt] [PATCHv2 3/7] snapshot: virsh fallback for snapshot-list --tree --from

2011-09-30 Thread Eric Blake
Emulating --from requires grabbing the entire list of snapshots and their parents, and recursively iterating over the list from the point of interest - but we already do that for --tree. This turns on emulation for that situation. * tools/virsh.c (__vshControl): Rename member. (vshReconnect,

[libvirt] [PATCHv2 0/7] snapshot: listing children

2011-09-30 Thread Eric Blake
Cleaned up the rebase goofs present throughout my v1: https://www.redhat.com/archives/libvir-list/2011-September/msg01270.html Eric Blake (7): snapshot: new virDomainSnapshotListChildrenNames API snapshot: virsh snapshot-list and children snapshot: virsh fallback for snapshot-list --tree

[libvirt] [PATCHv2 1/7] snapshot: new virDomainSnapshotListChildrenNames API

2011-09-30 Thread Eric Blake
The previous API addition allowed traversal up the hierarchy; this one makes it easier to traverse down the hierarchy. In the python bindings, virDomainSnapshotNumChildren can be generated, but virDomainSnapshotListChildrenNames had to copy from the hand-written example of

[libvirt] [PATCHv2 4/7] snapshot: virsh fallback for snapshot-list --from children

2011-09-30 Thread Eric Blake
Iterating over one level of children requires parsing all snapshots and their parents; a bit of code shuffling makes it pretty easy to do this as well. * tools/virsh.c (cmdSnapshotList): Add another fallback. --- v2: fix compilation error, rebase around ctl flag tools/virsh.c | 48

[libvirt] [PATCHv2 2/7] snapshot: virsh snapshot-list and children

2011-09-30 Thread Eric Blake
Sometimes, we only care about one branch of the snapshot hierarchy. Make it easier to list a single branch, by using the new APIs. Technically, I could emulate these new virsh options on old servers by doing a complete dump, then scraping xml to filter out just the snapshots that I care about,

[libvirt] [PATCHv2 6/7] snapshot: remote protocol for snapshot children

2011-09-30 Thread Eric Blake
Very mechanical. I'm so glad we've automated the generation of things, compared to what it was in 0.8.x days, where this would be much longer. * src/remote/remote_protocol.x (REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN) (REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES): New rpcs.

[libvirt] [PATCHv2 7/7] snapshot: implement snapshot children listing in qemu

2011-09-30 Thread Eric Blake
Not too hard to wire up. The trickiest part is realizing that listing children of a snapshot cannot use SNAPSHOT_LIST_ROOTS, and that we overloaded that bit to also mean SNAPSHOT_LIST_DESCENDANTS; we use that bit to decide which iteration to use, but don't want the existing counting/listing

[libvirt] [PATCHv2 5/7] snapshot: virsh fallback for snapshot-list --descendants --from

2011-09-30 Thread Eric Blake
Given a list of snapshots and their parents, finding all descendants requires a hairy traversal. This code is O(n^3); it could maybe be made to scale O(n^2) with the use of a hash table, but that costs more memory. Hopefully there aren't too many people with a hierarchy so large as to approach

[libvirt] [PATCH] virsh: do not unlink NULL file

2011-09-30 Thread Marc-André Lureau
error:could not take a screenshot of xp ==6216== Syscall param unlink(pathname) points to unaddressable byte(s) ==6216==at 0x373A0D4937: unlink (syscall-template.S:82) ==6216==by 0x40FD73: cmdScreenshot (virsh.c:3070) ==6216==by 0x42BA0D: vshCommandRun (virsh.c:14920) ==6216==by

Re: [libvirt] [PATCH] virsh: do not unlink NULL file

2011-09-30 Thread Eric Blake
On 09/30/2011 07:05 PM, Marc-André Lureau wrote: error:could not take a screenshot of xp ==6216== Syscall param unlink(pathname) points to unaddressable byte(s) ==6216==at 0x373A0D4937: unlink (syscall-template.S:82) ==6216==by 0x40FD73: cmdScreenshot (virsh.c:3070) ==6216==by

[libvirt] [PATCH] Set to NULL members that have been freed to prevent crashes

2011-09-30 Thread Marc-André Lureau
Do not crash if virStreamFinish is called after error. ==11000== Invalid read of size 4 ==11000==at 0x373A8099A0: pthread_mutex_lock (pthread_mutex_lock.c:51) ==11000==by 0x4C7CADE: virMutexLock (threads-pthread.c:85) ==11000==by 0x4D57C31: virNetClientStreamRaiseError