[libvirt] [PATCHv2 3/9] conf: virDomainNetDef points to (rather than contains) virtPortProfile

2011-07-20 Thread Laine Stump
The virtPortProfile in the domain interface struct is now a separately allocated object *pointed to by* (rather than contained in) the main virDomainNetDef object. This is done to make it easier to figure out when a virtualPortProfile has/hasn't been specified in a particular config. ---

Re: [libvirt] Build libvirt 0.9.3 failed

2011-07-20 Thread zhang xintao
config.log 38094 configure:54859:checking for LIBNL 38995 configure:54924:result: no 38096 configure:54924:error: libnl-devel = 1.1 is required for macvtap support I try to build libvirt 0.9.3 -without macvtap support but failed same error message. can you help me ? On Wed, Jul 20, 2011 at

[libvirt] [PATCHv2 7/9] qemu: use virDomainNetGetActual*() functions where appropriate

2011-07-20 Thread Laine Stump
The qemu driver accesses fields in the virDomainNetDef directly, but with the advent of the virDomainActualNetDef, some pieces of information may be found in a different place (the ActualNetDef) if the network connection is of type='network' and that network is of forward

[libvirt] [PATCHv2 1/9] util: define MAX

2011-07-20 Thread Laine Stump
If util.h is going to have a MIN, it may as well also have MAX. --- src/util/util.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/util/util.h b/src/util/util.h index e8197be..af8b15d 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -35,6 +35,9 @@ # ifndef

[libvirt] [PATCHv2 0/9] network: physical device abstraction aka 'virtual switch'

2011-07-20 Thread Laine Stump
This series deprecates patches 04/10 - 10/10 of the previous series of the same name, posted here: https://www.redhat.com/archives/libvir-list/2011-July/msg00149.html This patch is in response to the following bug reports: https://bugzilla.redhat.com/show_bug.cgi?id=643947 (RHEL)

[libvirt] [PATCHv2 4/9] conf: support abstracted interface info in domain interface XML

