[libvirt] [PATCH]: don't harcode buffer for getgrnam_r

2009-04-16 Thread Guido Günther
Hi, determines the maximum needed buffersize for getgrnam_r using sysconf instead of hardcoding it to 1024 and increases the buffer on ERANGE. The latter is needed since sysconf is allowed to return -1. Furthermore some glibc versions seem to return a too small buffer on amd64

Re: [libvirt] [PATCH]: don't harcode buffer for getgrnam_r

2009-04-16 Thread Daniel Veillard
On Thu, Apr 16, 2009 at 09:19:38AM +0200, Guido Günther wrote: Hi, determines the maximum needed buffersize for getgrnam_r using sysconf instead of hardcoding it to 1024 and increases the buffer on ERANGE. The latter is needed since sysconf is allowed to return -1. Furthermore some glibc

Re: [libvirt] problem to connect to libvirtd as ordinary user

2009-04-16 Thread Sebastian Reitenbach
Hi, On Wednesday 15 April 2009 06:36:21 pm Daniel P. Berrange wrote: On Wed, Apr 15, 2009 at 03:13:03PM +0200, Sebastian Reitenbach wrote: Hi, I'm trying to setup an eucalyptus cloud managing my virtual xen nodes. I'm on SLES11, x86_64. I compiled libvirt-0.6.2 with the following

Re: [libvirt] Re: [Qemu-devel] [PATCH 1/6] Allow multiple monitor devices (v2)

2009-04-16 Thread Avi Kivity
Jamie Lokier wrote: Avi Kivity wrote: Daniel P. Berrange wrote: Yes indeed its a little crazy :-) As anthony mentioned if libvirt were able to be notified of changes a user makes in the monitor, there's no reason we could not allow end users to access the monitor of a VM libvirt is

[libvirt] [PATCH] Fix lxc syntax-check failure

2009-04-16 Thread Mark McLoughlin
From 7ebf401c747b61b44bdba0aebc85fbead7ec1d12 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin mar...@redhat.com Date: Thu, 16 Apr 2009 11:36:41 +0100 Subject: Fixes: CHECK: avoid_if_before_free src/lxc_container.c: if (oldroot) VIR_FREE(oldroot) src/lxc_container.c: if (newroot)

[libvirt] [PATCH] Make SELinuxSecurityDriverProbe() fail on Fedora 10

2009-04-16 Thread Mark McLoughlin
Running make check on F10, I get: libvir: Security Labeling error : SELinuxInitialize: cannot open SELinux virtual domain context file /etc/selinux/targeted/contexts/virtual_domain_context: No such file or directory Failed to start security driverFAIL: seclabeltest Seems

Re: [libvirt] [PATCH] Make SELinuxSecurityDriverProbe() fail on Fedora 10

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 11:44:48AM +0100, Mark McLoughlin wrote: Running make check on F10, I get: libvir: Security Labeling error : SELinuxInitialize: cannot open SELinux virtual domain context file /etc/selinux/targeted/contexts/virtual_domain_context: No such file or directory

Re: [libvirt] [PATCH] qemu -drive takes format= not fmt=

2009-04-16 Thread Daniel Veillard
On Thu, Apr 16, 2009 at 11:41:43AM +0100, Mark McLoughlin wrote: Hey, Looks like a simple typo. Original addition of the flag to qemu was here: http://git.kernel.org/?p=virt/qemu/qemu.git;a=commitdiff;h=1e72d3b7 and support added to libvirt by this:

Re: [libvirt] VirtualBox libvirt support sample XML file

2009-04-16 Thread Pritesh Kothari
Hi Daniel, !--INTERNAL NETWORK -- interface type='network' source network='int_net'/ model type='am79c970a'/ /interface !-- HOST ONLY NETWORK -- interface type='ethernet'

Re: [libvirt] [PATCH]: don't harcode buffer for getgrnam_r

2009-04-16 Thread Guido Günther
On Thu, Apr 16, 2009 at 09:56:27AM +0200, Daniel Veillard wrote: On Thu, Apr 16, 2009 at 09:19:38AM +0200, Guido Günther wrote: Hi, determines the maximum needed buffersize for getgrnam_r using sysconf instead of hardcoding it to 1024 and increases the buffer on ERANGE. The latter is

[libvirt] respect debug level for domain log file

