Re: [Libvir] [PATCH] NIC should define in order

2008-01-21 Thread Daniel Veillard
On Thu, Jan 17, 2008 at 04:26:40PM +0900, Hiroyuki Kaguchi wrote: Currently NIC definition order is reversed. If we set over 4-NICs for a domain by virt-install, this causes a network communication problem. This is because virtual mac to eth relation is lost. This patch fixes the NIC

Re: [Libvir] PATCH: Fix and cleanup ref counting/ domain/network object release

2008-01-21 Thread Daniel Veillard
On Sat, Jan 19, 2008 at 07:18:03PM +, Daniel P. Berrange wrote: The referencing counting code for Connect/Domain/Network objects has many repeated codepaths, not all of which are correct. eg, the virFreeDomain method forgets to release networks when garbage collecting a virConnectPtr, and

Re: [Libvir] PATCH: Make virsh use virFileReadAll

2008-01-21 Thread Daniel Veillard
On Sat, Jan 19, 2008 at 07:37:01PM +, Daniel P. Berrange wrote: This patch makes virsh use the virFileReadAll API from util.c, instead of duplicating it. This means we need to export this symbol from the library. okay +1, but se should try to limit the number of __exports in general.

Re: [Libvir] [PATCH] change a Disk/Nic of inactive domain

2008-01-21 Thread S.Sakamoto
These struct definitions *intentionally* private. Oops, I did not notice it... I revised a patch not to access the struct data directly. In principle this patch looks good. If no one else objects, I'll commit this, with a few of my own fixes (below). Rich. +

Re: [Libvir] PATCH: Remove no-op network API impl from OpenVZ driver

2008-01-21 Thread Daniel Veillard
On Sat, Jan 19, 2008 at 06:44:19PM +, Daniel P. Berrange wrote: The openvz_driver.c file registers an implementation of the networking driver APIs, which is a no-op. Even though the networking APIs are implemented in the QEMU driver, this one impl is *shared* and used across all

Re: [Libvir] OCaml libvirt 0.4.0.2 released

2008-01-21 Thread Richard W.M. Jones
Daniel P. Berrange wrote: On Sun, Jan 20, 2008 at 12:46:07PM +, Richard W.M. Jones wrote: This is an experimental release of the OCaml libvirt bindings and tools. The main changes are that we have moved to automatically generating as many of the C bindings as possible, and this includes

Re: [Libvir] PATCH: const-correct sexpr

2008-01-21 Thread Jim Meyering
Daniel P. Berrange [EMAIL PROTECTED] wrote: On Sat, Jan 19, 2008 at 10:48:46PM +0100, Jim Meyering wrote: I was looking at xend_internal.c and wondered why sexpr_int's sexpr pointer wasn't const... surely, it *can't* modify that, I thought. So I made it const, and pulled the thread, which

Re: [Libvir] Question about building libvirt on Windows

2008-01-21 Thread Richard W.M. Jones
Atsushi SAKAI wrote: Hi, Rich I try to build on current libvirt on Windows. But failed in attached compilation message. I would be appreciate If you have any suggestions. My Instruction is follows. build cygwinenvironment. Install gettext-devel, gnutls, gnutls-devel additionally. install

Re: [Libvir] Dom0 and entitlement

2008-01-21 Thread Richard W.M. Jones
Katti, Vadiraj (STSD-Openview) wrote: Hi, I've some questions related to xen. Can anybody help me regarding the following questions. These sound more like Xen questions, but anyway ... 1. Is dom0 a logical system(like any other vm's that are configured on it) ? If yes, then all xm commands

Re: [Libvir] PATCH: Remove no-op network API impl from OpenVZ driver

2008-01-21 Thread Richard W.M. Jones
Daniel P. Berrange wrote: The openvz_driver.c file registers an implementation of the networking driver APIs, which is a no-op. Even though the networking APIs are implemented in the QEMU driver, this one impl is *shared* and used across all virtualization driver backends. Thus no other

Re: [Libvir] PATCH: Fix qemu-dm path in capabilities info

