[libvirt] [PATCH v2] qemu: Allow domain reboot after core dump

2011-09-20 Thread Michal Privoznik
This patch introduces possibility to reboot domain after core dump finishes. The new flag VIR_DUMP_REBOOT was added to virDomainCoreDumpFlags. The new functionality is accessible via virsh too: virsh dump --reboot --- diff to v1: -check for success of reboot include/libvirt/libvirt.h.in |1 +

Re: [libvirt] [PATCH] storage: Do not use comma as seperator for lvs output

2011-09-20 Thread Osier Yang
于 2011年09月21日 14:41, Daniel Veillard 写道: On Wed, Sep 21, 2011 at 01:39:22PM +0800, Osier Yang wrote: * src/storage/storage_backend_logical.c: If a logical vol is created with multiple stripes. (e.g. --stripes 3), the "device" field of lvs output will have multiple fileds which are seperated by

Re: [libvirt] [PATCH] storage: Do not use comma as seperator for lvs output

2011-09-20 Thread Daniel Veillard
On Wed, Sep 21, 2011 at 01:39:22PM +0800, Osier Yang wrote: > * src/storage/storage_backend_logical.c: > > If a logical vol is created with multiple stripes. (e.g. --stripes 3), > the "device" field of lvs output will have multiple fileds which are > seperated by comma. It means the RE we write in

[libvirt] [PATCH] virsh: More friendly err if no pool is specified for looking up a vol

2011-09-20 Thread Osier Yang
There are 3 ways to lookup a volume, only virStorageVolLookupByName needs pool object. So if no --pool is specified, it will tries to get the volume via virStorageVolLookupByPath/virStorageVolLookupByKey. But if all 3 ways fails, and no --pool is specified, a friendly error might help the user get

[libvirt] [PATCH] storage: Wait udev events are handled before removing lvm vol

2011-09-20 Thread Osier Yang
Related #BZ: https://bugzilla.redhat.com/show_bug.cgi?id=702260. There are two problems described in the BZ: 1) "Can't remove open logical volume". 2) "Unable to deactivate logical volume "foo"" This patch just intends to fix 2), as 1) is expected if the vol is still used by something, and you ne

[libvirt] [PATCH] storage: Do not use comma as seperator for lvs output