2009-04-16 Thread Guido Günther
Hi, currently every monitor command is dumped into the domain logfiles, this can lead to huge logs[1]. Since we're not going through the normal logging facilites to get per domain logfiles we should at least resepct the default priority. Cheers, -- Guido [1] http://bugs.debian.org/524145 From

Re: [libvirt] respect debug level for domain log file

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 02:17:29PM +0200, Guido G?nther wrote: Hi, currently every monitor command is dumped into the domain logfiles, this can lead to huge logs[1]. Since we're not going through the normal logging facilites to get per domain logfiles we should at least resepct the default

Re: [libvirt] PATCH: Add a tool virt-xml-validate

2009-04-16 Thread Daniel Veillard
On Thu, Apr 16, 2009 at 12:53:06PM +0100, Daniel P. Berrange wrote: While we install our RNG schemas into the filesystem, and users could use xmllint to validate them, it is a little tedious to use this way. This patch adds a nice simple command virt-xml-validate XML-FILE [SCHEMA-NAME]

Re: [libvirt] [PATCH] Make SELinuxSecurityDriverProbe() fail on Fedora 10

2009-04-16 Thread Daniel J Walsh
On 04/16/2009 06:54 AM, Daniel P. Berrange wrote: On Thu, Apr 16, 2009 at 11:44:48AM +0100, Mark McLoughlin wrote: Running make check on F10, I get: libvir: Security Labeling error : SELinuxInitialize: cannot open SELinux virtual domain context file

Re: [libvirt] [PATCH] qemu -drive takes format= not fmt=

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 12:50:30PM +0200, Daniel Veillard wrote: On Thu, Apr 16, 2009 at 11:41:43AM +0100, Mark McLoughlin wrote: Hey, Looks like a simple typo. Original addition of the flag to qemu was here: http://git.kernel.org/?p=virt/qemu/qemu.git;a=commitdiff;h=1e72d3b7

Re: [libvirt] respect debug level for domain log file

2009-04-16 Thread Guido Günther
On Thu, Apr 16, 2009 at 01:29:08PM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2009 at 02:17:29PM +0200, Guido G?nther wrote: Hi, currently every monitor command is dumped into the domain logfiles, this can lead to huge logs[1]. Since we're not going through the normal logging

Re: [libvirt] [PATCH 2/3] Add 'building' field to storage volume definition.

2009-04-16 Thread Daniel Veillard
On Wed, Apr 15, 2009 at 03:26:02PM -0400, Cole Robinson wrote: Add 'building' boolean field to storage volume definition. If marked, the volume cannot be deleted. To be used for non-blocking volume allocation. That one looks simple and clean too, ACK Daniel -- Daniel Veillard |

Re: [libvirt] [PATCH 3/3] Implement non-pool-blocking volume allocation for FS volumes

2009-04-16 Thread Daniel Veillard
On Wed, Apr 15, 2009 at 03:26:44PM -0400, Cole Robinson wrote: Implement non-pool-blocking volume allocation for FS volumes. We setup the volume object, then drop the pool lock, and start the actual storage allocation. Certain pool operations will be blocked (start, stop, destroy, refresh),

Re: [libvirt] respect debug level for domain log file

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 03:38:40PM +0200, Guido G?nther wrote: On Thu, Apr 16, 2009 at 01:29:08PM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2009 at 02:17:29PM +0200, Guido G?nther wrote: Hi, currently every monitor command is dumped into the domain logfiles, this can lead to

[libvirt] [PATCH 1/4] VirtualBox support

2009-04-16 Thread Pritesh Kothari
Hi All, I have attached a patch which when applied on the HEAD as of today would allow virtualbox support in libvirt. It takes cares of all the stuff mentioned on the list earlier. Still if I have missed anything, please do tell me. The patches are organized as below: Patch 0/4: contains

[libvirt] [PATCH 3/4] VirtualBox support

2009-04-16 Thread Pritesh Kothari
Hi All, I have attached a patch which when applied on the HEAD as of today would allow virtualbox support in libvirt. It takes cares of all the stuff mentioned on the list earlier. Still if I have missed anything, please do tell me. The patches are organized as below: Patch 0/4: contains

[libvirt] [PATCH 0/4] VirtualBox support

2009-04-16 Thread Pritesh Kothari
Hi All, I have attached a patch which when applied on the HEAD as of today would allow virtualbox support in libvirt. It takes cares of all the stuff mentioned on the list earlier. Still if I have missed anything, please do tell me. The patches are organized as below: Patch 0/4: contains