2008-01-21 Thread Richard W.M. Jones
Daniel P. Berrange wrote: The current Xen capabilities XML data chooses between /usr/lib/xen/bin/qemu-dm and /usr/lib64/xen/bin/qemu-dm based on whether the guest arch is 64 bit. This is incorrect because the path is actually determined based on the host OS. Only x86_64 uses /usr/lib64, all

Re: [Libvir] PATCH: Cleanup generator force build fail on missing APIs

2008-01-21 Thread Richard W.M. Jones
Daniel P. Berrange wrote: The python generator will happily ignore functions it can't handle and pretend everything completed without error. This leads to the situation where we add new APis to C library and no one ever notices that they are missing from the python until months later. This

[Libvir] [PATCH] Don't access line[-1] for a zero-length line from fgets.

2008-01-21 Thread Jim Meyering
In reviewing the StorageAPI patches, I saw that some bogus input could cause a segfault. There's similar code in libvirt.c, so this fixes both. Note that virsh.c does this, too, but it already has the required guard. The src/libvirt.c patch applies to the trunk, but isn't a big deal, since it's

Re: [Libvir] [PATCH] Don't access line[-1] for a zero-length line from fgets.

2008-01-21 Thread Richard W.M. Jones
Jim Meyering wrote: In reviewing the StorageAPI patches, I saw that some bogus input could cause a segfault. There's similar code in libvirt.c, so this fixes both. Note that virsh.c does this, too, but it already has the required guard. The src/libvirt.c patch applies to the trunk, but isn't a

Re: [Libvir] PATCH: Cleanup generator force build fail on missing APIs

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 04:14:15AM -0500, Daniel Veillard wrote: On Sun, Jan 20, 2008 at 05:29:06PM +, Daniel P. Berrange wrote: The python generator will happily ignore functions it can't handle and pretend everything completed without error. This leads to the situation where we add

Re: [Libvir] PATCH: Fix qemu-dm path in capabilities info

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 11:55:45AM +, Richard W.M. Jones wrote: Daniel P. Berrange wrote: The current Xen capabilities XML data chooses between /usr/lib/xen/bin/qemu-dm and /usr/lib64/xen/bin/qemu-dm based on whether the guest arch is 64 bit. This is incorrect because the path is

Re: [Libvir] PATCH: Add missing APIs to python binding

2008-01-21 Thread Richard W.M. Jones
Daniel Veillard wrote: Well, docs/libvirt-api.xml is automatically generated from the headers (and C modules), but python/libvirt-python-api.xml is manually created to describe similar input but for the functions where the C binding is done manually. This allows the generator to plug them at

Re: [Libvir] [PATCH] Don't access line[-1] for a zero-length line from fgets.

2008-01-21 Thread Jim Meyering
Daniel Veillard [EMAIL PROTECTED] wrote: On Mon, Jan 21, 2008 at 01:37:25PM +0100, Jim Meyering wrote: In reviewing the StorageAPI patches, I saw that some bogus input could cause a segfault. There's similar code in libvirt.c, so this fixes both. Note that virsh.c does this, too, but it

Re: [Libvir] PATCH: Fix and cleanup ref counting/ domain/network object release

2008-01-21 Thread Daniel Veillard
On Mon, Jan 21, 2008 at 02:48:58PM +, Daniel P. Berrange wrote: That I found worrying. What is the added benefit for the loss of portability? You now reference 2 relatively system specific kind of data structure, where we used to reference only the xmlMutex one which was portable.

Re: [Libvir] PATCH: Fix and cleanup ref counting/ domain/network object release

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 02:57:37PM +, Richard W.M. Jones wrote: Daniel P. Berrange wrote: The problem is that we need to use pthread_t / pthread_create APIs for other parts of libvirt. libxml2 doesn't provide any portability layer for threads - only for mutexes. Any platform which has

Re: [Libvir] PATCH: Make virsh use virFileReadAll

