[libvirt] [test-API][PATCH] Add extra optional arguments for spice graphics type for installation test

2011-09-29 Thread Nan Zhang
Added options for 2 cases: graphtype, image, jpeg, zlib, playback, streaming, clipboard * repos/domain/install_linux_cdrom.py * repos/domain/install_linux_net.py --- repos/domain/blkstats.py | 103 -

Re: [libvirt] [fedora-virt] Guest can no longer be bootet with libvirt 0.9.6 from virt-preview repo

2011-09-29 Thread Daniel P. Berrange
On Wed, Sep 28, 2011 at 08:16:23PM +0200, Dennis Jacobfeuerborn wrote: On 09/28/2011 07:56 PM, Eric Blake wrote: On 09/28/2011 11:43 AM, Daniel P. Berrange wrote: The libvirt package should probably be updated to require seabios-bin= 0.6.2. Yes, that probably needs to happen to libvirt.spec

Re: [libvirt] libguestfs integration: rich disk access for libvirt applications

2011-09-29 Thread Daniel P. Berrange
On Wed, Sep 28, 2011 at 06:52:13PM +0100, Richard W.M. Jones wrote: On Wed, Sep 28, 2011 at 06:37:17PM +0100, Daniel P. Berrange wrote: On Wed, Sep 28, 2011 at 11:14:57AM +0100, Stefan Hajnoczi wrote: On Tue, Sep 27, 2011 at 12:55 PM, Richard W.M. Jones rjo...@redhat.com wrote: To

Re: [libvirt] [PATCH 1/2] logging: Do not log timestamp through syslog

2011-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2011 at 09:05:59AM +0800, Daniel Veillard wrote: On Wed, Sep 28, 2011 at 04:46:11PM +0200, Jiri Denemark wrote: Syslog puts the timestamp to every message anyway so this removes redundant data. --- src/util/logging.c | 121

Re: [libvirt] [PATCH 1/2] logging: Do not log timestamp through syslog

2011-09-29 Thread Daniel Veillard
On Thu, Sep 29, 2011 at 08:58:08AM +0100, Daniel P. Berrange wrote: On Thu, Sep 29, 2011 at 09:05:59AM +0800, Daniel Veillard wrote: On Wed, Sep 28, 2011 at 04:46:11PM +0200, Jiri Denemark wrote: Syslog puts the timestamp to every message anyway so this removes redundant data. ---

Re: [libvirt] [libvirt-glib 1/2] Actually provide gvir_storage_vol_get_path()

2011-09-29 Thread Daniel P. Berrange
On Wed, Sep 28, 2011 at 09:30:47PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org This was only declared in header previously but not implemented. --- libvirt-gobject/libvirt-gobject-storage-vol.c | 11 +++ libvirt-gobject/libvirt-gobject.sym

Re: [libvirt] [libvirt-glib 2/2] API for storage pool volume management

2011-09-29 Thread Daniel P. Berrange
On Wed, Sep 28, 2011 at 09:30:48PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gobject/libvirt-gobject-storage-pool.c | 304 +++- libvirt-gobject/libvirt-gobject-storage-pool.h | 19 ++

Re: [libvirt] [PATCH] esx: Report an error for acceptable URI schemes with a transport

2011-09-29 Thread Matthias Bolte
2011/9/27 Eric Blake ebl...@redhat.com: On 09/27/2011 05:12 AM, Matthias Bolte wrote: Before, URIs such as esx+ssh:// have been declined by the ESX driver resulting in the remote driver trying to connect to an non-existing libvirtd. Now such URIs trigger and error in the ESX driver

Re: [libvirt] [PATCH] hyperv: Report an error for acceptable URI schemes with a transport

2011-09-29 Thread Matthias Bolte
2011/9/27 Eric Blake ebl...@redhat.com: On 09/27/2011 05:14 AM, Matthias Bolte wrote: Before, URIs such as hyperv+ssh:// have been declined by the Hyper-V driver resulting in the remote driver trying to connect to an non-existing libvirtd. Now such URIs trigger an error in the Hyper-V

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

