[libvirt] [libvirt-php] Add volume clone support

2011-03-25 Thread Lyre
New API: libvirt_storagevolume_create_xml_from () --- src/libvirt-php.c | 59 +++- src/libvirt-php.h |1 + 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index 890b447..3179271 100644 --- a

Re: [libvirt] [RFC PATCHv4 15/15] qemu: support fd: migration with compression

2011-03-25 Thread Eric Blake
On 03/09/2011 07:18 PM, Eric Blake wrote: > Spawn the compressor ourselves, instead of requiring the shell. > > * src/qemu/qemu_driver.c (qemuDomainMigrateToFile): Spawn > compression helper process when needed. > --- > src/qemu/qemu_driver.c | 37 - > 1 file

Re: [libvirt] [RFC PATCHv4 14/15] qemu: skip granting access during fd migration

2011-03-25 Thread Eric Blake
On 03/10/2011 05:19 AM, Daniel P. Berrange wrote: > On Wed, Mar 09, 2011 at 07:18:32PM -0700, Eric Blake wrote: >> SELinux labeling and cgroup ACLs aren't required if we hand a >> pre-opened fd to qemu. All the more reason to love fd: migration. > > I know that holds true for cgroups which checks

Re: [libvirt] [RFC PATCHv4 13/15] qemu: consolidate migration to file code

2011-03-25 Thread Eric Blake
On 03/10/2011 05:16 AM, Daniel P. Berrange wrote: > On Wed, Mar 09, 2011 at 07:18:31PM -0700, Eric Blake wrote: >> This points out that core dumps (still) don't work for root-squash >> NFS, since the fd is not opened correctly. This patch should not >> introduce any functionality change, it is jus

Re: [libvirt] [PATCHv4 12/15] qemu: use common API for reading difficult files

2011-03-25 Thread Eric Blake
On 03/10/2011 05:14 AM, Daniel P. Berrange wrote: > On Wed, Mar 09, 2011 at 07:18:30PM -0700, Eric Blake wrote: >> Direct access to an open file is so much simpler than passing >> everything through a pipe! > > Did you test with SELinux in enforcing mode - there's a very > slight chance this could

Re: [libvirt] [PATCHv2] Don't allow two or more disks to be mapped to the same image file

2011-03-25 Thread Josh Durgin
On 03/25/2011 12:06 AM, Hu Tao wrote: > On Thu, Mar 24, 2011 at 04:22:38PM -0700, Josh Durgin wrote: >> This won't work for network disks, which aren't files. To check >> for network disk conflicts, you'd need to check that whether any >> host and port are the same as well. This won't be perfect, s

Re: [libvirt] [PATCH 2/2] maint: prohibit access(,X_OK)

2011-03-25 Thread Eric Blake
On 03/24/2011 03:22 PM, Eric Blake wrote: >> Here you (rightly) removed the examination of sb. That means that the >> only result of the call to stat() (just out of view of the diff) used is >> the return value. Maybe that could be changed to virFileExists(), or >> even just simplify the code and p

Re: [libvirt] [PATCH] Add support for DNS TXT records

2011-03-25 Thread Laine Stump
I haven't had time yet to look at the code in detail, but thought I should send this preliminary commentary. On 03/24/2011 09:58 AM, Michal Novotny wrote: Hi, this is the patch to add DNS TXT record support to libvirt networking driver since this is feature that's supported by DNSMasq that's be

[libvirt] [PATCH] remote: fix memory leak

2011-03-25 Thread Eric Blake
Detected in this valgrind run: https://bugzilla.redhat.com/show_bug.cgi?id=690734 ==13864== 10 bytes in 1 blocks are definitely lost in loss record 10 of 34 ==13864==at 0x4A05FDE: malloc (vg_replace_malloc.c:236) ==13864==by 0x308587FD91: strdup (in /lib64/libc-2.12.so) ==13864==by 0x3B

[libvirt] [PATCH] Reserve first 3 PCI slots for hardcoded devices

2011-03-25 Thread Philipp Hahn
If a domain is initially created without a device but with other devices (like ), PCI device slots normally reserved for hardcoded devices (host bridge, IDE controller, video) get assigned to these. If than later on a device is added without removing the already assigned s, the re-definition fail

Re: [libvirt] [PATCH V5] Add libxenlight driver

2011-03-25 Thread Jim Fehlig
Eric Blake wrote: > On 03/10/2011 01:54 AM, Daniel Veillard wrote: > >>> AC_MSG_NOTICE([VBox: $with_vbox]) >>> AC_MSG_NOTICE([ XenAPI: $with_xenapi]) >>> +AC_MSG_NOTICE([libxenlight: $with_libxl]) >>> >> instead >>AC_MSG_NOTICE([ libxl: $with_libxl]) >> or >>AC_MSG_NOTICE

