[libvirt] [PATCH 02/13] New virNetworkDef utility functions

2010-12-20 Thread Laine Stump
Later patches will add the possibility to define a network's netmask as a prefix (0-32, or 0-128 in the case of IPv6). To make it easier to deal with definition of both kinds (prefix or netmask), add two new functions: virNetworkDefNetmask: return a copy of the netmask into a virSocketAddr. If no

[libvirt] [PATCH 01/13] New virSocketAddr utility functions

2010-12-20 Thread Laine Stump
virSocketPrefixToNetmask: Given a 'prefix', which is the number of 1 bits in a netmask, fill in a virSocketAddr object with a netmask as an IP address (IPv6 or IPv4). virSocketAddrMask: Mask off the host bits in one virSocketAddr according to the netmask in another virSocketAddr.

[libvirt] [PATCH 00/13] IPv6 support for virtual networks using bridge driver

2010-12-20 Thread Laine Stump
Finally! Most of this patchset is setup for patch 09/13, which updates the network XML parser to support IPv6, and 12/13, which turns on IPv6 in the bridge driver. In order to have each patch individually pass make check and (otherwise function properly in case someone is doing a bisect), there

[libvirt] [PATCH 06/13] Make virtual network netmasks optional

2010-12-20 Thread Laine Stump
When a netmask isn't specified for an IPv4 address, one can be implied based on what network class range the address is in. The virNetworkDefPrefix function does this for us, so netmask isn't required. --- src/conf/network_conf.c | 30 -- 1 files changed, 16

[libvirt] [PATCH 04/13] Consistently return 0 on success, -1 on failure in bridge_driver.c

2010-12-20 Thread Laine Stump
Some functions in this file were returning 1 on success and 0 on failure, and others were returning 0 on success and -1 on failure. Switch them all to return the libvirt-preferred 0/-1. --- src/network/bridge_driver.c | 28 ++-- 1 files changed, 14 insertions(+), 14

[libvirt] [PATCH 03/13] Fix logging of failed iptables commands

2010-12-20 Thread Laine Stump
The functions in iptables.c all return -1 on failure, but all their callers (which all happen to be in bridge_driver.c) assume that they are returning an errno, and the logging is done accordingly. This patch fixes all the error checking and logging to assume 0 is an error, and nothing else. ---

[libvirt] [PATCH 07/13] Replace brSetInetAddress/brSetInetNetmask with brAddInetAddress

2010-12-20 Thread Laine Stump
brSetInetAddress can only set a single IP address on the bridge, and uses a method (ioctl(SIOCSETIFADDR)) that only works for IPv4. Replace it and brSetInetNetmask with a single function that uses the external ip addr add command to add an address/prefix to the interface - this supports IPv6, and

[libvirt] [PATCH 05/13] Pass prefix rather than netmask into iptables functions

2010-12-20 Thread Laine Stump
IPv6 will use prefix exclusively, and IPv4 will also optionally be able to use it, and the iptables functions really need a prefix anyway, so use the new virNetworkDefPrefix() function to send prefixes into iptables functions instead of netmasks. Also, in a couple places where a netmask is

[libvirt] [PATCH 13/13] Run radvd for virtual networks with IPv6 addresses

2010-12-20 Thread Laine Stump
Running an instance of the router advertisement daemon (radvd) allows guests using the virtual network to automatically acquire and IPv6 address and default route. Note that acquiring an address only works for networks with a prefix length of exactly 64 - radvd is still run in other circumstances,

[libvirt] [PATCH 08/13] make the dhcp element optional in network.rng

2010-12-20 Thread Laine Stump
In practice this has always been optional, but the RNG has shown it as mandatory, and since all the examples for make check had it, it was never noticed. One of the existing test cases has been changed to check for this. I also noticed that the dhcp/host/ip was still defined as text/, but should

[libvirt] [PATCH 10/13] Support multiple IP addresses on one network in bridge_driver.c