[libvirt] [PATCH 4/4] VirtualBox support

2009-04-16 Thread Pritesh Kothari
Hi All, I have attached a patch which when applied on the HEAD as of today would allow virtualbox support in libvirt. It takes cares of all the stuff mentioned on the list earlier. Still if I have missed anything, please do tell me. The patches are organized as below: Patch 0/4: contains

[libvirt] [PATCH][take2][0/2] storage: allow alphabetical names in owner/group of permissions

2009-04-16 Thread Ryota Ozaki
Hi, This patch set allows alphabetical names in owner/group of permissions in storage XMLs. Change from the initial patch: - store owner/group as strings - As a result, dumpxml of StoragePool could return XML as it is specified Note that in the case of StorageVolume, dumpxml always

[libvirt] [PATCH][take2][1/2] add virGetUIDByUsername() and virGetGIDByGroupname()

2009-04-16 Thread Ryota Ozaki
Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com From de8c57e3a2c4e564ec989016c547ad6754e43871 Mon Sep 17 00:00:00 2001 From: Ryota Ozaki ozaki.ry...@gmail.com Date: Wed, 8 Apr 2009 23:10:46 +0900 Subject: [PATCH] add virGetUIDByUsername() and virGetGIDByGroupname() --- configure.in |2 +-

[libvirt] [PATCH][take2][2/2] storage: allow alphabetical names in owner/group of permissions

2009-04-16 Thread Ryota Ozaki
Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com From c441d5f29f1ed964e3c17dcac8614c0834eaba49 Mon Sep 17 00:00:00 2001 From: Ryota Ozaki ozaki.ry...@gmail.com Date: Thu, 16 Apr 2009 23:17:29 +0900 Subject: [PATCH] storage: allow alphabetical names in owner/group of permissions ---

Re: [libvirt] [RFC] Storage volume clone API

2009-04-16 Thread Daniel Veillard
On Wed, Apr 15, 2009 at 03:28:54PM -0400, Cole Robinson wrote: Hi all, Attached is a stab at an API for cloning a storage volume. This patch implements the command for FS volumes, along with a virsh command 'vol-clone'. This builds on the previously posted 'drop pool lock during volume

Re: [libvirt] [PATCH]: don't harcode buffer for getgrnam_r

2009-04-16 Thread Ryota Ozaki
Hi, On Thu, Apr 16, 2009 at 10:40 PM, Daniel P. Berrange berra...@redhat.com wrote: On Thu, Apr 16, 2009 at 02:14:13PM +0200, Guido G?nther wrote: On Thu, Apr 16, 2009 at 09:56:27AM +0200, Daniel Veillard wrote: On Thu, Apr 16, 2009 at 09:19:38AM +0200, Guido Günther wrote: Hi,

Re: [libvirt] [PATCH]: don't harcode buffer for getgrnam_r

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 11:37:24PM +0900, Ryota Ozaki wrote: Hi, On Thu, Apr 16, 2009 at 10:40 PM, Daniel P. Berrange berra...@redhat.com wrote: On Thu, Apr 16, 2009 at 02:14:13PM +0200, Guido G?nther wrote: On Thu, Apr 16, 2009 at 09:56:27AM +0200, Daniel Veillard wrote: On Thu, Apr

Re: [libvirt] [PATCH][take2][1/2] add virGetUIDByUsername() and virGetGIDByGroupname()

2009-04-16 Thread Daniel P. Berrange
This looks like a good idea - just need to add the etra checking for case where sysconfg() returns -1, as per Guido's earlier patch for similar getgrnam_r usage. Daniel On Thu, Apr 16, 2009 at 11:24:10PM +0900, Ryota Ozaki wrote: Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com From

Re: [libvirt] [RFC] Storage volume clone API

2009-04-16 Thread Cole Robinson
Daniel Veillard wrote: On Wed, Apr 15, 2009 at 03:28:54PM -0400, Cole Robinson wrote: Hi all, Attached is a stab at an API for cloning a storage volume. This patch implements the command for FS volumes, along with a virsh command 'vol-clone'. This builds on the previously posted 'drop pool