Re: [libvirt] [PATCH] Add missing { for qemudDomainInterfaceStats

2011-03-25 Thread Eric Blake
On 03/25/2011 09:42 AM, Philipp Hahn wrote: > Add missing open curly brace between function declaration of non-linux > variant of qemudDomainInterfaceStats() and its body. > > Signed-off-by: Philipp Hahn > --- > src/qemu/qemu_driver.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-)

Re: [libvirt] [PATCH] qemu: Only restore security label when saving is successfull.

2011-03-25 Thread Eric Blake
On 03/25/2011 02:54 AM, Osier Yang wrote: > "qemudDomainSaveFlag" trys to restore security label even if > the saving fails, a useless warning will be thowed then, e.g. > if "doStopVcpus" fails. > > * src/qemu/qemu_driver.c > --- > src/qemu/qemu_driver.c |5 - > 1 files changed, 4 inserti

[libvirt] [PATCH] Add missing { for qemudDomainInterfaceStats

2011-03-25 Thread Philipp Hahn
Add missing open curly brace between function declaration of non-linux variant of qemudDomainInterfaceStats() and its body. Signed-off-by: Philipp Hahn --- src/qemu/qemu_driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_drive

Re: [libvirt] Update on the goal page, patch and discussion

2011-03-25 Thread Eric Blake
On 03/24/2011 04:40 AM, Daniel Veillard wrote: > It is a patch but beyond the unevitable spelling errors it contains > I would appreciate some feedback on the content, which also defines the > limits of the project. > > Some significant things to note in the diff below: >- we do extend libvi

Re: [libvirt] [PATCH V5] Add libxenlight driver

2011-03-25 Thread Eric Blake
On 03/10/2011 01:54 AM, Daniel Veillard wrote: >> AC_MSG_NOTICE([VBox: $with_vbox]) >> AC_MSG_NOTICE([ XenAPI: $with_xenapi]) >> +AC_MSG_NOTICE([libxenlight: $with_libxl]) > > instead >AC_MSG_NOTICE([ libxl: $with_libxl]) > or >AC_MSG_NOTICE([xenlight: $with_libxl]) > would keep m

[libvirt] [PATCH] virsh: Increase device-detach intelligence

2011-03-25 Thread Michal Privoznik
Up to now users have to give a full XML description on input when device-detaching. If they omited something it lead to unclear error messages (like generated MAC wasn't found, etc.). With this patch users can specify only those information which specify one device sufficiently precise. Remaining i

Re: [libvirt] [PATCHv2] Don't allow two or more disks to be mapped to the same image file

2011-03-25 Thread Laine Stump
On 03/25/2011 03:00 AM, Hu Tao wrote: On Thu, Mar 24, 2011 at 03:45:26PM -0600, Eric Blake wrote: On 03/24/2011 02:46 AM, Hu Tao wrote: If two or more disks are mapped to the same image file, operating on these disks at the same time may corrupt data stored in the image file. changes: v2: -

Re: [libvirt] [PATCH] daemon: Avoid resetting errors before they are reported

2011-03-25 Thread Jiri Denemark
On Fri, Mar 25, 2011 at 07:57:44 -0600, Eric Blake wrote: > On 03/25/2011 05:38 AM, Jiri Denemark wrote: > > Commit f44bfb7 was supposed to make sure no additional libvirt API (esp. > > *Free) is called before remoteDispatchConnError() is called on error. > > However, the patch missed two instances

Re: [libvirt] [PATCH] daemon: Avoid resetting errors before they are reported

2011-03-25 Thread Eric Blake
On 03/25/2011 05:38 AM, Jiri Denemark wrote: > Commit f44bfb7 was supposed to make sure no additional libvirt API (esp. > *Free) is called before remoteDispatchConnError() is called on error. > However, the patch missed two instances. > --- > daemon/remote.c |6 -- > 1 files changed, 4 ins

Re: [libvirt] CPU compare and baseline

2011-03-25 Thread Jiri Denemark
> Ok, I didn't understand how to use "cpu-baseline", it's not clear in > the help command. > So "cpu-baseline" give me the CPU XML file I need to use to be able to > migrate between two hosts but how I use this XML file ? You can just stick the output of cpu-baseline to guest's XML file, so you co

Re: [libvirt] [PATCHv2 3/3] command: add virCommandAbort for cleanup paths

2011-03-25 Thread Eric Blake
On 03/24/2011 09:16 PM, Daniel Veillard wrote: > On Wed, Mar 23, 2011 at 05:48:13PM -0600, Eric Blake wrote: >> Sometimes, an asynchronous helper is started (such as a compressor >> or iohelper program), but a later error means that we want to >> abort that child. Make this easier. >> >> Note that

[libvirt] [PATCH] daemon: Avoid resetting errors before they are reported

2011-03-25 Thread Jiri Denemark
Commit f44bfb7 was supposed to make sure no additional libvirt API (esp. *Free) is called before remoteDispatchConnError() is called on error. However, the patch missed two instances. --- daemon/remote.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon/remote.c

Re: [libvirt] [PATCH 4/8] Add memory functions to libxl driver

2011-03-25 Thread Jim Fehlig
Jim Fehlig wrote: > Markus Groß wrote: > >> --- >> src/libxl/libxl_driver.c | 131 >> -- >> 1 files changed, 127 insertions(+), 4 deletions(-) >> >> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c >> index 49fc90f..32bf12e 100644 >>

Re: [libvirt] [PATCHv2] Don't allow two or more disks to be mapped to the same image file

2011-03-25 Thread Nathan Baum
On Fri, 25 Mar 2011 14:26:16 +0800 Hu Tao wrote: > On Thu, Mar 24, 2011 at 11:05:08AM +, Nathan Baum wrote: > > On Thu, 24 Mar 2011 16:46:14 +0800 > > Hu Tao wrote: > > > > > If two or more disks are mapped to the same image file, operating > > > on these disks at the same time may corrupt

[libvirt] [PATCH] qemu: Only restore security label when saving is successfull.

2011-03-25 Thread Osier Yang
"qemudDomainSaveFlag" trys to restore security label even if the saving fails, a useless warning will be thowed then, e.g. if "doStopVcpus" fails. * src/qemu/qemu_driver.c --- src/qemu/qemu_driver.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.

[libvirt] [PATCHv7 4/4] libvirt/qemu - verify new device at attaching persistent.

2011-03-25 Thread KAMEZAWA Hiroyuki
>From 8423316cbd8e4efa4240cc73ac65955d87cb9921 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Fri, 25 Mar 2011 17:13:05 +0900 Subject: [PATCHv7 4/4] libvirt/qemu - verify new device at attaching persistent When adding a device by attach-device in --persistent mode, the user can pass inval

[libvirt] [PATCHv7 3/4] libvirt/qemu - check address confliction before addition.

2011-03-25 Thread KAMEZAWA Hiroyuki
>From 638341bdf3eaac824e36d265e134608279750049 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Fri, 25 Mar 2011 17:10:58 +0900 Subject: [PATCHv7 3/4] libvirt/qemu - check address confliction before addition. qemuDomainAttachDevicePersistent() calls qemuDomainAssignPCIAddresses() and virDom

[libvirt] [PATCHv7 2/4] libvirt/qemu - support persistent disk modification

2011-03-25 Thread KAMEZAWA Hiroyuki
>From 4da9bdc62bb2b26610eb3b1ea8776d90af04dabc Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Fri, 25 Mar 2011 17:08:36 +0900 Subject: [PATCHv7 2/4] libvirt/qemu - support persistent disk modification support changes of disks by VIR_DOMAIN_DEVICE_MODIFY_CONFIG for qemu. Signed-off-by: KA

[libvirt] [Patch v7 1/4] libvirt/qemu - persistent modification of domain.

2011-03-25 Thread KAMEZAWA Hiroyuki
This is v7. Dropped patches for Nics and added 2 sanity checks and show correct error messages. = >From 948597237bd9ecfc5c7343fd30efdca37733274e Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Fri, 25 Mar 2011 16:59:55 +0900 Subject: [PATCHv7 1/4] libvirt/qemu - persistent modification of

Re: [libvirt] [PATCHv2] Don't allow two or more disks to be mapped to the same image file

2011-03-25 Thread Hu Tao
On Thu, Mar 24, 2011 at 04:22:38PM -0700, Josh Durgin wrote: > On 03/24/2011 02:45 PM, Eric Blake wrote: > > On 03/24/2011 02:46 AM, Hu Tao wrote: > >> If two or more disks are mapped to the same image file, operating > >> on these disks at the same time may corrupt data stored in the > >> image fi

Re: [libvirt] [PATCHv2] Don't allow two or more disks to be mapped to the same image file

2011-03-25 Thread Hu Tao
On Thu, Mar 24, 2011 at 03:45:26PM -0600, Eric Blake wrote: > On 03/24/2011 02:46 AM, Hu Tao wrote: > > If two or more disks are mapped to the same image file, operating > > on these disks at the same time may corrupt data stored in the > > image file. > > > > changes: > > > > v2: > > > > - allo