Re: [libvirt] [BUG,RFC] directory traversal vulnerability / qemu: name→uuid

2011-09-08 Thread Philipp Hahn
Hello Eric, On Wednesday 07 September 2011 16:02:51 Eric Blake wrote: On 09/07/2011 11:12 AM, Philipp Hahn wrote: I just tried the following command with libvirt-0.9.5git: # virsh snapshot-create $VM /dev/stdin 'domainsnapshotname../../../../../../etc/passwd/name/domainsnap shot'

[libvirt] [PATCH v2 1/2] Add VIR_TYPED_PARAM_STRING

2011-09-08 Thread Hu Tao
--- daemon/remote.c | 15 +++ include/libvirt/libvirt.h.in |4 +++- src/remote/remote_driver.c | 15 +++ src/remote/remote_protocol.x |2 ++ src/remote_protocol-structs |2 ++ 5 files changed, 37 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH v2 2/2] add interface for blkio.weight_device

2011-09-08 Thread Hu Tao
This patch adds a parameter --weight-device to virsh command blkiotune for setting/getting blkio.weight_device. --- daemon/remote.c |5 + include/libvirt/libvirt.h.in |9 ++ src/conf/domain_conf.c | 142 ++- src/conf/domain_conf.h

[libvirt] [PATCH v2 0/2] add blkio.weight_device support

2011-09-08 Thread Hu Tao
This series adds support for blkio.weight_device. changes from v1: - update remote_protocol-structs to make `make check` pass - fix some memleaks - compared the sizes of remote_typed_param before and after patch 1 using pdwtags, doesn't change - libvirtd(before patch) returns an error message

[libvirt] Start of freeze for libvirt-0.9.5 and availability of rc1