2011-07-20 Thread Laine Stump
the domain XML interface element is updated in the following ways: 1) virtualportprofile can be specified when source type='network' (previously it was only valid for source type='direct') (Since virtualPortProfile is going to be used in both the domain and network RNG, its RNG definition was

[libvirt] [PATCHv2 2/9] conf: put virtPortProfile struct / functions in a common location

2011-07-20 Thread Laine Stump
virtPortProfiles are currently only used in the domain XML, but will soon also be used in the network XML. To prepare for that change, this patch moves the structure definition into util/network.h and the parse and format functions into util/network.c (I decided that this was a better choice than

[libvirt] [PATCHv2 8/9] qemu: use virDomainNetGetActual*() in qemuDomainXMLToNative

2011-07-20 Thread Laine Stump
This is the one function outside of domain_conf.c that plays around with (even modifying) the internals of the virDomainNetDef, and thus can't be fixed up simply by replacing direct accesses to the fields of the struct with the GetActual*() access functions. In this case, we need to check if the

[libvirt] [PATCHv2 6/9] network: separate Start/Shutdown functions for new network types

2011-07-20 Thread Laine Stump
Previously all networks were composed of bridge devices created and managed by libvirt, and the same operations needed to be done for all of them when they were started and stopped (create and start the bridge device, configure its MAC address and IP address, add iptables rules). The new network

[libvirt] [PATCHv2 5/9] conf: support abstracted interface info in network XML

2011-07-20 Thread Laine Stump
The network XML is updated in the following ways: 1) The forward element can now contain a list of forward interfaces: forward interface dev='eth10'/ interface dev='eth11'/ interface dev='eth12'/ interface dev='eth13'/ /forward The first of these

[libvirt] [PATCHv2 9/9] network: internal API functions to manage assignment of physdev to guest

2011-07-20 Thread Laine Stump
The network driver needs to assign physical devices for use by modes that use macvtap, keeping track of which physical devices are in use (and how many instances, when the devices can be shared). Three calls are added: networkAllocateActualDevice - finds a physical device for use by the domain,

[libvirt] [PATCH RFC v4 4/6] qemu: Implement period and quota tunable XML configuration and parsing

2011-07-20 Thread Wen Congyang
--- src/conf/domain_conf.c | 20 +++- src/conf/domain_conf.h |2 + src/qemu/qemu_cgroup.c | 137 +++ src/qemu/qemu_cgroup.h |4 + src/qemu/qemu_process.c

[libvirt] [PATCH RFC v5 5/6] qemu: Implement cfs_period and cfs_quota's modification

2011-07-20 Thread Wen Congyang
--- src/qemu/qemu_driver.c | 312 1 files changed, 287 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index cd65bce..fd80537 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5139,11

[libvirt] [PATCH RFC v4 6/6] doc: Add documentation for new cputune elements period and quota

2011-07-20 Thread Wen Congyang
--- docs/formatdomain.html.in | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index a54ee6a..47edd35 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -307,6 +307,8 @@

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Markus Armbruster
Daniel P. Berrange berra...@redhat.com writes: On Tue, Jul 19, 2011 at 04:14:27PM +0100, Stefan Hajnoczi wrote: On Tue, Jul 19, 2011 at 3:30 PM, Jes Sorensen jes.soren...@redhat.com wrote: On 07/19/11 16:24, Eric Blake wrote: [adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen

[libvirt] [PATCHv2 1/4] util: add an ifaceGetIPAddress to the interface utilies

2011-07-20 Thread Laine Stump
This function uses ioctl(SIOCGIFADDR), which limits it to returning the first IPv4 address of an interface, but that's what we want right now (the place we're going to use the address only accepts one). --- src/libvirt_private.syms |1 + src/util/interface.c | 60

[libvirt] [PATCHv2 2/4] network: provide internal API to return IP of a network

2011-07-20 Thread Laine Stump
The new listenNetwork atribute needs to learn an IP address based on a named network. This patch provides a function networkGetNetworkAddress which provides that. Some networks have an IP address explicitly in their configuration (ie, those with a forward type of none, route, or nat). For those,

[libvirt] [PATCHv2 4/4] qemu: support the listenNetwork attribute in graphics

2011-07-20 Thread Laine Stump
The domain XML now understands an attribute named listenNetwork in the graphics element, and the network driver has an internal API that will turn a network name into an IP address, so the final logical step is to put the glue into the qemu driver such that when it is starting up a domain, if it

[libvirt] [PATCHv2 3/4] conf: add listenNetwork attribute to domain graphics element

2011-07-20 Thread Laine Stump
Once it's plugged in, listenNetwork will be an optional replacement for the listen attribute. While listen can be a host name or IP address, listenNetwork names one of the networks managed by libvirt (with virNetwork*()/visrh net-*). --- docs/schemas/domain.rng| 33

Re: [libvirt] [PATCH 0/7] Add support for setting QoS

2011-07-20 Thread Michal Privoznik
On 20.07.2011 04:33, Taku Izumi wrote: I could't build with this patchset applied in my environment. It seems that some tests failed. Did I make a mistake? ... make check-TESTS make[2]: Entering directory `/root/rpmbuild/BUILD/libvirt-0.9.3/tests' TEST: virshtest

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Jes Sorensen
On 07/19/11 18:46, Daniel P. Berrange wrote: On Tue, Jul 19, 2011 at 04:14:27PM +0100, Stefan Hajnoczi wrote: For fd-passing perhaps we have an opportunity to use a callback mechanism (QEMU request: filename - libvirt response: fd) and do all the image format parsing in QEMU. The reason why

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Jes Sorensen
On 07/19/11 18:14, Anthony Liguori wrote: As nice as that sentiment is, it will never fly, because it would be a regression in current behavior. The whole reason that the virt_use_nfs SELinux bool exists is that some people are willing to make the partial security tradeoff. Besides, the use

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Jes Sorensen
On 07/19/11 18:47, Daniel P. Berrange wrote: On Tue, Jul 19, 2011 at 04:30:19PM +0200, Jes Sorensen wrote: On 07/19/11 16:24, Eric Blake wrote: Besides, I feel that having a well-documented file format, so that independent applications can both parse the same file with the same semantics by

Re: [libvirt] [PATCH] virsh: add custom readline generator

2011-07-20 Thread Lai Jiangshan
On 06/28/2011 05:29 PM, Michal Privoznik wrote: On 27.06.2011 21:39, Eric Blake wrote: On 06/27/2011 12:06 PM, Michal Privoznik wrote: That is, if you have command-based custom generators, then each command has to repeat parsing functionality, then call back to common list generators; whereas

Re: [libvirt] [PATCH] virsh: add custom readline generator

2011-07-20 Thread Michal Privoznik
On 20.07.2011 10:42, Lai Jiangshan wrote: On 06/28/2011 05:29 PM, Michal Privoznik wrote: On 27.06.2011 21:39, Eric Blake wrote: On 06/27/2011 12:06 PM, Michal Privoznik wrote: That is, if you have command-based custom generators, then each command has to repeat parsing functionality, then

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Daniel P. Berrange
On Wed, Jul 20, 2011 at 10:23:12AM +0200, Jes Sorensen wrote: On 07/19/11 18:46, Daniel P. Berrange wrote: On Tue, Jul 19, 2011 at 04:14:27PM +0100, Stefan Hajnoczi wrote: For fd-passing perhaps we have an opportunity to use a callback mechanism (QEMU request: filename - libvirt response:

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Daniel P. Berrange
On Wed, Jul 20, 2011 at 10:26:49AM +0200, Jes Sorensen wrote: On 07/19/11 18:47, Daniel P. Berrange wrote: On Tue, Jul 19, 2011 at 04:30:19PM +0200, Jes Sorensen wrote: On 07/19/11 16:24, Eric Blake wrote: Besides, I feel that having a well-documented file format, so that independent

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Kevin Wolf
Am 19.07.2011 18:46, schrieb Daniel P. Berrange: On Tue, Jul 19, 2011 at 04:14:27PM +0100, Stefan Hajnoczi wrote: On Tue, Jul 19, 2011 at 3:30 PM, Jes Sorensen jes.soren...@redhat.com wrote: On 07/19/11 16:24, Eric Blake wrote: [adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Kevin Wolf
Am 20.07.2011 10:25, schrieb Jes Sorensen: On 07/19/11 18:14, Anthony Liguori wrote: As nice as that sentiment is, it will never fly, because it would be a regression in current behavior. The whole reason that the virt_use_nfs SELinux bool exists is that some people are willing to make the

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Daniel P. Berrange
On Wed, Jul 20, 2011 at 11:50:53AM +0200, Kevin Wolf wrote: Am 19.07.2011 18:46, schrieb Daniel P. Berrange: On Tue, Jul 19, 2011 at 04:14:27PM +0100, Stefan Hajnoczi wrote: On Tue, Jul 19, 2011 at 3:30 PM, Jes Sorensen jes.soren...@redhat.com wrote: On 07/19/11 16:24, Eric Blake wrote:

[libvirt] [PATCH] Should determine the value of client first before locking it

2011-07-20 Thread Guannan Ren
--- src/rpc/virnetclient.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index dfc4ed9..c100ef1 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -271,6 +271,9 @@ void virNetClientFree(virNetClientPtr

Re: [libvirt] remote driver RPC API usage breaks launching ssh askpass

2011-07-20 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 04:07:17PM -0400, Cole Robinson wrote: This commit broke launching SSH askpass from virt-manager: http://libvirt.org/git/?p=libvirt.git;a=commit;h=c1b226447781ba8367606f760dde6a88414382a3 Using upstream virt-manager, running python src/virt-manager.py and

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Stefan Hajnoczi
On Wed, Jul 20, 2011 at 11:28 AM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Jul 20, 2011 at 12:15:02PM +0200, Nicolas Sebrecht wrote: The 20/07/11, Daniel P. Berrange wrote: To make the decision whether the filename from QEMU is valid, we have to parse the master image header

Re: [libvirt] [PATCH] Should determine the value of client first before locking it

2011-07-20 Thread Daniel P. Berrange
On Wed, Jul 20, 2011 at 06:43:12PM +0800, Guannan Ren wrote: --- src/rpc/virnetclient.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index dfc4ed9..c100ef1 100644 --- a/src/rpc/virnetclient.c +++

Re: [libvirt] Build libvirt 0.9.3 failed

2011-07-20 Thread Osier Yang
于 2011年07月20日 14:20, zhang xintao 写道: config.log 38094 configure:54859:checking for LIBNL 38995 configure:54924:result: no 38096 configure:54924:error: libnl-devel= 1.1 is required for macvtap support I try to build libvirt 0.9.3 -without macvtap support but failed same error message. Can

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-20 Thread Stefan Hajnoczi
On Mon, Jul 18, 2011 at 9:10 PM, Adam Litke a...@us.ibm.com wrote: On 07/18/2011 09:35 AM, Stefan Hajnoczi wrote:   On the other hand I suspect that we are missing the mechanism to control the rate of the transfer in the new API, which is something which could be implemented in the old

[libvirt] [PATCH 0/3] Fixes to key usage/purpose checking

2011-07-20 Thread Daniel P. Berrange
We were not correctly checking key usage/purpose as per RFC recommendations. We should have been treated unavailable info as a non-fatal condition, and should have honoured the criticality field -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 3/3] Honour key usage/purpose criticality flag

2011-07-20 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If a key purpose or usage field is marked as non-critical in the certificate, then a data mismatch is not (ordinarily) a cause for rejecting the connection * src/rpc/virnettlscontext.c: Honour key usage/purpose criticality ---

[libvirt] [PATCH 1/3] Fix mixed up error messages when reporting TLS certificate problems

2011-07-20 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com * src/rpc/virnettlscontext.c: Fix mixed up error messages --- src/rpc/virnettlscontext.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-20 Thread Stefan Hajnoczi
On Wed, Jul 20, 2011 at 2:00 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Jul 18, 2011 at 9:10 PM, Adam Litke a...@us.ibm.com wrote: On 07/18/2011 09:35 AM, Stefan Hajnoczi wrote:   On the other hand I suspect that we are missing the mechanism to control the rate of the transfer in

[libvirt] [PATCH 2/3] Fix checking of key usage/purpose data

2011-07-20 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If key usage or purpose data is not present in the cert, the RFC recommends that access be allowed. Also fix checking of key usage to include requirements for client/server certs, and fix key purpose checking to treat data as a list of bits ---

[libvirt] Schedule for release of 0.9.4

2011-07-20 Thread Daniel Veillard
I should have posted this beginning of this week... Basically I would like to freeze for 0.9.4 next Monday, which means we need to finish ACK'ing and pushing the number of patch sets which are well advanced already. Then try to get a final 0.9.4 release on Aug 1 or 2. So let's make sure we

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Jes Sorensen
On 07/20/11 12:01, Kevin Wolf wrote: Right, we're stuck with the two horros of NFS and selinux, so we need something that gets around the problem. In a sane world we would simply say 'no NFS, no selinux', but as you say that will never happen. My suggestion of a callback mechanism where

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-20 Thread Kevin Wolf
Am 20.07.2011 15:12, schrieb Stefan Hajnoczi: On Wed, Jul 20, 2011 at 2:00 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Jul 18, 2011 at 9:10 PM, Adam Litke a...@us.ibm.com wrote: On 07/18/2011 09:35 AM, Stefan Hajnoczi wrote: On the other hand I suspect that we are missing the

Re: [libvirt] [PATCH 1/3] Fix mixed up error messages when reporting TLS certificate problems

2011-07-20 Thread Daniel Veillard
On Wed, Jul 20, 2011 at 02:12:45PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com * src/rpc/virnettlscontext.c: Fix mixed up error messages --- src/rpc/virnettlscontext.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff

Re: [libvirt] [PATCH 2/3] Fix checking of key usage/purpose data

2011-07-20 Thread Daniel Veillard
On Wed, Jul 20, 2011 at 02:12:46PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If key usage or purpose data is not present in the cert, the RFC recommends that access be allowed. Also fix checking of key usage to include requirements for client/server certs,

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Kevin Wolf
Am 20.07.2011 15:25, schrieb Jes Sorensen: On 07/20/11 12:01, Kevin Wolf wrote: Right, we're stuck with the two horros of NFS and selinux, so we need something that gets around the problem. In a sane world we would simply say 'no NFS, no selinux', but as you say that will never happen. My

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 07:25 AM, Jes Sorensen wrote: I think if libvirt wants qemu to use an fd instead of a file name, it shouldn't pass a file name but an fd in the first place. Which means that the two that we need are support for an fd: protocol (patches on the list, need review), and a way for

Re: [libvirt] [PATCH 3/3] Honour key usage/purpose criticality flag

2011-07-20 Thread Daniel Veillard
On Wed, Jul 20, 2011 at 02:12:47PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If a key purpose or usage field is marked as non-critical in the certificate, then a data mismatch is not (ordinarily) a cause for rejecting the connection *

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-20 Thread Michal Privoznik
On 19.07.2011 17:17, Eric Blake wrote: On 07/19/2011 09:12 AM, Michal Privoznik wrote: On 19.07.2011 17:01, Eric Blake wrote: On 07/19/2011 08:52 AM, Michal Privoznik wrote: DMI is Intel Intel-compatible specific. Don't try to dump information on non-compatible architectures, which results

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-20 Thread Eric Blake
On 07/20/2011 08:09 AM, Michal Privoznik wrote: That depends on how things behave on other arches. I don't have ready access to such an architecture, which is why I'm asking - do we already gracefully handle any failures on code paths that try to use dmidecode, or are there currently code paths

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-20 Thread Eric Blake
On 07/19/2011 09:01 AM, Eric Blake wrote: But do we also need to patch src/util/sysinfo.c, which makes callouts to dmidecode(1)? That is, if libsmbios is arch-specific, then I imagine that so is dmidecode, and do we gracefully handle dmidecode failures in that case? Oh, and while I'm thinking

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-20 Thread Stefan Hajnoczi
On Wed, Jul 20, 2011 at 2:40 PM, Kevin Wolf kw...@redhat.com wrote: Am 20.07.2011 15:12, schrieb Stefan Hajnoczi: On Wed, Jul 20, 2011 at 2:00 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Jul 18, 2011 at 9:10 PM, Adam Litke a...@us.ibm.com wrote: On 07/18/2011 09:35 AM, Stefan

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-20 Thread Stefan Hajnoczi
On Wed, Jul 20, 2011 at 3:25 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Wed, Jul 20, 2011 at 2:40 PM, Kevin Wolf kw...@redhat.com wrote: Am 20.07.2011 15:12, schrieb Stefan Hajnoczi: On Wed, Jul 20, 2011 at 2:00 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Jul 18, 2011 at 9:10

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-20 Thread Michal Privoznik
On 20.07.2011 16:20, Eric Blake wrote: On 07/20/2011 08:09 AM, Michal Privoznik wrote: That depends on how things behave on other arches. I don't have ready access to such an architecture, which is why I'm asking - do we already gracefully handle any failures on code paths that try to use

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-20 Thread Eric Blake
On 07/20/2011 08:54 AM, Michal Privoznik wrote: -#ifdef WIN32 +#if defined(WIN32) || \ + defined(__x86_64__) || \ + defined(__i386__) || \ + defined(__amd64__) In fact, we need a patch with complement condition: Doh, serves me right for typing without testing. diff --git

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-20 Thread Michal Privoznik
On 20.07.2011 16:58, Eric Blake wrote: On 07/20/2011 08:54 AM, Michal Privoznik wrote: -#ifdef WIN32 +#if defined(WIN32) || \ + defined(__x86_64__) || \ + defined(__i386__) || \ + defined(__amd64__) In fact, we need a patch with complement condition: Doh, serves me right for typing

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-20 Thread Michal Privoznik
On 20.07.2011 16:25, Eric Blake wrote: On 07/19/2011 09:01 AM, Eric Blake wrote: But do we also need to patch src/util/sysinfo.c, which makes callouts to dmidecode(1)? That is, if libsmbios is arch-specific, then I imagine that so is dmidecode, and do we gracefully handle dmidecode failures in

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 4:51 PM, Kevin Wolf kw...@redhat.com wrote: Am 20.07.2011 15:25, schrieb Jes Sorensen: On 07/20/11 12:01, Kevin Wolf wrote: Right, we're stuck with the two horros of NFS and selinux, so we need something that gets around the problem. In a sane world we would simply say

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 4:46 PM, Eric Blake ebl...@redhat.com wrote: On 07/20/2011 07:25 AM, Jes Sorensen wrote: I think if libvirt wants qemu to use an fd instead of a file name, it shouldn't pass a file name but an fd in the first place. Which means that the two that we need are support for

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 11:20 AM, Blue Swirl wrote: There could still be some issues: Let's have files A, B, C etc. with backing files AA etc. How would libvirt know that when QEMU wants to write to file CA, this is because it's needed to access C, or is it just trickery by a devious guest to corrupt

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 11:27 AM, Blue Swirl wrote: We've already told you - qemu must have a way to be passed fds which are associated with names, and when a file refers to another backing file by name, then qemu falls back on its fd/name mapping to use the already-passed fd instead. Which implies that

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 8:41 PM, Eric Blake ebl...@redhat.com wrote: On 07/20/2011 11:20 AM, Blue Swirl wrote: There could still be some issues: Let's have files A, B, C etc. with backing files AA etc. How would libvirt know that when QEMU wants to write to file CA, this is because it's

Re: [libvirt] remote driver RPC API usage breaks launching ssh askpass

2011-07-20 Thread Cole Robinson
On 07/20/2011 07:32 AM, Daniel P. Berrange wrote: On Tue, Jul 19, 2011 at 04:07:17PM -0400, Cole Robinson wrote: This commit broke launching SSH askpass from virt-manager: http://libvirt.org/git/?p=libvirt.git;a=commit;h=c1b226447781ba8367606f760dde6a88414382a3 Using upstream virt-manager,

[libvirt] [PATCH] rpc: Pass through DISPLAY so ssh can launch askpass

2011-07-20 Thread Cole Robinson
Though we prefer users to have SSH keys setup, virt-manager users still depend on remote SSH connections to launch a password dialog. This fixes launch ssh-askpass Fix suggested by danpb --- src/rpc/virnetsocket.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH] rpc: Pass through DISPLAY so ssh can launch askpass

2011-07-20 Thread Daniel P. Berrange
On Wed, Jul 20, 2011 at 02:14:43PM -0400, Cole Robinson wrote: Though we prefer users to have SSH keys setup, virt-manager users still depend on remote SSH connections to launch a password dialog. This fixes launch ssh-askpass Fix suggested by danpb --- src/rpc/virnetsocket.c |1 + 1

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 12:00 PM, Blue Swirl wrote: Let's have files A, B, C etc. with backing files AA etc. How would libvirt know that when QEMU wants to write to file CA, this is because it's needed to access C, or is it just trickery by a devious guest to corrupt storage? The fix for CVE-2010-2238

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 8:47 PM, Eric Blake ebl...@redhat.com wrote: On 07/20/2011 11:27 AM, Blue Swirl wrote: We've already told you - qemu must have a way to be passed fds which are associated with names, and when a file refers to another backing file by name, then qemu falls back on its

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 9:17 PM, Eric Blake ebl...@redhat.com wrote: On 07/20/2011 12:00 PM, Blue Swirl wrote: Let's have files A, B, C etc. with backing files AA etc. How would libvirt know that when QEMU wants to write to file CA, this is because it's needed to access C, or is it just

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 02:01 PM, Blue Swirl wrote: Either because CA was mentioned as a backing file for C (in which case libvirt already knows about it, because either libvirt handed C to qemu at startup time after already parsing C's headers to learn that CA is a backing file, or because libvirt called

Re: [libvirt] [PATCHv2 1/9] util: define MAX

2011-07-20 Thread Eric Blake
On 07/20/2011 12:21 AM, Laine Stump wrote: If util.h is going to have a MIN, it may as well also have MAX. --- src/util/util.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/util/util.h b/src/util/util.h index e8197be..af8b15d 100644 --- a/src/util/util.h +++

Re: [libvirt] [PATCH] rpc: Pass through DISPLAY so ssh can launch askpass

2011-07-20 Thread Cole Robinson
On 07/20/2011 02:15 PM, Daniel P. Berrange wrote: On Wed, Jul 20, 2011 at 02:14:43PM -0400, Cole Robinson wrote: Though we prefer users to have SSH keys setup, virt-manager users still depend on remote SSH connections to launch a password dialog. This fixes launch ssh-askpass Fix suggested

Re: [libvirt] [PATCHv2 2/9] conf: put virtPortProfile struct / functions in a common location

2011-07-20 Thread Eric Blake
On 07/20/2011 12:21 AM, Laine Stump wrote: virtPortProfiles are currently only used in the domain XML, but will soon also be used in the network XML. To prepare for that change, this patch moves the structure definition into util/network.h and the parse and format functions into util/network.c

[libvirt] [PATCH 18/16] save: wire up remote protocol

2011-07-20 Thread Eric Blake
* src/remote/remote_driver.c (remote_driver): Add new callbacks. * src/remote/remote_protocol.x (remote_procedure): New RPCs. (remote_domain_save_image_get_xml_desc_args) (remote_domain_save_image_get_xml_desc_ret) (remote_domain_save_image_define_xml_args): New structs. *

[libvirt] [PATCH 17/16] save: new API to manipulate save file images

2011-07-20 Thread Eric Blake
Modifying the xml on either save or restore only gets you so far - you have to remember to 'virsh dumpxml dom' just prior to the 'virsh save' in order to have an xml file worth modifying that won't be rejected due to abi breaks. To make this more powerful, we need a way to grab the xml embedded

[libvirt] [PATCH 19/16] save: add virsh commands for manipulating save files

2011-07-20 Thread Eric Blake
Now you can edit a saved state file even if you forgot to grab a dumpxml file prior to saving a domain. Plus, in-place editing feels so much nicer. * tools/virsh.c (cmdSaveImageDumpxml, cmdSaveImageDefine) (cmdSaveImageEdit): New commands. * tools/virsh.pod (save-image-dumpxml,

[libvirt] [PATCH 20/16] save: let qemu driver manipulate save files

2011-07-20 Thread Eric Blake
* src/qemu/qemu_driver.c (qemuDomainSaveImageGetXMLDesc) (qemuDomainSaveImageDefineXML): New functions. (qemuDomainSaveImageOpen): Add parameter. (qemuDomainRestoreFlags, qemuDomainObjRestore): Adjust clients. (qemuDomainSaveInternal): Simplify array expansion. --- Tested via: virsh save dom

Re: [libvirt] [PATCHv2 3/9] conf: virDomainNetDef points to (rather than contains) virtPortProfile

2011-07-20 Thread Eric Blake
On 07/20/2011 12:21 AM, Laine Stump wrote: The virtPortProfile in the domain interface struct is now a separately allocated object *pointed to by* (rather than contained in) the main virDomainNetDef object. This is done to make it easier to figure out when a virtualPortProfile has/hasn't been

Re: [libvirt] [PATCH v2 0/7] Add support for setting QoS

2011-07-20 Thread Laine Stump
On 07/18/2011 09:59 AM, Jiri Denemark wrote: One more thing. Would it be possible to also implement new APIs to manage network bandwidth on-the-fly? It's not for this patchset but is does sound like a good idea to have the possibility to, for example, restrict bandwidth of a running domain since

Re: [libvirt] [PATCHv2 4/9] conf: support abstracted interface info in domain interface XML

2011-07-20 Thread Eric Blake
On 07/20/2011 12:21 AM, Laine Stump wrote: the domain XMLinterface element is updated in the following ways: 1)virtualportprofile can be specified when source type='network' (previously it was only valid for source type='direct') (Since virtualPortProfile is going to be used in both the

Re: [libvirt] [PATCH 1/7] bandwidth: Define schema and create documentation

2011-07-20 Thread Laine Stump
On 07/18/2011 04:05 PM, Michal Privoznik wrote: Define new 'bandwidth' element with possible child element 'inbound' and 'outbound' addressing incoming and outgoing traffic respectively: bandwidth inbound average='1000' peak='2000' burst='5120'/ outbound average='500'/ /bandwidth Leaving

Re: [libvirt] [PATCH 2/7] bandwidth: Declare internal structures

2011-07-20 Thread Laine Stump
On 07/18/2011 04:05 PM, Michal Privoznik wrote: --- src/util/network.h | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/util/network.h b/src/util/network.h index ed0b78c..af32558 100644 --- a/src/util/network.h +++ b/src/util/network.h @@ -45,6 +45,20

Re: [libvirt] [PATCH 3/7] bandwidth: Add parsing functions

2011-07-20 Thread Laine Stump
On 07/18/2011 04:05 PM, Michal Privoznik wrote: These functions parse given XML node and store the output at given pointer. Unknown elements are silently ignored. Attributes must be integer and must fit in unsigned long. --- src/conf/domain_conf.c |3 + src/conf/domain_conf.h |1 +

Re: [libvirt] [PATCHv2 5/9] conf: support abstracted interface info in network XML

2011-07-20 Thread Eric Blake
On 07/20/2011 12:21 AM, Laine Stump wrote: The network XML is updated in the following ways: 1) Theforward element can now contain a list of forward interfaces: forward interface dev='eth10'/ interface dev='eth11'/ interface dev='eth12'/ interface

Re: [libvirt] [PATCHv2 6/9] network: separate Start/Shutdown functions for new network types

2011-07-20 Thread Eric Blake
On 07/20/2011 12:21 AM, Laine Stump wrote: Previously all networks were composed of bridge devices created and managed by libvirt, and the same operations needed to be done for all of them when they were started and stopped (create and start the bridge device, configure its MAC address and IP

[libvirt] [PATCH] maint: fix typos on guaranteed

2011-07-20 Thread Eric Blake
* src/conf/domain_event.c (virDomainEventDispatch): Fix typo. * src/internal.h (ATTRIBUTE_FMT_PRINTF): Likewise. * src/libvirt.c (virStreamEventUpdateCallback): Likewise. * src/remote/remote_driver.c (doRemoteOpen): Likewise. * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):

Re: [libvirt] [PATCHv2 7/9] qemu: use virDomainNetGetActual*() functions where appropriate

2011-07-20 Thread Eric Blake
On 07/20/2011 12:21 AM, Laine Stump wrote: The qemu driver accesses fields in the virDomainNetDef directly, but with the advent of the virDomainActualNetDef, some pieces of information may be found in a different place (the ActualNetDef) if the network connection is of type='network' and that

Re: [libvirt] [PATCHv2 8/9] qemu: use virDomainNetGetActual*() in qemuDomainXMLToNative

2011-07-20 Thread Eric Blake
On 07/20/2011 12:21 AM, Laine Stump wrote: This is the one function outside of domain_conf.c that plays around with (even modifying) the internals of the virDomainNetDef, and thus can't be fixed up simply by replacing direct accesses to the fields of the struct with the GetActual*() access

Re: [libvirt] [PATCH] error: preserve errno when saving last error

2011-07-20 Thread Laine Stump
On 07/20/2011 07:15 PM, Eric Blake wrote: It is common to see the sequence: virErrorPtr save_err = virSaveLastError(); // do cleanup virSetError(save_err); virFreeError(save_err); on cleanup paths. But for functions where it is desirable to return the errno that caused failure, this sequence

Re: [libvirt] [PATCH 0/7] Add support for setting QoS

2011-07-20 Thread Taku Izumi
On Wed, 20 Jul 2011 10:17:14 +0200 Michal Privoznik mpriv...@redhat.com wrote: That's strange. Works for me. Can you please run: cd tests; VIR_TEST_DEBUG=1 ./domainschematest or ./networkschematest It should help me to trace error. Btw: I suppose current master runs without these errors for

[libvirt] [PATCH RESEND RFC v4 0/6] support cpu bandwidth in libvirt

2011-07-20 Thread Wen Congyang
Resend this patchset TODO: 1. We create sub directory for each vcpu in cpu subsystem. So we should recalculate cpu.shares for each vcpu. Changelog: v4: address Adam Litke's comment v3: fix some small bugs implement the simple way v2: almost rewrite the patchset to support to control each

[libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-20 Thread Wen Congyang
Introduce the function virCgroupForVcpu() to create sub directory for each vcpu. --- src/libvirt_private.syms |1 + src/util/cgroup.c| 72 ++--- src/util/cgroup.h|5 +++ 3 files changed, 73 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCH RESEND RFC v4 2/6] cgroup: Implement cpu.cfs_period_us and cpu.cfs_quota_us tuning API

2011-07-20 Thread Wen Congyang
--- src/libvirt_private.syms |4 ++ src/util/cgroup.c| 81 -- src/util/cgroup.h|6 +++ 3 files changed, 88 insertions(+), 3 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 30804eb..8b73ec3

[libvirt] [PATCH RESEND RFC v4 3/6] Update XML Schema for new entries

2011-07-20 Thread Wen Congyang
--- docs/schemas/domain.rng | 26 +- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 8a4e3fe..5f8151d 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -388,6 +388,16 @@

[libvirt] [PATCH RESEND RFC v4 6/6] doc: Add documentation for new cputune elements period and quota

2011-07-20 Thread Wen Congyang
--- docs/formatdomain.html.in | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index a54ee6a..47edd35 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -307,6 +307,8 @@

[libvirt] [PATCH RESEND RFC v4 4/6] qemu: Implement period and quota tunable XML configuration and parsing

2011-07-20 Thread Wen Congyang
--- src/conf/domain_conf.c | 20 +++- src/conf/domain_conf.h |2 + src/qemu/qemu_cgroup.c | 137 +++ src/qemu/qemu_cgroup.h |4 + src/qemu/qemu_process.c

[libvirt] [PATCH RESEND RFC v4 5/6] qemu: Implement cfs_period and cfs_quota's modification

2011-07-20 Thread Wen Congyang
--- src/qemu/qemu_driver.c | 312 1 files changed, 287 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index cd65bce..fd80537 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5139,11

Re: [libvirt] Schedule for release of 0.9.4

2011-07-20 Thread Wen Congyang
At 07/20/2011 09:24 PM, Daniel Veillard Write: I should have posted this beginning of this week... Basically I would like to freeze for 0.9.4 next Monday, which means we need to finish ACK'ing and pushing the number of patch sets which are well advanced already. Then try to get a final 0.9.4

Re: [libvirt] Schedule for release of 0.9.4

2011-07-20 Thread Daniel Veillard
On Thu, Jul 21, 2011 at 10:13:16AM +0800, Wen Congyang wrote: At 07/20/2011 09:24 PM, Daniel Veillard Write: I should have posted this beginning of this week... Basically I would like to freeze for 0.9.4 next Monday, which means we need to finish ACK'ing and pushing the number of patch

Re: [libvirt] [PATCH 0/7] Add support for setting QoS

2011-07-20 Thread Osier Yang
于 2011年07月21日 09:35, Taku Izumi 写道: On Wed, 20 Jul 2011 10:17:14 +0200 Michal Privoznikmpriv...@redhat.com wrote: That's strange. Works for me. Can you please run: cd tests; VIR_TEST_DEBUG=1 ./domainschematest or ./networkschematest It should help me to trace error. Btw: I suppose current

  1   2   >