2011-09-29 Thread Daniel P. Berrange
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 container is up. If it does this too quickly, then libvirt returns an error, which in libvirt.py causes an exception

Re: [libvirt] [libvirt-glib 1/9] doc: add some missing return value documentation

2011-09-29 Thread Daniel P. Berrange
On Wed, Sep 28, 2011 at 09:30:50PM +0200, Marc-André Lureau wrote: From: Marc-André Lureau marcandre.lur...@gmail.com --- libvirt-gobject/libvirt-gobject-stream.c |1 + libvirt-gobject/libvirt-gobject-stream.h |2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) ACK, to all 9

Re: [libvirt] [libvirt-glib 8/9] Connect a bunch of domain event to signals

2011-09-29 Thread Daniel P. Berrange
On Wed, Sep 28, 2011 at 09:30:57PM +0200, Marc-André Lureau wrote: --- libvirt-gobject/libvirt-gobject-connection.c | 126 ++ 1 files changed, 126 insertions(+), 0 deletions(-) diff --git a/libvirt-gobject/libvirt-gobject-connection.c

[libvirt] [PATCH v2 2/4] qemu: Implement 'reset' for qemu driver

2011-09-29 Thread Xu He Jie
Signed-off-by: Xu He Jie x...@linux.vnet.ibm.com --- src/qemu/qemu_driver.c | 48 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ffa8b4c..3f89c62 100644 ---

[libvirt] [PATCH v2 1/4] api: Add public api for 'reset'

2011-09-29 Thread Xu He Jie
Add new public api for 'reset'. It can reset domain immediately without any guest shutdown. Signed-off-by: Xu He Jie x...@linux.vnet.ibm.com --- include/libvirt/libvirt.h.in |3 ++ src/driver.h |4 +++ src/libvirt.c| 50

[libvirt] [PATCH v2 4/4] virsh: Add 'reset' command for virsh

2011-09-29 Thread Xu He Jie
Signed-off-by: Xu He Jie x...@linux.vnet.ibm.com --- tools/virsh.c | 46 ++ tools/virsh.pod |8 2 files changed, 54 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 807324b..a7d0559 100644 ---

[libvirt] [test-API][PATCH 1/2] Add support for spice graphics

2011-09-29 Thread Nan Zhang
* utils/Python/xmlgenerator.py: This extends graphics element for spice XML composing, and support sub-elements settings for audio, images, streaming and so on: graphics type='spice' autoport='yes' image compression='auto_glz'/ jpeg compression='auto'/ zlib

[libvirt] [test-API][PATCH 2/2] Add case for testing spice compression options

2011-09-29 Thread Nan Zhang
* repos/domain/spice_options.py: add this test for BZ#682237 --- repos/domain/spice_options.py | 138 + 1 files changed, 138 insertions(+), 0 deletions(-) create mode 100644 repos/domain/spice_options.py diff --git a/repos/domain/spice_options.py

[libvirt] [PATCH v2 3/4] remote: Implement 'reset' for remote driver

2011-09-29 Thread Xu He Jie
Signed-off-by: Xu He Jie x...@linux.vnet.ibm.com --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x |8 +++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 740dd75..83f4f3c 100644 ---

Re: [libvirt] [test-API][PATCH 1/2] Add support for spice graphics type in xml test module

2011-09-29 Thread Nan Zhang
Sorry, the mail subject is missing some words, the whole should be: [libvirt] [test-API][PATCH 1/2] Add support for spice graphics type in xml test module On 09/29/2011 05:30 PM, Nan Zhang wrote: * utils/Python/xmlgenerator.py: This extends graphics element for spice XML composing, and

Re: [libvirt] [PATCH 2/2] logging: Add date to log timestamp

2011-09-29 Thread Daniel Veillard
On Wed, Sep 28, 2011 at 04:46:12PM +0200, Jiri Denemark wrote: --- src/util/logging.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/util/logging.c b/src/util/logging.c index 4ffaf75..9df9003 100644 --- a/src/util/logging.c +++ b/src/util/logging.c @@