2011-09-08 Thread Daniel Veillard
With a bit of delay, we are entering the freeze for libvirt-0.9.5 . We may make an exception for the last couple of patches from Hu to add string to typed parameters and the extra associated patch, as well as bug fixes too of course ! I have made a release candidate 1 tarball (and associated

[libvirt] [PATCH] qemu: Search for disk in qemuDomainGetBlockInfo

2011-09-08 Thread Michal Privoznik
The commit 89b6284fd94ce5b13ee6b002f9167f5d9074aa7a caused regression. Although we now allow users to input e.g. 'hda' instead of whole path, we still need to search for appropriate disk in VM definition. --- src/qemu/qemu_driver.c | 16 1 files changed, 16 insertions(+), 0

Re: [libvirt] [Libvirt-announce] Start of freeze for libvirt-0.9.5 and availability of rc1

2011-09-08 Thread Justin Clift
On 08/09/2011, at 5:29 PM, Daniel Veillard wrote: With a bit of delay, we are entering the freeze for libvirt-0.9.5 . We may make an exception for the last couple of patches from Hu to add string to typed parameters and the extra associated patch, as well as bug fixes too of course ! I have

Re: [libvirt] [PATCH] qemu: Search for disk in qemuDomainGetBlockInfo

2011-09-08 Thread Eric Blake
On 09/08/2011 09:55 AM, Michal Privoznik wrote: The commit 89b6284fd94ce5b13ee6b002f9167f5d9074aa7a caused regression. Although we now allow users to input e.g. 'hda' instead of whole path, we still need to search for appropriate disk in VM definition. --- src/qemu/qemu_driver.c | 16

[libvirt] [PATCHv2] blockinfo: fix qemu regression in handling disk name

2011-09-08 Thread Eric Blake
Regression introduced in commit 89b6284fd, due to an incorrect conversion to the new means of converting disk names back to the correct object. * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Avoid NULL deref. --- src/qemu/qemu_driver.c |6 +++--- 1 files changed, 3 insertions(+), 3

Re: [libvirt] [PATCHv2] blockinfo: fix qemu regression in handling disk name

2011-09-08 Thread Michal Privoznik
On 08.09.2011 11:12, Eric Blake wrote: Regression introduced in commit 89b6284fd, due to an incorrect conversion to the new means of converting disk names back to the correct object. * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Avoid NULL deref. --- src/qemu/qemu_driver.c |6

Re: [libvirt] [PATCHv2] blockinfo: fix qemu regression in handling disk name

2011-09-08 Thread Eric Blake
On 09/08/2011 10:29 AM, Michal Privoznik wrote: On 08.09.2011 11:12, Eric Blake wrote: Regression introduced in commit 89b6284fd, due to an incorrect conversion to the new means of converting disk names back to the correct object. -path = actual; +disk = vm-def-disks[i]; /* The

Re: [libvirt] [PATCH] esx: Fix managed object lookup with optional occurrence

2011-09-08 Thread Matthias Bolte
2011/9/7 Eric Blake ebl...@redhat.com: On 09/06/2011 09:01 PM, Matthias Bolte wrote: Exit early if managed object is not found, instead of dereferencing a NULL pointer and triggering a segfault. ---  src/esx/esx_vi.c |    8 +++-  1 files changed, 7 insertions(+), 1 deletions(-) ACK.

Re: [libvirt] [PATCH] virsh: fix typo in opts_send_key

2011-09-08 Thread Eric Blake
On 09/08/2011 04:11 AM, a...@redhat.com wrote: From: Alex Jiaa...@redhat.com * tools/virsh.c: millseconds should be milliseconds in opts_send_key. Signed-off-by: Alex Jiaa...@redhat.com --- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] [PATCH] libxl: avoid a dereference of a null pointer

2011-09-08 Thread Eric Blake
On 09/06/2011 11:03 PM, Jim Fehlig wrote: Alex Jia wrote: Variable 'l_disk' initialized to a null pointer value, control jumps to 'case VIR_DOMAIN_DISK_DEVICE_DISK and then taking false branch, Within the expansion of the macro 'libxlError': Field access results in a dereference of a null

Re: [libvirt] [PATCH 2/2] rpc: avoid memory leak on virNetTLSContextValidCertificate

2011-09-08 Thread Eric Blake
On 09/04/2011 04:48 PM, Alex Jia wrote: * src/rpc/virnettlscontext.c: fix memory leak on virNetTLSContextValidCertificate. * Detected in valgrind run: diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index e901b63..e6123f9 100644 --- a/src/rpc/virnettlscontext.c +++

Re: [libvirt] [PATCH] Don't treat pci_system_init failure as fatal if no PCI bus is present

2011-09-08 Thread Eric Blake
On 09/06/2011 06:55 AM, Daniel Veillard wrote: On Mon, Sep 05, 2011 at 09:29:06PM +0200, Soren Hansen wrote: Xen PV domU's have no PCI bus. node_device_udev.c calls pci_system_init which looks for /sys/bus/pci. If it does not find /sys/bus/pci (which it won't in a Xen PV domU) it returns

[libvirt] [PATCH 2/2] snapshot: use new API for less work

2011-09-08 Thread Eric Blake
This has the added benefit of making 'snapshot-create dom --no-metadata' now able to tell you the name of the just-generated snapshot. * tools/virsh.c (vshSnapshotCreate, cmdSnapshotCurrent): Don't get XML just for name. --- tools/virsh.c | 41 + 1 files

[libvirt] [PATCH 0/2] snapshot: add getName API

2011-09-08 Thread Eric Blake
I know I've missed the 0.9.5 RC1 freeze, but think that this new API is worth adding, if only because I noticed that 'virsh snapshot-create dom --no-metadata' currently creates a snapshot with a generated name but then fails in attempting to express that name to the user. Eric Blake (2):

[libvirt] [PATCH 1/2] snapshot: new APIs for inspecting snapshot object

2011-09-08 Thread Eric Blake
These functions access internals of the opaque object, and do not need any rpc counterpart. It could be argued that we should have provided these when snapshot objects were first introduced, since all the other vir*Ptr objects have at least a GetName accessor. * include/libvirt/libvirt.h.in

[libvirt] [PATCH] maint: update to latest gnulib

2011-09-08 Thread Eric Blake
* .gnulib: Update to latest. --- I'm not sure if any of these are essential for libvirt, but it's probably nicer to pick up these fixes before the release than to find out after the release that we wish we had them. * .gnulib a6b16b6...da1717b (63): Doc about crypt functions. gc: Fix

[libvirt] [PATCH] snapshot: fix regression with system checkpoints

2011-09-08 Thread Eric Blake
Regression introduced in commit d6f6b2d194c. * src/conf/domain_conf.c (virDomainSnapshotDefParseString): Only give error about no disk support when disk was found. --- src/conf/domain_conf.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.c

Re: [libvirt] [PATCH] maint: update to latest gnulib

2011-09-08 Thread Daniel Veillard
On Thu, Sep 08, 2011 at 01:59:54PM +0100, Eric Blake wrote: * .gnulib: Update to latest. --- I'm not sure if any of these are essential for libvirt, but it's probably nicer to pick up these fixes before the release than to find out after the release that we wish we had them. yes

Re: [libvirt] [PATCH 0/2] snapshot: add getName API

2011-09-08 Thread Daniel Veillard
On Thu, Sep 08, 2011 at 01:21:09PM +0100, Eric Blake wrote: I know I've missed the 0.9.5 RC1 freeze, but think that this new API is worth adding, if only because I noticed that 'virsh snapshot-create dom --no-metadata' currently creates a snapshot with a generated name but then fails in

Re: [libvirt] [PATCH] snapshot: fix regression with system checkpoints

2011-09-08 Thread Daniel Veillard
On Thu, Sep 08, 2011 at 02:17:10PM +0100, Eric Blake wrote: Regression introduced in commit d6f6b2d194c. * src/conf/domain_conf.c (virDomainSnapshotDefParseString): Only give error about no disk support when disk was found. --- src/conf/domain_conf.c |2 +- 1 files changed, 1

[libvirt] A question about create image for sheepdog

2011-09-08 Thread chang liu
Hi everyone: I want to build a VM Manage System, and I use libvirt to create and delete VM. But now I has used sheepdog as the disk, but I have to create sheepdog image by hand. If I have a thousand of servers, how can I create the image? I think if I can write a API for create the sheepdog image

Re: [libvirt] [PATCH v2] xml: Change virtual file names of xml documents parsed in memory

2011-09-08 Thread Eric Blake
On 09/08/2011 02:25 PM, Peter Krempa wrote: While parsing XML strings from memory, the previous convention in libvirt was to set the virtual file name to domain.xml or something similar. This could potentialy trick the user into looking for a file named domain.xml on the disk in an attempt to

Re: [libvirt] [PATCH] maint: update to latest gnulib

2011-09-08 Thread Eric Blake
On 09/08/2011 02:23 PM, Daniel Veillard wrote: On Thu, Sep 08, 2011 at 01:59:54PM +0100, Eric Blake wrote: * .gnulib: Update to latest. --- I'm not sure if any of these are essential for libvirt, but it's probably nicer to pick up these fixes before the release than to find out after the

Re: [libvirt] [PATCH 0/2] snapshot: add getName API

2011-09-08 Thread Eric Blake
On 09/08/2011 02:22 PM, Daniel Veillard wrote: On Thu, Sep 08, 2011 at 01:21:09PM +0100, Eric Blake wrote: I know I've missed the 0.9.5 RC1 freeze, but think that this new API is worth adding, if only because I noticed that 'virsh snapshot-create dom --no-metadata' currently creates a snapshot

Re: [libvirt] A question about create image for sheepdog

2011-09-08 Thread Alex Jia
On 09/08/2011 09:35 PM, chang liu wrote: Hi everyone: I want to build a VM Manage System, and I use libvirt to create and delete VM. But now I has used sheepdog as the disk, but I have to create sheepdog image by hand. If I have a thousand of servers, how can I create the image? I think if I

Re: [libvirt] [PATCH] snapshot: fix regression with system checkpoints

2011-09-08 Thread Eric Blake
On 09/08/2011 02:25 PM, Daniel Veillard wrote: On Thu, Sep 08, 2011 at 02:17:10PM +0100, Eric Blake wrote: Regression introduced in commit d6f6b2d194c. * src/conf/domain_conf.c (virDomainSnapshotDefParseString): Only give error about no disk support whendisk was found. ---

Re: [libvirt] [PATCH v4] virsh: Add more human-friendly output of domblkstat command

2011-09-08 Thread Eric Blake
On 09/08/2011 03:11 PM, Peter Krempa wrote: Users of virsh complain that output of the domblkstat command is not intuitive enough. This patch adds explanation of fields returned by this command to the help section for domblkstat and the man page of virsh. Also a switch --human is added for

[libvirt] [PATCH] Fix URL-escaping for domainDefine

2011-09-08 Thread Philipp Hahn
'+' in strings get translated to ' ' when editing domains. While xenDaemonDomainCreateXML() did URL-escape the sexpr, xenDaemonDomainDefineXML() did not. Remove the explicit urlencode() in xenDaemonDomainCreateXML() and add the direct encoding calls to xend_op_ext() because it calls xend_post()

Re: [libvirt] [PATCH v4] virsh: Add more human-friendly output of domblkstat command

2011-09-08 Thread Peter Krempa
On 09/08/2011 04:24 PM, Eric Blake wrote: On 09/08/2011 03:11 PM, Peter Krempa wrote: +{desc, N_(Get device block stats for a running domain.\n\n +Explanation of fields:\n + rd_req- count of read operations\n That's a bit long for

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

2011-09-08 Thread Michal Privoznik
On 24.08.2011 14:53, Michal Privoznik wrote: From: Michal Prívozník mpriv...@redhat.com Up to now users have to give a full XML description on input when device-detaching. If they omitted something it lead to unclear error messages (like generated MAC wasn't found, etc.). With this patch

Re: [libvirt] [PATCH v2] xml: Change virtual file names of xml documents parsed in memory

2011-09-08 Thread Peter Krempa
On 09/08/2011 03:38 PM, Eric Blake wrote: On 09/08/2011 02:25 PM, Peter Krempa wrote: 15:08:43.581: 525: error : catchXMLError:709 : (domain definition):2: error parsing attribute name namevm1/name --^ I like it. ACK, and worth pushing pre-release. Thanks, but I don't have push

[libvirt] lvm backed storage

2011-09-08 Thread Serge Hallyn
Hi, When lvm.conf has 'command_names = 1', then all results are prefixed with the command name. This confuses libvirt which does not ignore those. I thought fixing that would be a simple case of detecting those conditions at virStorageBackendLogicalMakeVol() and friends, but I was wrong - those

[libvirt] [PATCH] selinux: Detect virt_use_nfs boolean set

2011-09-08 Thread Michal Privoznik
If we fail setting label on a file and this file is on NFS share, it is wise to advise user to set virt_use_nfs selinux boolean variable. --- src/security/security_selinux.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/security/security_selinux.c

Re: [libvirt] [Libvirt-announce] Start of freeze for libvirt-0.9.5 and availability of rc1

2011-09-08 Thread Jason Helfman
On Thu, Sep 08, 2011 at 06:54:08PM +1000, Justin Clift thus spake: On 08/09/2011, at 5:29 PM, Daniel Veillard wrote: With a bit of delay, we are entering the freeze for libvirt-0.9.5 . We may make an exception for the last couple of patches from Hu to add string to typed parameters and the

Re: [libvirt] Start of freeze for libvirt-0.9.5 and availability of rc1

2011-09-08 Thread Jim Fehlig
Daniel Veillard wrote: With a bit of delay, we are entering the freeze for libvirt-0.9.5 . We may make an exception for the last couple of patches from Hu to add string to typed parameters and the extra associated patch, as well as bug fixes too of course ! Would it be possible to get a

[libvirt] [test-API][PATCH 1/2] update xmlgenerator.py to support for spice graphics type

2011-09-08 Thread Nan Zhang
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 compression='auto'/ playback

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

2011-09-08 Thread Nan Zhang
--- repos/domain/spice_options.py | 113 + 1 files changed, 113 insertions(+), 0 deletions(-) create mode 100644 repos/domain/spice_options.py diff --git a/repos/domain/spice_options.py b/repos/domain/spice_options.py new file mode 100644 index

[libvirt] how did libvirt manage Virtual Network?

2011-09-08 Thread Wayne Xia
Working at the network management, I am a bit confused about the VLAN model in libvirt. in the xml definition, there is a section as following: devices interface type='network' source network='default'/ /interface ... interface type='network' source

Re: [libvirt] [test-API][PATCH 2/2] add case for testing spice compression options

2011-09-08 Thread Alex Jia
On 09/09/2011 02:41 AM, Nan Zhang wrote: --- repos/domain/spice_options.py | 113 + 1 files changed, 113 insertions(+), 0 deletions(-) create mode 100644 repos/domain/spice_options.py diff --git a/repos/domain/spice_options.py

Re: [libvirt] [test-API][PATCH v2] Add test case update_devflag.py for update device flag

2011-09-08 Thread Guannan Ren
On 09/08/2011 11:29 AM, Nan Zhang wrote: --- repos/domain/update_devflag.py | 163 1 files changed, 163 insertions(+), 0 deletions(-) create mode 100644 repos/domain/update_devflag.py diff --git a/repos/domain/update_devflag.py