[libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Atsushi SAKAI
Hi, Currently, compilation for MinGW is broken. Here is the patch. But configure script option for MinGW is changed from previous posting. https://www.redhat.com/archives/libvir-list/2008-June/msg00145.html Currently, it should do # ./configure --without-xen --without-qemu --without-sasl

Re: [libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Daniel Veillard
On Tue, Aug 05, 2008 at 04:24:08PM +0900, Atsushi SAKAI wrote: Hi, Currently, compilation for MinGW is broken. Here is the patch. But configure script option for MinGW is changed from previous posting. https://www.redhat.com/archives/libvir-list/2008-June/msg00145.html Currently, it

Re: [libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Daniel P. Berrange
On Tue, Aug 05, 2008 at 04:03:41AM -0400, Daniel Veillard wrote: On Tue, Aug 05, 2008 at 04:24:08PM +0900, Atsushi SAKAI wrote: Hi, Currently, compilation for MinGW is broken. Here is the patch. But configure script option for MinGW is changed from previous posting.

Re: [libvirt] [PATCH] make distclean: remove generated source files

2008-08-05 Thread Jim Meyering
Richard W.M. Jones [EMAIL PROTECTED] wrote: On Mon, Aug 04, 2008 at 04:24:55PM +0200, Jim Meyering wrote: --- a/src/Makefile.am +++ b/src/Makefile.am @@ -189,3 +189,4 @@ install-exec-local: $(MKDIR_P) $(DESTDIR)$(localstatedir)/cache/libvirt CLEANFILES = *.gcov .libs/*.gcda

[libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Chris Lalancette
Recently upstream Xen added support for having xvd devices 16. For the most part, this doesn't really concern libvirt, since for things like attach and detach we just pass it through and let xend worry about whether it is supported or not. The one place this breaks down is in the stats

[libvirt] [PATCH] Save uuid when define/create domain

2008-08-05 Thread Evgeniy Sokolov
Hi, There was bug. UUID defined in XML or generated during define/create was not saved to config. Then it was regenerated in virDrvStateInitialize. Attached patch fix bug. Index: src/openvz_conf.c === RCS file:

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Daniel P. Berrange
On Tue, Aug 05, 2008 at 12:12:21PM +0200, Chris Lalancette wrote: Recently upstream Xen added support for having xvd devices 16. For the most part, this doesn't really concern libvirt, since for things like attach and detach we just pass it through and let xend worry about whether it is

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Daniel Veillard
On Tue, Aug 05, 2008 at 12:12:21PM +0200, Chris Lalancette wrote: Recently upstream Xen added support for having xvd devices 16. For the most part, this doesn't really concern libvirt, since for things like attach and detach we just pass it through and let xend worry about whether it is

Re: [libvirt] [PATCH] Save uuid when define/create domain

2008-08-05 Thread Daniel Veillard
On Tue, Aug 05, 2008 at 02:14:16PM +0400, Evgeniy Sokolov wrote: Hi, There was bug. UUID defined in XML or generated during define/create was not saved to config. Then it was regenerated in virDrvStateInitialize. That sounds fine, and the patch looks good too, applied and commited,

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Daniel P. Berrange
On Tue, Aug 05, 2008 at 06:47:34AM -0400, Daniel Veillard wrote: On Tue, Aug 05, 2008 at 12:12:21PM +0200, Chris Lalancette wrote: Recently upstream Xen added support for having xvd devices 16. For the most part, this doesn't really concern libvirt, since for things like attach and

Re: [libvirt] libvirt-java storage support and refactoring

2008-08-05 Thread Tóth István
Daniel Veillard wrote: On Mon, Aug 04, 2008 at 11:59:38PM +0200, Toth Istvan wrote: Here's a new take on the patch (It's against current CVS) The changes from the previous patch: - I've changed the generic functions to macros, so now they are as typesafe as JNI lets them be. - I've

Re: [libvirt] libvirt-java storage support and refactoring

2008-08-05 Thread Daniel Veillard
On Mon, Aug 04, 2008 at 11:59:38PM +0200, Toth Istvan wrote: Here's a new take on the patch (It's against current CVS) The changes from the previous patch: - I've changed the generic functions to macros, so now they are as typesafe as JNI lets them be. - I've converted all applicable

Re: [libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Richard W.M. Jones
On Tue, Aug 05, 2008 at 04:24:08PM +0900, Atsushi SAKAI wrote: src/virsh.c |8 Is it possible to get edit working on Windows? My MinGW system has a program which looks like 'vi' ... Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones

[libvirt] [PATCH]: Fix virsh attach-disk and virsh attach-interface

2008-08-05 Thread Chris Lalancette
With the recent refactoring of the domain code, plus the changes with the Xend code, a couple of bugs were introduced into the attach-disk and attach-interface functionality. This patch fixes 3 bugs: 1) In xenDaemonAttachDevice(), there is a switch statement to determine which of the

Re: [libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Atsushi SAKAI
Hi, Dan and Daniel Thank you for commenting this. I am digging into the problem domain_conf.c, network_conf.c and test driver. Just for network_conf.c outputs following message. gcc -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../include

Re: [libvirt] [PATCH]: Fix virsh attach-disk and virsh attach-interface

2008-08-05 Thread Daniel Veillard
On Tue, Aug 05, 2008 at 12:02:47PM +0200, Chris Lalancette wrote: With the recent refactoring of the domain code, plus the changes with the Xend code, a couple of bugs were introduced into the attach-disk and attach-interface functionality. This patch fixes 3 bugs: 1) In

Re: [libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Jim Meyering
Atsushi SAKAI [EMAIL PROTECTED] wrote: ... network_conf.c:290: warning: implicit declaration of function `inet_aton' network_conf.c:290: warning: nested extern declaration of `inet_aton' We can/should use inet_pton instead. Then, not only do we use what seems to be the preferred interface, but

Re: [libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Daniel P. Berrange
On Tue, Aug 05, 2008 at 01:52:58PM +0200, Jim Meyering wrote: Atsushi SAKAI [EMAIL PROTECTED] wrote: ... network_conf.c:290: warning: implicit declaration of function `inet_aton' network_conf.c:290: warning: nested extern declaration of `inet_aton' We can/should use inet_pton instead.

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Chris Lalancette
Daniel P. Berrange wrote: On Tue, Aug 05, 2008 at 12:12:21PM +0200, Chris Lalancette wrote: Recently upstream Xen added support for having xvd devices 16. For the most part, this doesn't really concern libvirt, since for things like attach and detach we just pass it through and let xend

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Daniel P. Berrange
On Tue, Aug 05, 2008 at 02:08:24PM +0200, Chris Lalancette wrote: Daniel P. Berrange wrote: On Tue, Aug 05, 2008 at 12:12:21PM +0200, Chris Lalancette wrote: Recently upstream Xen added support for having xvd devices 16. For the most part, this doesn't really concern libvirt, since for

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Jim Meyering
Chris Lalancette [EMAIL PROTECTED] wrote: ... test suite. As far as the error reporting goes, I won't argue that my patch gives slightly less information. However, that being said, I have to believe that the most likely use of block statistics is something like: virsh dumpxml dom ...see

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Chris Lalancette
Jim Meyering wrote: To retain the diagnostic Dan mentioned, you should be able to insert something like this just before the final else: else if (disk_re_match(/dev/sd[a-z]([0-9])+$, mod_path, part)) { +else +statsErrorFunc (conn, VIR_ERR_INVALID_ARG, __FUNCTION__, +

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Daniel P. Berrange
On Tue, Aug 05, 2008 at 03:45:40PM +0200, Chris Lalancette wrote: Jim Meyering wrote: To retain the diagnostic Dan mentioned, you should be able to insert something like this just before the final else: else if (disk_re_match(/dev/sd[a-z]([0-9])+$, mod_path, part)) { +else

Re: [libvirt] [PATCH]: Fix virsh attach-disk and virsh attach-interface

2008-08-05 Thread Daniel P. Berrange
On Tue, Aug 05, 2008 at 12:02:47PM +0200, Chris Lalancette wrote: With the recent refactoring of the domain code, plus the changes with the Xend code, a couple of bugs were introduced into the attach-disk and attach-interface functionality. This patch fixes 3 bugs: 1) In

[libvirt] PATCH: 0/7: Re-factor LXC driver

2008-08-05 Thread Daniel P. Berrange
This is a long overdue followup to my previous set of patches to make the LXC driver use the new domain XML apis. Getting this merged is a blocker for the new libvirt release, now we've turned on LXC by default. Likewise we need to get OpenVZ fully ported to new XML before release too. The

Re: [libvirt] PATCH: 1/7: Removing state from lxc_vm_t

2008-08-05 Thread Daniel P. Berrange
This patch does some simple re-factoring of the way the TTYs and control socket are handled to reduce the amount of state stored in the lxc_vm_t structure, in preparation for the switchover to the generic domain handling APIs. lxc_conf.c |1 lxc_conf.h | 12 --- lxc_container.c

Re: [libvirt] PATCH: 2/7: Re-arrange methods acros LXC source files

2008-08-05 Thread Daniel P. Berrange
The lxc_driver.c file contains quite a large amount of code, serving two reasonably well separated purposes. First there is the direct implemntation of each of the libvirt driver APIs. Second there is the code to spawn a container and a controller for forwarding I/O to/from the PTYs. This patch

Re: [libvirt] PATCH: 3/7:

2008-08-05 Thread Daniel P. Berrange
Every LXC container has 2 processes, the leader of the actual container and a helper process to do the I/O forwarding. The LXC driver is written to allow libvirtd to be restarted without needing to shutdown the active containers. For this it uses a PID file in /var/run/libvirt/lxc/NAME.pid The

Re: [libvirt] PATCH: 4/7: Convert LXC to new domain APIs

2008-08-05 Thread Daniel P. Berrange
The re-architecting of the LXC controller/container process relationship in the previous patch removed the last obstacle to switching over to the generic domain XML routines. So this patch switches the driver over. First the vast majority of lxc_conf.h/c is simply deleted - this is all redundant

Re: [libvirt] PATCH: 5/7: Remove paths from virDomainObjPtr

2008-08-05 Thread Daniel P. Berrange
This patch removes the configDir and autostartLink paths from the internal virDomainObjPtr struct. Instead they can calculated at time of use. This is to facilitate a following patch, where we want to write a config to an alternative location at some points. This also makes the LXC QEMU drivers

Re: [libvirt] PATCH: 6/7: Persist live domain config across restarts

2008-08-05 Thread Daniel P. Berrange
Internally the drivers track the current live configuration, and the new inactive config for running domains. When the libvirtd process is restarted though, this data is lost for any active LXC domains. This patch makes the LXC driver persist the live config to /var/run/libvirt/lxc/NAME.xml so it

Re: [libvirt] PATCH: 7/7: Allow replacing root filesystem

2008-08-05 Thread Daniel P. Berrange
The LXC driver currently allows custom mount points to be setup inside the container. This only works for non-root mount points. You cannot replace the entire root filesystem. This patch adds support for replacing the entire root filesystem, thus allowing the use of LXC containers as a 'better

Re: [libvirt] [PATCH]: Rework xenLinuxDomainDeviceID to support more devices

2008-08-05 Thread Chris Lalancette
Chris Lalancette wrote: Jim Meyering wrote: To retain the diagnostic Dan mentioned, you should be able to insert something like this just before the final else: else if (disk_re_match(/dev/sd[a-z]([0-9])+$, mod_path, part)) { +else +statsErrorFunc (conn,

Re: [libvirt] [PATCH]: Fix virsh attach-disk and virsh attach-interface

2008-08-05 Thread Chris Lalancette
Daniel P. Berrange wrote: Ok, I've found the original xenDaemonAttachDevice() had this hack to make them consistent: if (!memcmp(sexpr, (device , 8)) { conf = sexpr + 8; *(conf + strlen(conf) -1) = 0; /* suppress final ) */ } else conf = sexpr;

Re: [libvirt] PATCH: 0/7: Re-factor LXC driver

2008-08-05 Thread Daniel P. Berrange
On Tue, Aug 05, 2008 at 09:04:34PM +0400, Evgeniy V. Sokolov wrote: This is a long overdue followup to my previous set of patches to make the LXC driver use the new domain XML apis. Getting this merged is a blocker for the new libvirt release, now we've turned on LXC by default. Likewise we

Re: [libvirt] PATCH: 0/7: Re-factor LXC driver

2008-08-05 Thread Evgeniy Sokolov
On Tue, Aug 05, 2008 at 09:04:34PM +0400, Evgeniy V. Sokolov wrote: This is a long overdue followup to my previous set of patches to make the LXC driver use the new domain XML apis. Getting this merged is a blocker for the new libvirt release, now we've turned on LXC by default. Likewise we

Re: [libvirt] PATCH: 0/7: Re-factor LXC driver

2008-08-05 Thread Dan Smith
DB This is a long overdue followup to my previous set of patches to DB make the LXC driver use the new domain XML apis. Have you been able to test this with NET_NS support enabled yet? I am hitting the same issue I was before. On starting an LXC domain with a network interface, the daemon

Re: [libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Atsushi SAKAI
Hi, Rich I think possible. But It needs time I will consider it. Thanks Atsushi SAKAI Richard W.M. Jones [EMAIL PROTECTED] wrote: On Tue, Aug 05, 2008 at 04:24:08PM +0900, Atsushi SAKAI wrote: src/virsh.c |8 Is it possible to get edit working on Windows? My

Re: [libvirt] [PATCH] fix MinGW compilation(200808)

2008-08-05 Thread Atsushi SAKAI
Hi, Jim Thank you for commenting this. I am wondered how to replace inet_aton. Your suggestion is very helpful. Thanks Atsushi SAKAI Jim Meyering [EMAIL PROTECTED] wrote: Atsushi SAKAI [EMAIL PROTECTED] wrote: ... network_conf.c:290: warning: implicit declaration of function `inet_aton'