2008-01-21 Thread Daniel P. Berrange
On Sun, Jan 20, 2008 at 12:23:26PM +, Richard W.M. Jones wrote: Daniel P. Berrange wrote: This patch makes virsh use the virFileReadAll API from util.c, instead of duplicating it. This means we need to export this symbol from the library. +1. Comitted. Dan. -- |=- Red Hat,

Re: [Libvir] PATCH: Add missing APIs to python binding

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 09:29:12AM -0500, Daniel Veillard wrote: On Mon, Jan 21, 2008 at 02:26:36PM +, Daniel P. Berrange wrote: On Mon, Jan 21, 2008 at 09:02:09AM -0500, Daniel Veillard wrote: On Mon, Jan 21, 2008 at 01:58:07PM +, Daniel P. Berrange wrote: On Mon, Jan 21, 2008

Re: [Libvir] PATCH: Cleanup generator force build fail on missing APIs

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 09:12:12AM -0500, Daniel Veillard wrote: On Mon, Jan 21, 2008 at 02:02:28PM +, Daniel P. Berrange wrote: On Mon, Jan 21, 2008 at 04:14:15AM -0500, Daniel Veillard wrote: On Sun, Jan 20, 2008 at 05:29:06PM +, Daniel P. Berrange wrote: The python generator

Re: [Libvir] Repository for work-in-progress storage patches

2008-01-21 Thread Jim Meyering
Daniel P. Berrange [EMAIL PROTECTED] wrote: hg qclone -p http://hg.berrange.com/libraries/libvirt--storage \ http://hg.berrange.com/libraries/libvirt--devel Relative to a snapshot of a few minutes ago, here are two patches: * src/storage_backend_fs.c

Re: [Libvir] [PATCH] Avoid may be used uninitialized warning.

2008-01-21 Thread Richard W.M. Jones
Jim Meyering wrote: I've been seeing this on rawhide for a few days: xmconfigtest.c:115: warning: 'old_priv' may be used uninitialized in this function +1. I always compile with --enable-compiler-warnings=fatal. Haven't seen this, but there again Rawhide wasn't working very well for me so

[Libvir] unnecessary if-before-free tests

2008-01-21 Thread Jim Meyering
Hi Dan, I noticed a few new unnecessary if-before-free tests: src/storage_backend.c:2591: if (groups[j]) free(groups[j]); src/storage_backend_iscsi.c:if (devpath) free(devpath); src/storage_backend_iscsi.c:if (portal) free(portal); src/storage_backend_iscsi.c:if (session)

[Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I spent the weekend attempting to get libvirt working on OS X Leopard 10.5.1. I was able to get it to compile, but not connect to libvirtd running on either my KVM or Xen servers. Here are the instructions for getting it to compile: 1.

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ah, I knew hyper was 64-bit, but it has no definition on OS X. I thought that long on OS X 10.5.1 was 64 bits in width -- my mistake. There wre two bugs in the remoteAuthenticate method in libvirt 0.4.0 which can cause crashes. I'd recommend

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Okay, the autogen.sh fails right off the bat. To get it working you have to edit it so that it checks the ld version with a '-V' instead of '--version' (OS X specific). Once you do that and run: ./autogen.sh --without-xen --without-qemu it

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 05:32:33PM -0600, Schley Andrew Kutz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Okay, the autogen.sh fails right off the bat. To get it working you have to edit it so that it checks the ld version with a '-V' instead of '--version' (OS X specific). Once

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 05:27:33PM -0600, Schley Andrew Kutz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ah, I knew hyper was 64-bit, but it has no definition on OS X. I thought that long on OS X 10.5.1 was 64 bits in width -- my mistake. XDR is a language for defining portable

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is all the mentions of xdr_hyper in /usr/include on my box: [EMAIL PROTECTED]:libvirt-HEAD-20080121$ grep -R xdr_hyper /usr/include /usr/include/nfs/nfsm_subs.h: txdr_hyper(__tmp64, (NMC)-nmc_ptr); \ /usr/include/nfs/nfsm_subs.h

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 04:50:29PM -0600, Schley Andrew Kutz wrote: 5. Edit '/usr/include/net/if.h' and add the following include: #include net/if_var.h #include sys/types.h // // EDIT: akutz // #include sys/socket.h This is curious - I'm puzzelled why libvirt source uses

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fails the same way on Linux (Ubuntu 7.10 Gutsy Gibbon - Server - x86_64): ./configure: line 35963: syntax error near unexpected token `libxml-2.0,LIBXML_FOUND=yes' ./configure: line 35963: ` PKG_CHECK_EXISTS(libxml-2.0,LIBXML_FOUND=yes)'

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 05:52:06PM -0600, Schley Andrew Kutz wrote: I've attached the compile failure I get. Ok, so your header files suggest Mac OS *does* have xdr_hyper, and this failure is a link time failure: Undefined symbols: _xdr_quad_t, referenced from:

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 05:58:06PM -0600, Schley Andrew Kutz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fails the same way on Linux (Ubuntu 7.10 Gutsy Gibbon - Server - x86_64): ./configure: line 35963: syntax error near unexpected token `libxml-2.0,LIBXML_FOUND=yes'

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Daniel P. Berrange
On Tue, Jan 22, 2008 at 12:01:10AM +, Daniel P. Berrange wrote: On Mon, Jan 21, 2008 at 05:52:06PM -0600, Schley Andrew Kutz wrote: I've attached the compile failure I get. Ok, so your header files suggest Mac OS *does* have xdr_hyper, and this failure is a link time failure:

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Not so much. I added the two headers from http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/xdr.3.html to remote_protocol.x and the gen fails: [EMAIL PROTECTED]:libvirt-0.4.0$ make -C qemud remote_protocol.c rm -f

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was missing pkg-config. But the 'make dist' now fails: make[3]: Entering directory `/usr/local/src/libvirt/docs/examples/ python' make[3]: Leaving directory `/usr/local/src/libvirt/docs/examples/python' make[2]: Leaving directory

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED]:qemud$ make remote_protocol.c rm -f remote_protocol.c rpcgen -c -o remote_protocol.c remote_protocol.x unsigned hyper cpu_time; ^^^ remote_protocol.x, line 144: expected ';' make: *** [remote_protocol.c]

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 06:18:26PM -0600, Schley Andrew Kutz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED]:qemud$ make remote_protocol.c rm -f remote_protocol.c rpcgen -c -o remote_protocol.c remote_protocol.x unsigned hyper cpu_time;

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
Not it. When I changed all instances of hyper to long earlier it worked. The hyper is not getting parses. That said, I'll still try your suggestion when I'm back in front of my keyboard. -- -a On Jan 21, 2008, at 6:32 PM, Daniel P. Berrange [EMAIL PROTECTED] wrote: On Mon, Jan 21, 2008

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Verified that camelCase does not help. - -- - -a On Jan 21, 2008, at 6:46 PM, Schley Andrew Kutz wrote: Not it. When I changed all instances of hyper to long earlier it worked. The hyper is not getting parses. That said, I'll still try your

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Daniel P. Berrange
On Mon, Jan 21, 2008 at 07:27:58PM -0600, Schley Andrew Kutz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nevermind, I missed the date. Although, I do wonder if rpcgen on OS X supports 'hyper'? I am doing some digging to find out if it does. The Apple docs definitely suggest their

Re: [Libvir] libvirt on OS X Leopard 10.5.1

2008-01-21 Thread Schley Andrew Kutz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'll try the latter. However, from an earlier e-mail I pointed out that I cannot get the 'make dist' to work on Linux. It moans about a missing help file: cp: cannot stat `./libvirt.devhelp': No such file or directory make[2]: *** [distdir]

[Libvir] Libvirt windows compilation errors

2008-01-21 Thread Gabriel Kaufmann
Hi, I downloaded libvirt-0.4.0 sources and patched it with libvirt-windows-20071129-2.patch. I followed all the instructions from http://libvirt.org/windows.html and experienced some compilation problems which Caused me to make the following changes. 1- For some reason Cygwin does not