Re: [libvirt] [PATCH][take2][0/2] storage: allow alphabetical names in owner/group of permissions

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 11:23:51PM +0900, Ryota Ozaki wrote: Hi, This patch set allows alphabetical names in owner/group of permissions in storage XMLs. Change from the initial patch: - store owner/group as strings - As a result, dumpxml of StoragePool could return XML as it is

Re: [libvirt] [PATCH][take2][0/2] storage: allow alphabetical names in owner/group of permissions

2009-04-16 Thread Daniel Veillard
On Thu, Apr 16, 2009 at 11:23:51PM +0900, Ryota Ozaki wrote: I should say here I don't intend to replace using numeric uid/gid with using alphabetical names. This patch intends just to bring ease of use and identifying what is specified for users (may not for end-users though). And I don't

Re: [libvirt] [PATCH][take2][2/2] storage: allow alphabetical names in owner/group of permissions

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 11:24:19PM +0900, Ryota Ozaki wrote: Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com From c441d5f29f1ed964e3c17dcac8614c0834eaba49 Mon Sep 17 00:00:00 2001 From: Ryota Ozaki ozaki.ry...@gmail.com Date: Thu, 16 Apr 2009 23:17:29 +0900 Subject: [PATCH] storage: allow

Re: [libvirt] [PATCH]: don't harcode buffer for getgrnam_r

2009-04-16 Thread Guido Günther
On Thu, Apr 16, 2009 at 11:37:24PM +0900, Ryota Ozaki wrote: Hi, On Thu, Apr 16, 2009 at 10:40 PM, Daniel P. Berrange berra...@redhat.com wrote: On Thu, Apr 16, 2009 at 02:14:13PM +0200, Guido G?nther wrote: On Thu, Apr 16, 2009 at 09:56:27AM +0200, Daniel Veillard wrote: On Thu, Apr

Re: [libvirt] [PATCH][take2][1/2] add virGetUIDByUsername() and virGetGIDByGroupname()

2009-04-16 Thread Guido Günther
Hi Ryota, On Thu, Apr 16, 2009 at 11:24:10PM +0900, Ryota Ozaki wrote: +#ifdef HAVE_GETPWNAM_R +int virGetUIDByUsername(virConnectPtr conn, char *name) +{ +struct passwd pwbuf; +struct passwd *pw = NULL; +char *strbuf; +size_t strbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); +

Re: [libvirt] [RFC] Storage volume clone API

2009-04-16 Thread Daniel P. Berrange
On Wed, Apr 15, 2009 at 03:28:54PM -0400, Cole Robinson wrote: Hi all, Attached is a stab at an API for cloning a storage volume. This patch implements the command for FS volumes, along with a virsh command 'vol-clone'. This builds on the previously posted 'drop pool lock during volume

Re: [libvirt] [PATCH]: don't harcode buffer for getgrnam_r

2009-04-16 Thread Guido Günther
On Thu, Apr 16, 2009 at 02:40:44PM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2009 at 02:14:13PM +0200, Guido G?nther wrote: On Thu, Apr 16, 2009 at 09:56:27AM +0200, Daniel Veillard wrote: On Thu, Apr 16, 2009 at 09:19:38AM +0200, Guido Günther wrote: Hi, determines the

Re: [libvirt] [PATCH 2/4] VirtualBox support

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 04:18:58PM +0200, Pritesh Kothari wrote: Hi All, I have attached a patch which when applied on the HEAD as of today would allow virtualbox support in libvirt. It takes cares of all the stuff mentioned on the list earlier. Still if I have missed anything, please do

Re: [libvirt] PATCH: Add a tool virt-xml-validate

2009-04-16 Thread Daniel Veillard
On Thu, Apr 16, 2009 at 01:57:06PM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2009 at 02:42:08PM +0200, Daniel Veillard wrote: On Thu, Apr 16, 2009 at 12:53:06PM +0100, Daniel P. Berrange wrote: While we install our RNG schemas into the filesystem, and users could use xmllint to

Re: [libvirt] respect debug level for domain log file

2009-04-16 Thread Daniel Veillard
On Thu, Apr 16, 2009 at 03:38:40PM +0200, Guido Günther wrote: On Thu, Apr 16, 2009 at 01:29:08PM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2009 at 02:17:29PM +0200, Guido G?nther wrote: Hi, currently every monitor command is dumped into the domain logfiles, this can lead to

Re: [libvirt] [PATCH][take2][1/2] add virGetUIDByUsername() and virGetGIDByGroupname()