2011-09-20 Thread Osier Yang
* src/storage/storage_backend_logical.c: If a logical vol is created with multiple stripes. (e.g. --stripes 3), the "device" field of lvs output will have multiple fileds which are seperated by comma. It means the RE we write in the codes will not work well anymore. E.g. (lvs output for a stripped

Re: [libvirt] [PATCH] storage: Inherit permissions of parent pool if they are not specified

2011-09-20 Thread Osier Yang
于 2011年09月21日 03:27, Eric Blake 写道: On 09/20/2011 11:05 AM, Laine Stump wrote: On 09/20/2011 04:38 AM, Osier Yang wrote: If permissions (mode, uid, gid) are not specified, a new created vol will get the permissions like: mode = 0600 uid = -1 gid = -1 This will be a bit surprised if the user d

Re: [libvirt] [PATCH] virsh: Remove useless codes of cmdVolPath

2011-09-20 Thread Osier Yang
于 2011年09月21日 03:23, Eric Blake 写道: On 09/20/2011 03:09 AM, Osier Yang wrote: Variable "name" is never used in the codes, it's useless. --- tools/virsh.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index e8258c1..371346a 100644 --- a/tools

Re: [libvirt] libvirt-0.9.5 availability of rc3

2011-09-20 Thread Jason Helfman
On Tue, Sep 20, 2011 at 01:08:18PM +0800, Osier Yang thus spake: 于 2011年09月20日 12:43, Jason Helfman 写道: On Mon, Sep 19, 2011 at 09:23:02AM -0700, Jason Helfman thus spake: On Mon, Sep 19, 2011 at 11:56:52AM +0800, Daniel Veillard thus spake: On Sun, Sep 18, 2011 at 08:48:23PM -0700, Jason Helf

[libvirt] [PATCH 1/2] Modify generic ethernet interface so it will work when sVirt is enabled with qemu

2011-09-20 Thread Tyler Coumbes
Add a generic utility library for working with the TUN driver (/dev/net/tun). --- diff --git a/src/Makefile.am b/src/Makefile.am index 738ee91..ddd1b77 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -88,7 +88,8 @@ UTIL_SOURCES = \

[libvirt] [PATCH 2/2] Modify generic ethernet interface so it will work when sVirt is enabled with qemu

2011-09-20 Thread Tyler Coumbes
Update code to create generic ethernet interfaces using the new utility library tunctl making changes to create the TAP device in libvirt and pass it to qemu as a file descriptor. --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ee4b52b..181f56c 100644 --- a/src/qemu/qemu_

[libvirt] [PATCH 0/2] Modify generic ethernet interface so it will work when sVirt is enabled with qemu

2011-09-20 Thread Tyler Coumbes
Currently you cannot use generic ethernet interfaces with qemu when sVirt is enabled. This is because libvirt was having qemu handle the TAP creation and it doesn't have the rights to do so. This patch changes it so that libvirt handles and TAP creation and deletion. Passing the TAP as a file desc

[libvirt] [PATCH] build: silence warning on 32-bit build

2011-09-20 Thread Eric Blake
gcc warns when building libvirt 0.9.5 on a 32-bit machine: qemu/qemu_migration.c: In function 'qemuMigrationToFile': qemu/qemu_migration.c:2727:38: error: large integer implicitly truncated to unsigned type [-Woverflow] * src/qemu/qemu_domain.h (QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX): Cap to long w

Re: [libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Jiri Denemark
On Tue, Sep 20, 2011 at 13:22:12 -0600, Eric Blake wrote: > On 09/20/2011 01:10 PM, Jiri Denemark wrote: > > On Tue, Sep 20, 2011 at 19:39:15 +0200, Jiri Denemark wrote: > >> The commit that prevents disk corruption on domain shutdown > >> (96fc4784177ecb70357518fa863442455e45ad0e) causes regressio

Re: [libvirt] [Qemu-devel] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Anthony Liguori
On 09/20/2011 02:03 PM, Eric Blake wrote: On 09/20/2011 12:52 PM, Anthony Liguori wrote: On 09/20/2011 01:01 PM, Eric Blake wrote: On 09/20/2011 11:39 AM, Jiri Denemark wrote: The commit that prevents disk corruption on domain shutdown (96fc4784177ecb70357518fa863442455e45ad0e) causes regressi

Re: [libvirt] [PATCH] Revert "Ensure async packets never get marked for sync replies"

2011-09-20 Thread Dave Allan
On Tue, Sep 20, 2011 at 06:00:55PM +0100, Daniel P. Berrange wrote: > On Tue, Sep 20, 2011 at 06:20:48PM +0200, Michal Privoznik wrote: > > This partially reverts commit 984840a2c292402926ad100aeea33f8859ff31a9. > > > > Without this patch, client don't finish a stream which makes any > > API invol

Re: [libvirt] [PATCH] storage: Inherit permissions of parent pool if they are not specified

2011-09-20 Thread Eric Blake
On 09/20/2011 11:05 AM, Laine Stump wrote: On 09/20/2011 04:38 AM, Osier Yang wrote: If permissions (mode, uid, gid) are not specified, a new created vol will get the permissions like: mode = 0600 uid = -1 gid = -1 This will be a bit surprised if the user define the pool with a non-root uid/gi

Re: [libvirt] [PATCH] qemu: Allow domain reboot after core dump

2011-09-20 Thread Eric Blake
On 09/20/2011 05:34 AM, Michal Privoznik wrote: This patch introduces possibility to reboot domain after core dump finishes. The new flag VIR_DUMP_REBOOT was added to virDomainCoreDumpFlags. The new functionality is accessible via virsh too: virsh dump --reboot @@ -3189,6 +3190,11 @@ cleanup:

Re: [libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Jiri Denemark
On Tue, Sep 20, 2011 at 14:06:49 -0400, Dave Allan wrote: > On Tue, Sep 20, 2011 at 07:39:15PM +0200, Jiri Denemark wrote: > > The commit that prevents disk corruption on domain shutdown > > (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU > > 0.14.* and 0.15.* because of a re

Re: [libvirt] [PATCH] virsh: Remove useless codes of cmdVolPath

2011-09-20 Thread Eric Blake
On 09/20/2011 03:09 AM, Osier Yang wrote: Variable "name" is never used in the codes, it's useless. --- tools/virsh.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index e8258c1..371346a 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @

Re: [libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Eric Blake
On 09/20/2011 01:10 PM, Jiri Denemark wrote: On Tue, Sep 20, 2011 at 19:39:15 +0200, Jiri Denemark wrote: The commit that prevents disk corruption on domain shutdown (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU 0.14.* and 0.15.* because of a regression bug in QEMU that

Re: [libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Dave Allan
On Tue, Sep 20, 2011 at 09:10:46PM +0200, Jiri Denemark wrote: > On Tue, Sep 20, 2011 at 19:39:15 +0200, Jiri Denemark wrote: > > The commit that prevents disk corruption on domain shutdown > > (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU > > 0.14.* and 0.15.* because of a

Re: [libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Jiri Denemark
On Tue, Sep 20, 2011 at 19:39:15 +0200, Jiri Denemark wrote: > The commit that prevents disk corruption on domain shutdown > (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU > 0.14.* and 0.15.* because of a regression bug in QEMU that was fixed > only recently in QEMU git. Wit

Re: [libvirt] [Qemu-devel] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Eric Blake
On 09/20/2011 12:52 PM, Anthony Liguori wrote: On 09/20/2011 01:01 PM, Eric Blake wrote: On 09/20/2011 11:39 AM, Jiri Denemark wrote: The commit that prevents disk corruption on domain shutdown (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU 0.14.* and 0.15.* because of a

Re: [libvirt] [Qemu-devel] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Anthony Liguori
On 09/20/2011 01:01 PM, Eric Blake wrote: On 09/20/2011 11:39 AM, Jiri Denemark wrote: The commit that prevents disk corruption on domain shutdown (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU 0.14.* and 0.15.* because of a regression bug in QEMU that was fixed only rece

[libvirt] [PATCH 2/2] remote: fix crash on OOM

2011-09-20 Thread Eric Blake
Bug introduced in commit 675464b. On an OOM, this would try to dereference a char* and free the contents as a pointer, which is doomed to failure. Adding a syntax check will prevent mistakes like this in the future. * cfg.mk (sc_prohibit_internal_functions): New syntax check. (exclude_file_name_

Re: [libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Eric Blake
On 09/20/2011 12:06 PM, Dave Allan wrote: On Tue, Sep 20, 2011 at 07:39:15PM +0200, Jiri Denemark wrote: The commit that prevents disk corruption on domain shutdown (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU 0.14.* and 0.15.* because of a regression bug in QEMU that w

Re: [libvirt] libvirt-0.9.5 availability of rc2

2011-09-20 Thread Eric Blake
On 09/19/2011 10:03 PM, Daniel Veillard wrote: * daemon/remote.c: fix string allocations and memory error handling for remoteRelayDomainEventBlockJob, remoteRelayDomainEventIOError, remoteRelayDomainEventIOErrorReason and remoteRelayDomainEventGraphics return 0; +mem_error: +v

[libvirt] [PATCH 1/2] xen: use typical allocations

2011-09-20 Thread Eric Blake
The next patch will add a syntax check that flags this usage in xen as awkward - while it was valid memory management, it was very hard to maintain. Swapping to a more traditional allocation may be a bit slower, but easier to understand. * src/xen/xend_internal.c (xenDaemonListDomainsOld): Use tw

Re: [libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Dave Allan
On Tue, Sep 20, 2011 at 07:39:15PM +0200, Jiri Denemark wrote: > The commit that prevents disk corruption on domain shutdown > (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU > 0.14.* and 0.15.* because of a regression bug in QEMU that was fixed > only recently in QEMU git. W

Re: [libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Eric Blake
On 09/20/2011 11:39 AM, Jiri Denemark wrote: The commit that prevents disk corruption on domain shutdown (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU 0.14.* and 0.15.* because of a regression bug in QEMU that was fixed only recently in QEMU git. With affected QEMU binari

[libvirt] [PATCH] qemu: Fix shutdown regression

2011-09-20 Thread Jiri Denemark
The commit that prevents disk corruption on domain shutdown (96fc4784177ecb70357518fa863442455e45ad0e) causes regression with QEMU 0.14.* and 0.15.* because of a regression bug in QEMU that was fixed only recently in QEMU git. With affected QEMU binaries, domains cannot be shutdown properly and sta

Re: [libvirt] [PATCH] Revert "Ensure async packets never get marked for sync replies"

2011-09-20 Thread Eric Blake
On 09/20/2011 11:00 AM, Daniel P. Berrange wrote: The problem is that with doing virStreamRecv(), we will put a fake call on the queue. We only want to signal completion of those fake calls. This fake call should have been set to have status VIR_NET_CONTINUE but we forgot that. So I think we need

Re: [libvirt] [PATCH] storage: Inherit permissions of parent pool if they are not specified

2011-09-20 Thread Laine Stump
On 09/20/2011 04:38 AM, Osier Yang wrote: If permissions (mode, uid, gid) are not specified, a new created vol will get the permissions like: mode = 0600 uid = -1 gid = -1 This will be a bit surprised if the user define the pool with a non-root uid/gid, but the new created vol is

Re: [libvirt] [PATCH] Revert "Ensure async packets never get marked for sync replies"

2011-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2011 at 06:20:48PM +0200, Michal Privoznik wrote: > This partially reverts commit 984840a2c292402926ad100aeea33f8859ff31a9. > > Without this patch, client don't finish a stream which makes any > API involving virStream block indefinitely. > --- > src/rpc/virnetclient.c |5

[libvirt] [PATCH] Revert "Ensure async packets never get marked for sync replies"

2011-09-20 Thread Michal Privoznik
This partially reverts commit 984840a2c292402926ad100aeea33f8859ff31a9. Without this patch, client don't finish a stream which makes any API involving virStream block indefinitely. --- src/rpc/virnetclient.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/rpc/virn

Re: [libvirt] Release of libvirt-0.9.5

2011-09-20 Thread Daniel Veillard
On Tue, Sep 20, 2011 at 02:27:47PM +0800, Daniel Veillard wrote: > Okay, it is finally out of the box :-) available as usual on >ftp://libvirt.org/libvirt/ > Unfortunately 0.9.5 seems to have shutdown operation severely broken on recent versions of QEmu. For details see: https://bugzill

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

2011-09-20 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2011 at 2:46 PM, Daniel P. Berrange wrote: > On Tue, Sep 20, 2011 at 02:41:44PM +0200, Marc-André Lureau wrote: >> Hi >> >> On Tue, Sep 20, 2011 at 3:11 AM, Wen Congyang wrote: >> > >> > So I think qxl device supports multifunction. >> > >> >> It works on Linux, but not on Win

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

2011-09-20 Thread Alon Levy
On Tue, Sep 20, 2011 at 02:41:44PM +0200, Marc-André Lureau wrote: > Hi > > On Tue, Sep 20, 2011 at 3:11 AM, Wen Congyang wrote: > > > > So I think qxl device supports multifunction. > > > > It works on Linux, but not on Windows. It is most likely a driver bug, > but nobody so far found a soluti

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

2011-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2011 at 02:41:44PM +0200, Marc-André Lureau wrote: > Hi > > On Tue, Sep 20, 2011 at 3:11 AM, Wen Congyang wrote: > > > > So I think qxl device supports multifunction. > > > > It works on Linux, but not on Windows. It is most likely a driver bug, > but nobody so far found a soluti

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

2011-09-20 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2011 at 3:11 AM, Wen Congyang wrote: > > So I think qxl device supports multifunction. > It works on Linux, but not on Windows. It is most likely a driver bug, but nobody so far found a solution. Using windows kernel debugger, the only "interesting" message I could find is:

[libvirt] [PATCH] qemu: Allow domain reboot after core dump

2011-09-20 Thread Michal Privoznik
This patch introduces possibility to reboot domain after core dump finishes. The new flag VIR_DUMP_REBOOT was added to virDomainCoreDumpFlags. The new functionality is accessible via virsh too: virsh dump --reboot --- include/libvirt/libvirt.h.in |1 + src/qemu/qemu_driver.c |8

[libvirt] [PATCH] virsh: Remove useless codes of cmdVolPath

2011-09-20 Thread Osier Yang
Variable "name" is never used in the codes, it's useless. --- tools/virsh.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index e8258c1..371346a 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -10006,13 +10006,12 @@ static bool cmdVolPa

[libvirt] [PATCH] storage: Inherit permissions of parent pool if they are not specified

2011-09-20 Thread Osier Yang
If permissions (mode, uid, gid) are not specified, a new created vol will get the permissions like: mode = 0600 uid = -1 gid = -1 This will be a bit surprised if the user define the pool with a non-root uid/gid, but the new created vol is still defined as root/root. This patch change

Re: [libvirt] [PATCH] qemu: Prevent disk corruption on domain shutdown

2011-09-20 Thread Jiri Denemark
On Tue, Sep 20, 2011 at 11:31:06 +0800, Wen Congyang wrote: > At 09/15/2011 06:07 PM, Jiri Denemark Write: > > Ever since we introduced fake reboot, we call qemuProcessKill as a > > reaction to SHUTDOWN event. Unfortunately, qemu doesn't guarantee it > > flushed all internal buffers before sending