2010-12-20 Thread Laine Stump
This patch reorganizes the code in bridge_driver.c to account for the concept of a single network with multiple IP addresses, without adding in the extra variable of IPv6. A small bit of code has been temporarily added that checks all given addresses to verify they are IPv4 - this will be removed

[libvirt] [PATCH 11/13] Update iptables.c to also support ip6tables.

2010-12-20 Thread Laine Stump
All of the iptables functions eventually call down to a single bottom-level function, and fortunately, ip6tables syntax (for all the args that we use) is identical to iptables format (except the addresses), so all we need to do is: 1) Get an address family down to the lowest level function in

[libvirt] [PATCH 12/13] Turn on IPv6 support in the bridge_driver.c virtual network driver

2010-12-20 Thread Laine Stump
At this point everything is already in place to make IPv6 happen, we just need to add a few rules, remove some checks for IPv4-only, and document the changes to the XML on the website. --- docs/formatnetwork.html.in | 35 +++-- src/network/bridge_driver.c | 186

Re: [libvirt] Got time to try out the libvirt 0.8.6 win32 package?

2010-12-20 Thread arnaud.champion
?Hi Justin, I don't think regsvr32 will work, as I know, regsvr32 is used to register COM components against registry, and these dlls are not COM compatible. Arnaud -- From: Justin Clift jcl...@redhat.com Sent: Monday, December 20, 2010 6:27 AM

[libvirt] [PATCH] bridge: avoid double free

2010-12-20 Thread Paweł Krześniak
--- src/network/bridge_driver.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index c3f32d7..b0834ae 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -557,7 +557,6 @@

Re: [libvirt] Got time to try out the libvirt 0.8.6 win32 package?

2010-12-20 Thread Justin Clift
On 14/12/2010, at 4:32 AM, Matthias Bolte wrote: Well, you can do that with a simple batch file: @echo off set /p uri=Enter libvirt connection URI: virsh.exe -c %uri% pause Just uploaded a tweaked version of the installer, using this simple batch file approach, and also including a README

Re: [libvirt] [PATCH] bridge: avoid double free

2010-12-20 Thread Laine Stump
On 12/20/2010 06:31 AM, Paweł Krześniak wrote: --- src/network/bridge_driver.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index c3f32d7..b0834ae 100644 --- a/src/network/bridge_driver.c +++

Re: [libvirt] [PATCH 3/6] vbox: Add glue layer for MSCOM on Windows

2010-12-20 Thread Paolo Bonzini
On 12/18/2010 01:10 AM, Eric Blake wrote: case $ac_cv_search_dlopen:$host in no:*-*-mingw* | no:*-*-msvc*) ;; no:*) AC_MSG_ERROR([Unable to find dlopen()]) ;; 'none required:*') DLOPEN_LIBS= ;; *) DLOPEN_LIBS=$ac_cv_search_dlopen ;; esac ? Paolo -- libvir-list mailing list

Re: [libvirt] Got time to try out the libvirt 0.8.6 win32 package?