2009-04-16 Thread Ryota Ozaki
Hi Guido and Daniel, On Fri, Apr 17, 2009 at 12:07 AM, Guido Günther a...@sigxcpu.org wrote: Hi Ryota, On Thu, Apr 16, 2009 at 11:24:10PM +0900, Ryota Ozaki wrote: +#ifdef HAVE_GETPWNAM_R +int virGetUIDByUsername(virConnectPtr conn, char *name) +{ +    struct passwd pwbuf; +    struct

Re: [libvirt] [PATCH 2/4] VirtualBox support

2009-04-16 Thread Pritesh Kothari
Hi Daniel, I have attached a patch which when applied on the HEAD as of today would allow virtualbox support in libvirt. It takes cares of all the stuff mentioned on the list earlier. Still if I have missed anything, please do tell me. I actually just tried out your previous patch from

Re: [libvirt] [PATCH 1/3] Add 'asyncjobs' counter to storage pool

2009-04-16 Thread Daniel P. Berrange
On Wed, Apr 15, 2009 at 03:24:57PM -0400, Cole Robinson wrote: Add an 'asyncjobs' counter to the storage pool definition. The counter tracks how many nonblocking jobs the pool is currently running, and prevents the operations destroy, refresh, undefine, and delete. Will be used for

Re: [libvirt] [PATCH 3/3] Implement non-pool-blocking volume allocation for FS volumes

2009-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2009 at 03:57:52PM +0200, Daniel Veillard wrote: On Wed, Apr 15, 2009 at 03:26:44PM -0400, Cole Robinson wrote: Implement non-pool-blocking volume allocation for FS volumes. We setup the volume object, then drop the pool lock, and start the actual storage allocation.

Re: [libvirt] How can I attach a network interface to KVM machine

2009-04-16 Thread Daniel P. Berrange
On Wed, Apr 15, 2009 at 02:35:41PM +0400, Anton Protopopov wrote: 2009/4/7 Daniel P. Berrange berra...@redhat.com On Tue, Apr 07, 2009 at 05:30:02PM +0400, Anton Protopopov wrote: Hi. When I am trying to attach an interface interface type='bridge' mac

Re: [libvirt] Multpile network interfaces have same MAC address

2009-04-16 Thread Daniel P. Berrange
On Wed, Apr 15, 2009 at 10:39:42AM -0700, David Mueller wrote: On Wed, 25 Feb 2009, Daniel P. Berrange wrote: On Tue, Feb 24, 2009 at 01:29:41PM -0800, David Mueller wrote: I remember seeing this problem before, but I can't remember what the resolution was, nor can I find a discussion of

[libvirt] [PATCH] fix changelog

2009-04-16 Thread Guido Günther
Hi, I broke make syntax-check by forgetting to set a C locale. O.k. to apply: diff --git a/ChangeLog b/ChangeLog index 18845e1..96ac44a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Do Apr 16 17:48:30 CEST 2009 Guido Günther a...@sigxcpu.org +Thu Apr 16 17:48:30 CEST 2009 Guido Günther

Re: [libvirt] libvirt 0.6.2 on Fedora 10

2009-04-16 Thread Mark McLoughlin
Hi Thomas, On Tue, 2009-04-14 at 17:54 +0200, Daniel Veillard wrote: On Tue, Apr 14, 2009 at 11:25:30AM -0400, Thomas Sjolshagen wrote: I've been looking for a binary package for x86_64/fc10 of libvirt/libvirt-python, but can only find the F11 versions. Have none been created and I'll

Re: [libvirt] libvirt 0.3.3 and unix_sock_group

2009-04-16 Thread Daniel Labrosse
Thanks for getting back to me. The permissions on that directory look ok to me, see below (cadc is the group specified in my libvirtd.conf). Which leads me to think it could be something else. labro...@proc5-09$ ls -la /var/run/libvirt total 16 drwxr-xr-x 2 root root 4096 Apr 15 03:25 .

Re: [libvirt] Multpile network interfaces have same MAC address

2009-04-16 Thread David Mueller
On Thu, 16 Apr 2009, Daniel P. Berrange wrote: We don't ship QEMU or KVM in RHEL yet, so there's nothing to fix in RHEL for QEMU/KVM, and I don't believe Xen suffers from it, since it uses a different way of handling MMIO memory registration. Whereever that CentOS user got their qemu kvm