Re: [libvirt] Qemu/KVM is 3x slower under libvirt

2011-09-29 Thread Reeted
On 09/29/11 02:39, Chris Wright wrote: Can you help narrow down what is happening during the additional 12 seconds in the guest? For example, does a quick simple boot to single user mode happen at the same boot speed w/ and w/out vhost_net? Not tried (would probably be too short to measure

Re: [libvirt] [PATCH v2 1/4] api: Add public api for 'reset'

2011-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2011 at 04:53:29PM +0800, Xu He Jie wrote: Add new public api for 'reset'. It can reset domain immediately without any guest shutdown. Signed-off-by: Xu He Jie x...@linux.vnet.ibm.com --- include/libvirt/libvirt.h.in |3 ++ src/driver.h |4 +++

[libvirt] [libvirt-glib 8/9] Connect a bunch of domain event to signals

2011-09-29 Thread Zeeshan Ali (Khattak)
Forgot to hit 'reply-all' :( -- Forwarded message -- From: Zeeshan Ali (Khattak) zeesha...@gnome.org Date: Thu, Sep 29, 2011 at 2:25 PM Subject: Re: [libvirt] [libvirt-glib 8/9] Connect a bunch of domain event to signals To: Daniel P. Berrange berra...@redhat.com On Thu, Sep

Re: [libvirt] Qemu/KVM is 3x slower under libvirt

2011-09-29 Thread Chris Wright
* Reeted (ree...@shiftmail.org) wrote: On 09/28/11 11:28, Daniel P. Berrange wrote: On Wed, Sep 28, 2011 at 11:19:43AM +0200, Reeted wrote: On 09/28/11 09:51, Daniel P. Berrange wrote: You could have equivalently used -netdev tap,ifname=tap0,script=no,downscript=no,id=hostnet0,vhost=on

Re: [libvirt] [libvirt-glib 8/9] Connect a bunch of domain event to signals

2011-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2011 at 02:25:43PM +0300, Zeeshan Ali (Khattak) wrote: On Thu, Sep 29, 2011 at 11:45 AM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Sep 28, 2011 at 09:30:57PM +0200, Marc-André Lureau wrote: ---  libvirt-gobject/libvirt-gobject-connection.c |  126

Re: [libvirt] [PATCH 0/2] Improve timestamps in log messages

2011-09-29 Thread Jiri Denemark
On Wed, Sep 28, 2011 at 16:46:10 +0200, Jiri Denemark wrote: Jiri Denemark (2): logging: Do not log timestamp through syslog logging: Add date to log timestamp src/util/logging.c | 123 +++ src/util/logging.h |9 ++-- 2 files

Re: [libvirt] libguestfs integration: rich disk access for libvirt applications

2011-09-29 Thread Richard W.M. Jones
On Wed, Sep 28, 2011 at 06:37:17PM +0100, Daniel P. Berrange wrote: We do have a historical syntax from Xen paravirt which lets us call out to a helper at boot time, namely the bootloader element. With Xen this is typically something like pygrub, or pxegrub, which does some work and writes out

Re: [libvirt] [PATCH v2 1/4] api: Add public api for 'reset'

2011-09-29 Thread Eric Blake
On 09/29/2011 02:53 AM, Xu He Jie wrote: Add new public api for 'reset'. It can reset domain immediately without any guest shutdown. /** + * virDomainReset: + * @domain: a domain object + * @flags: extra flags for the reboot operation, not used yet + * + * Reset a domain immediately

Re: [libvirt] [PATCH v2 2/4] qemu: Implement 'reset' for qemu driver

2011-09-29 Thread Eric Blake
On 09/29/2011 02:54 AM, Xu He Jie wrote: Signed-off-by: Xu He Jiex...@linux.vnet.ibm.com --- src/qemu/qemu_driver.c | 48 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

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

2011-09-29 Thread Serge E. Hallyn
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 container is up. If it does this too quickly, then libvirt

Re: [libvirt] [PATCH v2 3/4] remote: Implement 'reset' for remote driver

2011-09-29 Thread Eric Blake
On 09/29/2011 02:56 AM, Xu He Jie wrote: Signed-off-by: Xu He Jiex...@linux.vnet.ibm.com --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x |8 +++- 2 files changed, 8 insertions(+), 1 deletions(-) Missing a change to src/remote_protocol-structs, which 'make

Re: [libvirt] [PATCH v2 4/4] virsh: Add 'reset' command for virsh

2011-09-29 Thread Eric Blake
On 09/29/2011 02:57 AM, Xu He Jie wrote: Signed-off-by: Xu He Jiex...@linux.vnet.ibm.com --- tools/virsh.c | 46 ++ tools/virsh.pod |8 2 files changed, 54 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c

Re: [libvirt] [PATCH v2 1/4] api: Add public api for 'reset'

2011-09-29 Thread Daniel Veillard
On Thu, Sep 29, 2011 at 06:52:33AM -0600, Eric Blake wrote: On 09/29/2011 02:53 AM, Xu He Jie wrote: Add new public api for 'reset'. It can reset domain immediately without any guest shutdown. /** + * virDomainReset: + * @domain: a domain object + * @flags: extra flags for the

[libvirt] [PATCH] qemu: Fix error message mentioning VNC instead of SPICE

2011-09-29 Thread Peter Krempa
--- Simpe cutpaste error. Pushed under trivial rule. Peter src/qemu/qemu_hotplug.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 3adec48..4c1705d 100644 --- a/src/qemu/qemu_hotplug.c +++

Re: [libvirt] [PATCH v2 01/12] Define keepalive protocol

2011-09-29 Thread Daniel P. Berrange
On Fri, Sep 23, 2011 at 10:24:46AM +0200, Jiri Denemark wrote: The keepalive program has three procedures: ADVERTISE, PING, and PONG. All are used only in asynchronous messages and the sender doesn't wait for any reply. However, the party which receives PING messages is supposed to react by

Re: [libvirt] [PATCH v2 01/12] Define keepalive protocol

2011-09-29 Thread Jiri Denemark
On Thu, Sep 29, 2011 at 14:19:43 +0100, Daniel P. Berrange wrote: On Fri, Sep 23, 2011 at 10:24:46AM +0200, Jiri Denemark wrote: The keepalive program has three procedures: ADVERTISE, PING, and PONG. All are used only in asynchronous messages and the sender doesn't wait for any reply.

[libvirt] ANNOUNCE: Perl binding release Sys-Virt version 0.9.5

2011-09-29 Thread Daniel P. Berrange
I am pleased to announce a new release of the Perl binding, Sys::Virt version 0.9.5, is now available for download: http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-0.9.5.tar.gz Changes in this release - Add all new APIs in libvirt 0.9.5 - Add missing snapshot creation/lookup

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

2011-09-29 Thread Laine Stump
On 09/27/2011 05:13 AM, Daniel P. Berrange wrote: When we originally enabled multifunction for all PCI devices, we did so in the belief that this was effectively a no-op for guest OSes. ie it should not have changed guest OS behaviour at all, unless multiple devices were actually inserted in the

Re: [libvirt] [PATCH v2 01/12] Define keepalive protocol

2011-09-29 Thread Eric Blake
On 09/29/2011 07:46 AM, Jiri Denemark wrote: On Thu, Sep 29, 2011 at 14:19:43 +0100, Daniel P. Berrange wrote: On Fri, Sep 23, 2011 at 10:24:46AM +0200, Jiri Denemark wrote: The keepalive program has three procedures: ADVERTISE, PING, and PONG. All are used only in asynchronous messages and

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

2011-09-29 Thread Laine Stump
On 09/29/2011 10:30 AM, Laine Stump wrote: On 09/27/2011 05:13 AM, Daniel P. Berrange wrote: When we originally enabled multifunction for all PCI devices, we did so in the belief that this was effectively a no-op for guest OSes. ie it should not have changed guest OS behaviour at all, unless

Re: [libvirt] [PATCH v2 01/12] Define keepalive protocol

2011-09-29 Thread Jiri Denemark
On Thu, Sep 29, 2011 at 08:30:13 -0600, Eric Blake wrote: On 09/29/2011 07:46 AM, Jiri Denemark wrote: PING messages can be sent by both client and server and sending them can be independently disabled on both sides. ADVERTISE is sent because a server may never get any PING messages from a

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

2011-09-29 Thread Michal Privoznik
Currently, qemuDomainGetXMLDesc and qemudDomainGetInfo check for outstanding synchronous job before (eventual) monitor entering. However, there can be already async job set, e.g. migration. --- src/qemu/qemu_domain.c | 12 +--- src/qemu/qemu_domain.h |2 ++ src/qemu/qemu_driver.c |

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

2011-09-29 Thread Eric Blake
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. --- src/qemu/qemu_domain.c | 12 +---

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

2011-09-29 Thread Chris Wright
* Laine Stump (la...@laine.org) wrote: On 09/29/2011 10:30 AM, Laine Stump wrote: On 09/27/2011 05:13 AM, Daniel P. Berrange wrote: When we originally enabled multifunction for all PCI devices, we did so in the belief that this was effectively a no-op for guest OSes. ie it should not have

[libvirt] [PATCHv2 01/13] virbuf: fix const-correctness

2011-09-29 Thread Eric Blake
Although the compiler wasn't complaining (since it was the pointer, rather than what was being pointed to, that was actually const), it looks quite suspicious to call a function with an argument labeled const when the nature of the pointer (virBufferPtr) is hidden behind a typedef. Dropping const

[libvirt] [PATCHv2 00/13] fix domainsnapshot indentation

2011-09-29 Thread Eric Blake
A rather revamped series, based on comments from v1: https://www.redhat.com/archives/libvir-list/2011-September/msg00916.html Implementing auto-indent as part of virBuffer indeed makes things easier - I no longer have to pass around an explicit indent parameter, since it is instead part of the

[libvirt] [PATCHv2 03/13] virbuf: more detailed error reporting

2011-09-29 Thread Eric Blake
The next patch wants to add some sanity checking, which would be a different error than ENOMEM. Many existing callers blindly report OOM failure if virBuf reports an error, and this will be wrong in the (unlikely) case that they actually had a usage error instead; but since the most common error

[libvirt] [PATCHv2 02/13] virbuf: improve testsuite reporting

2011-09-29 Thread Eric Blake
I had some temporary test failures while working on virbuf improvements in later patches, with output that looked like: Expected [] Actual [ ] which is pretty hard to figure out. Adding an Offset designation made it much easier to find which particular '' was at the wrong indentation, to fix

[libvirt] [PATCHv2 04/13] virbuf: add auto-indentation support

2011-09-29 Thread Eric Blake
Rather than having to adjust all callers in a chain to deal with indentation, it is nicer to have virBuffer do auto-indentation. * src/util/buf.h (_virBuffer): Increase size. (virBufferAdjustIndent, virBufferGetIndent): New prototypes. * src/libvirt_private.syms (buf.h): Export new functions. *

[libvirt] [PATCHv2 08/13] snapshot: simplify indentation of cpu features

2011-09-29 Thread Eric Blake
Auto-indent makes life a bit easier; this patch also drops unused arguments and fixes a flag name. * src/conf/cpu_conf.h (virCPUFormatFlags): Fix typo. (virCPUDefFormat, virCPUDefFormatBuf): Drop unused arguments. * src/conf/cpu_conf.c (virCPUDefFormat, virCPUDefFormatBuf): Simplify indentation.

[libvirt] [PATCHv2 11/13] snapshot: simplify indentation of disk encryption xml

2011-09-29 Thread Eric Blake
Use auto-indent in more places. * src/conf/storage_encryption_conf.h (virStorageEncryptionFormat): Drop parameter. * src/conf/storage_encryption_conf.c (virStorageEncryptionFormat) (virStorageEncryptionSecretFormat): Simplify with auto-indent. * src/conf/domain_conf.c (virDomainDiskDefFormat):

[libvirt] [PATCHv2 05/13] snapshot: indent domain xml when nesting

2011-09-29 Thread Eric Blake
domainsnapshot is the first public instance of domain being used as a sub-element, although we have two other private uses (runtime state, and migration cookie). Although indentation has no effect on XML parsing, using it makes the output more consistent. This uses virBuffer auto-indentation to

[libvirt] [PATCHv2 07/13] snapshot: simplify indentation of sysinfo

2011-09-29 Thread Eric Blake
The improvements to virBuffer, along with a paradigm shift to pass the original buffer through rather than creating a second buffer, allow us to shave off quite a few lines of code. * src/util/sysinfo.h (virSysinfoFormat): Alter signature. * src/util/sysinfo.c (virSysinfoFormat,

[libvirt] [PATCHv2 09/13] snapshot: simplify indentation of network xml

2011-09-29 Thread Eric Blake
More simplifications possible due to auto-indent. Also, bandwidth within actual was only using 6 instead of 8 spaces. * src/util/network.h (virVirtualPortProfileFormat) (virBandwidthDefFormat): Alter signature. * src/util/network.c (virVirtualPortProfileFormat) (virBandwidthDefFormat): Alter

[libvirt] [PATCHv2 06/13] snapshot: test domainsnapshot indentation

2011-09-29 Thread Eric Blake
Add a test for the simple parts of my indentation changes, and fix the fallout. * tests/domainsnapshotxml2xmltest.c: New test. * tests/Makefile.am (domainsnapshotxml2xmltest_SOURCES): Build it. * src/conf/domain_conf.c (virDomainSnapshotDefFormat): Avoid NULL deref, match documented order. *

[libvirt] [PATCHv2 10/13] snapshot: simplify indentation of nwfilter

2011-09-29 Thread Eric Blake
Fixing this involved some refactoring of common code out of domain_conf and nwfilter_conf into nwfilter_params. * src/conf/nwfilter_params.h (virNWFilterFormatParamAttributes): Adjust signature. * src/conf/nwfilter_params.c (_formatParameterAttrs) (virNWFilterFormatParamAttributes): Adjust

[libvirt] [RFC: PATCHv2 13/13] virbuf: add explicit indentation functions

2011-09-29 Thread Eric Blake
Future patches can take advantage of this to generate nicer XML output with parameterizable indentation. * src/util/buf.h (virBufferIndentAdd, virBufferIndentAddLit) (virBufferIndentAsprintf, virBufferIndentEscapeString): New prototypes and macro. * src/libvirt_private.syms (buf.h): Export new

[libvirt] [PATCHv2 12/13] snapshot: minor cleanups from reviewing indentation

2011-09-29 Thread Eric Blake
Break some long lines, and use more efficient functions when possible, such as relying on virBufferEscapeString to skip output on a NULL arg. Ensure that output does not embed newlines, since auto-indent won't work in those situations. * src/conf/domain_conf.c (virDomainTimerDefFormat): Break

Re: [libvirt] Qemu/KVM is 3x slower under libvirt

2011-09-29 Thread Chris Wright
* Reeted (ree...@shiftmail.org) wrote: On 09/29/11 02:39, Chris Wright wrote: Can you help narrow down what is happening during the additional 12 seconds in the guest? For example, does a quick simple boot to single user mode happen at the same boot speed w/ and w/out vhost_net? Not tried

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

2011-09-29 Thread M. Mohan Kumar
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 operations (like chown, chmod to any mode/uid:gid). There are two issues

[libvirt] [PATCH 0/4] snapshot: listing children

2011-09-29 Thread Eric Blake
My previous API added parent traversal; this one adds child traversal. virsh snapshot-list domain snapshot --tree is a nice end result for limiting the output to a particular subset of the overall hierarchy. Again, same story about not wiring up ESX and VBox support yet, but I'll play with that

[libvirt] [PATCH 2/4] snapshot: virsh snapshot-list and children

2011-09-29 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] [PATCH 4/4] snapshot: implement snapshot children listing in qemu

2011-09-29 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] [PATCH 1/4] snapshot: new virDomainSnapshotListChildrenNames API

2011-09-29 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] [PATCH 3/4] snapshot: remote protocol for snapshot children

2011-09-29 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.

Re: [libvirt] [PATCH 1/4] api: Add new public api for 'reset'

2011-09-29 Thread Sheldon
yes, I have try reset and reboot. reset can work. But after reset a domain, start VNC to connect the domain, the cursor does not move with the mouse move. but reboot the domain, the domain can run normally. And then I run qemu directly to reset a domain, the mouse cursor is also abnormal.

[libvirt] [PATCH] add a default event handle to passthough the new event from qemu

2011-09-29 Thread Sheldon
From c9434f925270d00f2cf3885296e6fef2ba4cc4fb Mon Sep 17 00:00:00 2001 From: Shaohe Feng shao...@linux.vnet.ibm.com Date: Wed, 28 Sep 2011 18:01:36 +0800 Subject: [PATCH] add a default event handle,to passthough the new event generated by qemu Basically, this feature can go along with qemu

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

2011-09-29 Thread Eric Blake
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 it. Also, I didn't see anything in existing code that would

[libvirt] [PATCH 2/2] snapshot: implement getparent for vbox

2011-09-29 Thread Eric Blake
Again, built by copying from existing functions. * src/vbox/vbox_tmpl.c (vboxDomainSnapshotGetParent): New function. --- I can only compile-test this; I'm relying on someone with an actual vbox setup to actually test it. Also, I didn't see anything in existing code that would efficiently

[libvirt] [PATCH 2.5/4] snapshot: virsh fallback for snapshot-list --tree --from

2011-09-29 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 (cmdSnapshotList): Add fallback. --- Can be

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

2011-09-29 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. --- Applies anywhere after 2.5/4, but again, easiest to test against the same version

[libvirt] [PATCH 2.7/4] snapshot: virsh fallback for snapshot-list --descendants --from

2011-09-29 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

Re: [libvirt] [PATCH 2.7/4] snapshot: virsh fallback for snapshot-list --descendants --from

2011-09-29 Thread Eric Blake
On 09/29/2011 04:39 PM, Eric Blake wrote: 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

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

2011-09-29 Thread Wen Congyang
At 09/29/2011 10:30 PM, Laine Stump Write: On 09/27/2011 05:13 AM, Daniel P. Berrange wrote: When we originally enabled multifunction for all PCI devices, we did so in the belief that this was effectively a no-op for guest OSes. ie it should not have changed guest OS behaviour at all, unless

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

2011-09-29 Thread Wen Congyang
At 09/29/2011 10:56 PM, Laine Stump Write: On 09/29/2011 10:30 AM, Laine Stump wrote: On 09/27/2011 05:13 AM, Daniel P. Berrange wrote: When we originally enabled multifunction for all PCI devices, we did so in the belief that this was effectively a no-op for guest OSes. ie it should not have

Re: [libvirt] [PATCH v2 1/4] api: Add public api for 'reset'

2011-09-29 Thread Xu He Jie
Thanks a lot! On 2011年09月29日 20:52, Eric Blake wrote: On 09/29/2011 02:53 AM, Xu He Jie wrote: Add new public api for 'reset'. It can reset domain immediately without any guest shutdown. /** + * virDomainReset: + * @domain: a domain object + * @flags: extra flags for the reboot operation,

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

2011-09-29 Thread Serge E. Hallyn
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 container is up. If it does this too quickly, then libvirt

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

2011-09-29 Thread MATSUDA, Daiki
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 --disk-only). So, finally qemu monitor command

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

2011-09-29 Thread Laine Stump
Problems have been encountered/realized with the practice of unconditionally setting the multifunction bit for all functions of all devices. PATCH 2/2 remedies that (details in its own commit comment). PATCH 1/2 is a one-liner I fixed in the meantime which will cause a simple conflict if it's not

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

2011-09-29 Thread Laine Stump
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 not an ideal solution, and that the multifunction bit must be

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

2011-09-29 Thread Laine Stump
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(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index