[libvirt] [PATCH] esx: Fall back to path as key when QueryVirtualDiskUuid isn't available

2010-09-03 Thread Matthias Bolte
QueryVirtualDiskUuid is only available on an ESX(i) server. vCenter returns an NotImplemented fault and a GSX server is missing the VirtualDiskManager completely. Therefore only use QueryVirtualDiskUuid with an ESX(i) server and fall back to path as storage volume key for vCenter and GSX server. --

Re: [libvirt] [PATCH] esx: Use the VirtualDisk UUID as storage volume key

2010-09-03 Thread Matthias Bolte
2010/8/30 Eric Blake : > On 08/29/2010 05:00 PM, Matthias Bolte wrote: >> >> VirtualDisks are .vmdk file based. Other files in a datastore >> like .iso or .flp files don't have a UUID attached, fall back >> to the path as key for them. >> --- >>  src/esx/esx_storage_driver.c   |  190 >> +++

Re: [libvirt] [PATCH] esx: Add .vmdk storage volume creation

2010-09-03 Thread Matthias Bolte
2010/8/30 Eric Blake : > On 08/28/2010 01:53 PM, Matthias Bolte wrote: >> >> +    /* Validate config */ >> +    tmp1 = strchr(def->name, '/'); >> +    tmp2 = strrchr(def->name, '/'); >> + >> +    if (tmp1 == NULL || tmp1 == def->name || >> +        tmp2 == NULL || tmp2[1] == '\0') { > > tmp2 cannot

Re: [libvirt] [PATCH] Default to qemu:///system if accessible

2010-09-03 Thread Soren Hansen
On 03-09-2010 15:59, Daniel Veillard wrote: >> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c >> index a945710..17e6ead 100644 >> --- a/src/remote/remote_driver.c >> +++ b/src/remote/remote_driver.c >> @@ -1086,7 +1086,7 @@ remoteOpen (virConnectPtr conn, >> if (!conn->ur

Re: [libvirt] [PATCH] Default to qemu:///system if accessible

2010-09-03 Thread Eric Blake
On 09/03/2010 02:38 PM, Soren Hansen wrote: NACK, I don't think we should be changing this. If the user is unprivileged, it should always default to the unprivileged libvirtd, regardless of whether they are also authorized to connect to the privileged libvirtd (via socket permissions or policykit

Re: [libvirt] [PATCH] Default to qemu:///system if accessible

2010-09-03 Thread Soren Hansen
On 03-09-2010 16:08, Daniel P. Berrange wrote: >> If no uri is passed to one of the virConnectOpen-ish calls, libvirt >> attempts to autoprobe a sensible URI. Part of the current logic checks >> for getuid() > 0, and if that check is succesful, a libvirtd daemon is >> spawned. This patch replaces t

[libvirt] [PATCH] mingw: match recent changes in spec file

2010-09-03 Thread Eric Blake
These changes allow './autobuild.sh' to complete again, when a full mingw cross-compilation is available on Fedora. * libvirt.spec.in (%file): List new installed files. * configure.ac (with_init_script): Assume default of none when cross-compiling. --- configure.ac|6 +++--- mingw

Re: [libvirt] [PATCH] OpenVZ: add ethernet interface type support

2010-09-03 Thread Eric Blake
On 08/18/2010 09:05 AM, Jean-Baptiste Rouault wrote: Hi all, This patch adds support for ethernet interface type to OpenVZ domains as stated in this previous message: http://www.redhat.com/archives/libvir- list/2010-July/msg00658.html Regards, Jean-Baptiste Seems reasonable to me; sorry for

Re: [libvirt] libvirt-guests and ./configure --without-libvirtd

2010-09-03 Thread Eric Blake
On 09/03/2010 12:34 PM, Jiri Denemark wrote: Unless anyone speaks up with another opinion, I'll prepare a patch that makes libvirt-guests depend on WITH_LIBVIRTD. The init script is part of libvirt-client package because it doesn't require libvirtd. On hosts with VirtualBox hypervisor, libvirtd

Re: [libvirt] libvirt-guests and ./configure --without-libvirtd

2010-09-03 Thread Jiri Denemark
> Unless anyone speaks up with another opinion, I'll prepare a patch that > makes libvirt-guests depend on WITH_LIBVIRTD. The init script is part of libvirt-client package because it doesn't require libvirtd. On hosts with VirtualBox hypervisor, libvirtd is not needed and libvirt-guests script ca

[libvirt] libvirt-guests and ./configure --without-libvirtd

2010-09-03 Thread Eric Blake
On mingw, libvirt is typically configured --without-libvirtd, because the mingw build is designed to target other hosts, but cannot natively run as a hypervisor. Additionally, mingw doesn't really have a notion of /etc/sysconf, so installing /etc/sysconfig/libvirt-guests doesn't work too well.

[libvirt] [PATCH] build: avoid unused variable warning

2010-09-03 Thread Eric Blake
* src/vbox/vbox_tmpl.c (vboxAttachDrives): Capture return value. --- Pushing under the build-breaker rule. Gcc didn't catch this under '-g -O0', but with -Werror and -O2, it dies with a warning that rc is used uninitialized. I suspect that clang would have also reported this, although I haven't

Re: [libvirt] [PATCH] Default to qemu:///system if accessible

2010-09-03 Thread Daniel P. Berrange
On Fri, Sep 03, 2010 at 03:28:58PM +0200, Soren Hansen wrote: > If no uri is passed to one of the virConnectOpen-ish calls, libvirt > attempts to autoprobe a sensible URI. Part of the current logic checks > for getuid() > 0, and if that check is succesful, a libvirtd daemon is > spawned. This patch

Re: [libvirt] [PATCH] Default to qemu:///system if accessible

2010-09-03 Thread Daniel Veillard
On Fri, Sep 03, 2010 at 03:28:58PM +0200, Soren Hansen wrote: > If no uri is passed to one of the virConnectOpen-ish calls, libvirt > attempts to autoprobe a sensible URI. Part of the current logic checks > for getuid() > 0, and if that check is succesful, a libvirtd daemon is > spawned. This patch

[libvirt] [PATCH] Default to qemu:///system if accessible

2010-09-03 Thread Soren Hansen
If no uri is passed to one of the virConnectOpen-ish calls, libvirt attempts to autoprobe a sensible URI. Part of the current logic checks for getuid() > 0, and if that check is succesful, a libvirtd daemon is spawned. This patch replaces this check with a call to access(LIBVIRTD_PRIV_UNIX_SOCKET,

Re: [libvirt] [PATCH Java] Remove non-thread-safe error reporting

2010-09-03 Thread Matthias Bolte
2010/9/3 Daniel P. Berrange : > On Fri, Sep 03, 2010 at 01:33:26PM +0200, Matthias Bolte wrote: >> virConnCopyLastError is not thread-safe, don't use it. >> >> Reported by Ravi Pawar. >> --- >>  src/main/java/org/libvirt/Connect.java      |    2 +- >>  src/main/java/org/libvirt/ErrorHandler.java |

Re: [libvirt] [PATCH Java] Remove non-thread-safe error reporting

2010-09-03 Thread Daniel P. Berrange
On Fri, Sep 03, 2010 at 01:33:26PM +0200, Matthias Bolte wrote: > virConnCopyLastError is not thread-safe, don't use it. > > Reported by Ravi Pawar. > --- > src/main/java/org/libvirt/Connect.java |2 +- > src/main/java/org/libvirt/ErrorHandler.java | 17 - > 2 files cha

[libvirt] [PATCH Java] Remove non-thread-safe error reporting

2010-09-03 Thread Matthias Bolte
virConnCopyLastError is not thread-safe, don't use it. Reported by Ravi Pawar. --- src/main/java/org/libvirt/Connect.java |2 +- src/main/java/org/libvirt/ErrorHandler.java | 17 - 2 files changed, 1 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/libvirt