[Libvir] [RFC] 0 of 4 Linux Container support

2008-03-20 Thread Dave Leskovec
Greetings, Following are the patches adding linux container support. The first three patches are updated versions of the original three I posted. They've been updated for the feedback I've received so far and to include some other recent libvirt changes. The last patch adds support for

[Libvir] [RFC] 1 of 4 Linux Container support - base

2008-03-20 Thread Dave Leskovec
This patch adds the base linux container support. -- Best Regards, Dave Leskovec IBM Linux Technology Center Open Virtualization --- configure.in|6 ++ include/libvirt/virterror.h |1 + src/Makefile.am |2 ++ src/driver.h|1 +

[Libvir] [RFC] 2 of 4 Linux Container support - lxc_conf files

2008-03-20 Thread Dave Leskovec
This patch adds the lxc_conf source files. -- Best Regards, Dave Leskovec IBM Linux Technology Center Open Virtualization --- src/lxc_conf.c | 942 + src/lxc_conf.h | 142 2 files changed, 1084 insertions(+) Index:

[Libvir] [RFC] 3 of 4 Linux Container support

2008-03-20 Thread Dave Leskovec
This patch adds the lxc_driver source files. -- Best Regards, Dave Leskovec IBM Linux Technology Center Open Virtualization --- src/lxc_driver.c | 484 +++ src/lxc_driver.h | 45 + 2 files changed, 529 insertions(+) Index:

[Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-20 Thread Dave Leskovec
This patch adds the start container support. A couple new source files are added - lxc_container.h and lxc_container.c These contain the setup code that runs within the container namespace prior to exec'ing the user specified init. This is a rough outline of the functions involved in starting a

Re: [Libvir] [PATCH] Add new testing framework and the first test to use it.

2008-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2008 at 03:27:30PM +0100, Jim Meyering wrote: A week or so ago, I read a bug report on this list with a simple reproducer + fix that was just begging for a test suite addition. This change adds framework to make that easy, and adds the first test. I uncovered problems in

Re: [Libvir] [PATCH] Fix bugs in tests/Makefile.am.

2008-03-20 Thread Daniel Veillard
On Wed, Mar 19, 2008 at 02:51:50PM +0100, Jim Meyering wrote: I added a new test (coming in next message), but it failed due to problems fixed here: Fix bugs in tests/Makefile.am. * tests/Makefile.am (abs_top_builddir): Correct invalid settings of abs_top_builddir and

Re: [Libvir] [RFC] 2 of 4 Linux Container support - lxc_conf files

2008-03-20 Thread Daniel Veillard
On Wed, Mar 19, 2008 at 11:14:31PM -0700, Dave Leskovec wrote: This patch adds the lxc_conf source files. [...] +#define LXC_MAX_XML_LENGTH 4096 maybe up that a bit, or even better try to avoid a fixed size buffer but that can be done separately +#define LXC_MAX_ERROR_LEN 1024 +#define

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-20 Thread Daniel Veillard
On Wed, Mar 19, 2008 at 11:14:59PM -0700, Dave Leskovec wrote: This patch adds the lxc_driver source files. [...] +static int lxcCheckContainerSupport( void ) +{ +int rc = 0; +int flags = CLONE_NEWPID|CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWUSER| +CLONE_NEWIPC|SIGCHLD; +int

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-20 Thread Daniel P. Berrange
On Thu, Mar 20, 2008 at 12:11:39PM -0400, Daniel Veillard wrote: On Wed, Mar 19, 2008 at 11:14:59PM -0700, Dave Leskovec wrote: This patch adds the lxc_driver source files. [...] +static int lxcCheckContainerSupport( void ) +{ +int rc = 0; +int flags =

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-20 Thread Vivek Kashyap
snip... The XML format has been updated to this: domain type='linuxcontainer' I would rather keep the type attribute value small, and if possible the same as the one used for the connection URIs, 'lxr' would be just fine IMHO I suggest 'lxc' since that is what we are using for containers

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-20 Thread Daniel Veillard
On Thu, Mar 20, 2008 at 09:46:05AM -0700, Vivek Kashyap wrote: snip... The XML format has been updated to this: domain type='linuxcontainer' I would rather keep the type attribute value small, and if possible the same as the one used for the connection URIs, 'lxr' would be just fine

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-20 Thread Dave Leskovec
Daniel Veillard wrote: On Wed, Mar 19, 2008 at 11:14:59PM -0700, Dave Leskovec wrote: This patch adds the lxc_driver source files. [...] +static virDrvOpenStatus lxcOpen(virConnectPtr conn, +xmlURIPtr uri, +virConnectAuthPtr auth

Re: [Libvir] [PATCH] Fix MAC address parsing for 1-digit case

2008-03-20 Thread Hiroyuki Kaguchi
Hi, Jim Thank you very much for your comments. Regards Hiroyuki Kaguchi On 2008/03/19 19:55, Jim Meyering wrote: Hiroyuki Kaguchi [EMAIL PROTECTED] wrote: Thank you for your suggestions. I apply the following changes to the patch. 1) Initialize errno to 0 before the loop. 2) Use isxdigit