2010-12-20 Thread Matthias Bolte
That's correct, regsvr32 is for registering COM components. It has nothing to do with the runtime linker finding the DLLs. In order to have libvirt-0.dll available for applications it must either be in the same directory as the application's binary (having it in the working directory might work

Re: [libvirt] Got time to try out the libvirt 0.8.6 win32 package?

2010-12-20 Thread arnaud.champion
good idea. What about a prefix like vir_ ? -- From: Matthias Bolte matthias.bo...@googlemail.com Sent: Monday, December 20, 2010 4:03 PM To: arnaud.champ...@devatom.fr Cc: Justin Clift jcl...@redhat.com; libvir-list libvirt libvir-list@redhat.com

Re: [libvirt] Got time to try out the libvirt 0.8.6 win32 package?

2010-12-20 Thread Justin Clift
On 21/12/2010, at 2:03 AM, Matthias Bolte wrote: That's correct, regsvr32 is for registering COM components. It has nothing to do with the runtime linker finding the DLLs. snip Or with any other prefix/postfix with up to 4 characters. Works for me. Personally, totally not bothered what the

Re: [libvirt] Remove bashisms from libvirt-guests

2010-12-20 Thread Eric Blake
On 12/18/2010 04:51 AM, Laurent Léonard wrote: -retval wait $virsh_pid printf '\r%s%-12s\n' $label $done +retval wait $virsh_pid printf '\r%s%-12s\n' $label `gettext \done\` Likewise: $(gettext done) But thanks for taking this on; we're getting closer to a nice solution. I

Re: [libvirt] [PATCH] libvirt-guests: avoid sourcing failure

2010-12-20 Thread Eric Blake
On 12/18/2010 06:41 AM, Guido Günther wrote: On Fri, Dec 17, 2010 at 05:26:52PM -0700, Eric Blake wrote: * tools/libvirt-guests.init.in (libvirtd): Skip function library if it is not present. Suggested by Guido Günther. --- tools/libvirt-guests.init.in |3 ++- 1 files changed, 2

Re: [libvirt] [PATCH] build: fix typo that broke 'make dist'

2010-12-20 Thread Eric Blake
On 12/20/2010 12:42 AM, Osier Yang wrote: 于 2010年12月20日 14:01, Wen Congyang 写道: * src/Makefile.am (VMWARE_DRIVER_SOURCES): Fix vmware_driver.h. Signed-off-by: Wen Congyangwe...@cn.fujitsu.com ACK, it happened to solve my problem, thanks Pushed. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH 3/6] vbox: Add glue layer for MSCOM on Windows

2010-12-20 Thread Eric Blake
On 12/20/2010 06:59 AM, Justin Clift wrote: checking for xdr_u_int64_t... yes checking for library containing dlopen... none required configure: error: Unable to find dlopen() $ Rolling back to the commit directly before it, abd0e1d, allows things to work. Sounds like the same

[libvirt] [PATCHv2] docs: added compiling page and significantly expanded windows page

2010-12-20 Thread Justin Clift
Also added an additional menu placement for the windows page, in order to attract further potential testers. --- This version of the patch includes information on TLS certificate files, connection types, and ESX/vSphere. docs/compiling.html.in | 48 ++ docs/downloads.html.in | 41

Re: [libvirt] [PATCHv2] docs: added compiling page and significantly expanded windows page

2010-12-20 Thread Eric Blake
On 12/20/2010 09:28 AM, Justin Clift wrote: Also added an additional menu placement for the windows page, in order to attract further potential testers. --- This version of the patch includes information on TLS certificate files, connection types, and ESX/vSphere. + +h2a

Re: [libvirt] [PATCHv2 6/7] qemu: use virAsprintf instead of PATH_MAX

2010-12-20 Thread Eric Blake
On 12/18/2010 09:22 AM, Matthias Bolte wrote: 2010/12/18 Eric Blake ebl...@redhat.com: * src/qemu/qemu_driver.c (qemudLogFD, qemudLogReadFD) (qemudStartup, qemudGetProcessInfo): Use heap instead of stack. (qemudDomainDetachPciDiskDevice) (qemudDomainDetachSCSIDiskDevice): Minor optimization.

Re: [libvirt] [PATCH] bridge: avoid double free

2010-12-20 Thread Paweł Krześniak
On Mon, Dec 20, 2010 at 14:30, Laine Stump la...@laine.org wrote: On 12/20/2010 06:31 AM, Paweł Krześniak wrote: I added your name to the AUTHORS file and pushed the result. thanks, but it was so trivial change. Thanks for picking this out! Since it seems you've been looking through

[libvirt] [PATCH] esx: Fix cluster resource lookup when connecting to a vCenter

2010-12-20 Thread Matthias Bolte
Connecting to a ESX(i) server that is part of a cluster failed when the connection also involved a vCenter. Accept ClusterComputeResource type in addition to ComputeResource type in the object lookup function. Reported by Guillaume Le Louët. --- src/esx/esx_vi.c | 13 - 1 files

Re: [libvirt] vmware, vcenter, clusterComputeResource error.

2010-12-20 Thread Matthias Bolte
2010/12/16 guillaume LE LOUËT guillaume.lelo...@gmail.com: Hello dear libvirt users. I am trying to make some migration from a VMWare esx to another. I am using ubuntu, and the last version found (my install script is http://dl.dropbox.com/u/7494462/libvirt/install.sh ) The configuration is

Re: [libvirt] [PATCHv3 7/7] build: make building on cygwin easier

2010-12-20 Thread Eric Blake
On 12/18/2010 02:52 PM, Matthias Bolte wrote: 2010/12/18 Eric Blake ebl...@redhat.com: * configure.ac (dlopen): Cygwin dlopen is in libc; avoid spurious failure. (XDR_CFLAGS): Define when needed. * src/Makefile.am (libvirt_driver_remote_la_CFLAGS): Use it. --- This incremental patch

Re: [libvirt] [PATCH] esx: Fix cluster resource lookup when connecting to a vCenter

2010-12-20 Thread Eric Blake
On 12/20/2010 12:04 PM, Matthias Bolte wrote: Connecting to a ESX(i) server that is part of a cluster failed when the connection also involved a vCenter. Accept ClusterComputeResource type in addition to ComputeResource type in the object lookup function. Reported by Guillaume Le Louët.

[libvirt] [PATCH] build: skip vmware driver when building for RHEL

2010-12-20 Thread Eric Blake
* libvirt.spec.in: Provide vmware conditionals. --- Would you mind preparing a followup patch that modifies libvirt.spec.in to make it configurable when building an rpm whether vmware support is built in? See commit e3e31303d54e for an example. I went ahead and did this, since it was

[libvirt] [PATCH 2/1] build: skip drivers during mingw portion of autobuild

2010-12-20 Thread Eric Blake
* autobuild.sh: Alter mingw configuration setup. --- And a followup to allow autobuild.sh completion when a mingw cross-toolchain is present. autobuild.sh |2 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index 91e2ab2..4cb9fde 100755 ---

Re: [libvirt] [PATCH 01/13] New virSocketAddr utility functions

2010-12-20 Thread Paweł Krześniak
On Mon, Dec 20, 2010 at 09:03, Laine Stump la...@laine.org wrote: diff --git a/src/util/network.c b/src/util/network.c index 1abe78b..e4791b9 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -288,6 +288,73 @@ int virSocketAddrIsNetmask(virSocketAddrPtr netmask) {  }  /** + *

Re: [libvirt] [PATCH 07/13] Replace brSetInetAddress/brSetInetNetmask with brAddInetAddress

2010-12-20 Thread Paweł Krześniak
On Mon, Dec 20, 2010 at 09:03, Laine Stump la...@laine.org wrote: brSetInetAddress can only set a single IP address on the bridge, and uses a method (ioctl(SIOCSETIFADDR)) that only works for IPv4. Replace it and brSetInetNetmask with a single function that uses the external ip addr add

Re: [libvirt] [PATCH 13/13] Run radvd for virtual networks with IPv6 addresses

2010-12-20 Thread Paweł Krześniak
On Mon, Dec 20, 2010 at 09:03, Laine Stump la...@laine.org wrote: There are two possible solutions for this: 1) Don't attempt to immediately read the pidfile and store the pid in   memory. Instead, just read the pidfile later when we want to kill   radvd. (This could still lead to a race if

Re: [libvirt] [PATCH 13/13] Run radvd for virtual networks with IPv6 addresses

2010-12-20 Thread Eric Blake
On 12/20/2010 01:03 AM, Laine Stump wrote: 1) Don't attempt to immediately read the pidfile and store the pid in memory. Instead, just read the pidfile later when we want to kill radvd. (This could still lead to a race if networkStart and networkDestroy were called in tight sequence

Re: [libvirt] [PATCH 01/13] New virSocketAddr utility functions

2010-12-20 Thread Eric Blake
On 12/20/2010 01:03 AM, Laine Stump wrote: virSocketPrefixToNetmask: Given a 'prefix', which is the number of 1 bits in a netmask, fill in a virSocketAddr object with a netmask as an IP address (IPv6 or IPv4). virSocketAddrMask: Mask off the host bits in one virSocketAddr according to the

Re: [libvirt] [PATCH 02/13] New virNetworkDef utility functions

2010-12-20 Thread Eric Blake
On 12/20/2010 01:03 AM, Laine Stump wrote: Later patches will add the possibility to define a network's netmask as a prefix (0-32, or 0-128 in the case of IPv6). To make it easier to deal with definition of both kinds (prefix or netmask), add two new functions: virNetworkDefNetmask: return

Re: [libvirt] [PATCH 03/13] Fix logging of failed iptables commands

2010-12-20 Thread Eric Blake
On 12/20/2010 01:03 AM, Laine Stump wrote: The functions in iptables.c all return -1 on failure, but all their callers (which all happen to be in bridge_driver.c) assume that they are returning an errno, and the logging is done accordingly. This patch fixes all the error checking and logging

Re: [libvirt] [PATCH 04/13] Consistently return 0 on success, -1 on failure in bridge_driver.c

2010-12-20 Thread Eric Blake
On 12/20/2010 01:03 AM, Laine Stump wrote: Some functions in this file were returning 1 on success and 0 on failure, and others were returning 0 on success and -1 on failure. Switch them all to return the libvirt-preferred 0/-1. --- src/network/bridge_driver.c | 28

Re: [libvirt] [PATCH 05/13] Pass prefix rather than netmask into iptables functions

2010-12-20 Thread Eric Blake
On 12/20/2010 01:03 AM, Laine Stump wrote: IPv6 will use prefix exclusively, and IPv4 will also optionally be able to use it, and the iptables functions really need a prefix anyway, so use the new virNetworkDefPrefix() function to send prefixes into iptables functions instead of netmasks.

Re: [libvirt] [PATCH 06/13] Make virtual network netmasks optional

2010-12-20 Thread Eric Blake
On 12/20/2010 01:03 AM, Laine Stump wrote: When a netmask isn't specified for an IPv4 address, one can be implied based on what network class range the address is in. The virNetworkDefPrefix function does this for us, so netmask isn't required. --- src/conf/network_conf.c | 30

[libvirt] [PATCH 1/1] Skip file-based security checks for network disks

2010-12-20 Thread Josh Durgin
Network disks are accessed by qemu directly, and have no associated file on the host, so checking for file ownership etc. is unnecessary. Signed-off-by: Josh Durgin jo...@hq.newdream.net --- src/conf/domain_conf.c |2 +- src/qemu/qemu_security_dac.c |2 +-

[libvirt] [PATCH] [v3] storage: Ignore dangling symbolic link for filesystem pool

2010-12-20 Thread Osier Yang
If there is a dangling symbolic link in filesystem pool, the pool will fail to start or refresh, this patch is to fix it by ignoring it with a warning log. --- src/storage/storage_backend.c| 10 +- src/storage/storage_backend_fs.c |2 +- 2 files changed, 10 insertions(+), 2

Re: [libvirt] [v2] storage: Ignore dangling symbol link for filesystem pool

2010-12-20 Thread Osier Yang
于 2010年12月21日 00:09, Eric Blake 写道: On 12/20/2010 12:14 AM, Osier Yang wrote: If there is a dangling symbol link in filesystem pool, the pool s/symbol/symbolic/ will be failed to start or refresh, this patch is to fix it by s/will be failed/will fail/ ignoring it with a warning log.