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

2008-03-27 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 05:05:43PM +, Daniel P. Berrange wrote: > Yes, this is a fundamentally stateful driver, so should run in the context > of the daemon as the QEMU driver does. Loading & unloading the persistent > state in the open/close method is hacking around the capabilities we already

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

2008-03-24 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 02:14:38PM -0700, Dave Leskovec wrote: > Daniel P. Berrange wrote: > > The following patches make the driver properly integrate with the stateful > > driver APIs. It also changes the config files to be named by on VM name > > instead of UUID, since this is what the QEMU driv

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

2008-03-21 Thread Dave Leskovec
Daniel P. Berrange wrote: > The following patches make the driver properly integrate with the stateful > driver APIs. It also changes the config files to be named by on VM name > instead of UUID, since this is what the QEMU driver does & its more user > friendly. It also adds the CLONE_XXX constant

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

2008-03-21 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 05:05:43PM +, Daniel P. Berrange wrote: > The following patches make the driver properly integrate with the stateful > driver APIs. It also changes the config files to be named by on VM name > instead of UUID, since this is what the QEMU driver does & its more user > fri

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

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 06:32:45PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > ... > > The following patches make the driver properly integrate with the stateful > > driver APIs. It also changes the config files to be named by on VM name > > instead of UUID, since

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

2008-03-21 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: ... > The following patches make the driver properly integrate with the stateful > driver APIs. It also changes the config files to be named by on VM name > instead of UUID, since this is what the QEMU driver does & its more user > friendly. It also a

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

2008-03-21 Thread Daniel P. Berrange
On Thu, Mar 20, 2008 at 02:43:28PM -0700, Dave Leskovec wrote: > Daniel Veillard wrote: > > [...] > >> +static int lxcListDomains(virConnectPtr conn, int *ids, int nids) > >> +{ > >> +lxc_driver_t *driver = (lxc_driver_t *)conn->privateData; > >> +lxc_vm_t *vm; > >> +int numDoms = 0; >

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

2008-03-21 Thread Daniel Veillard
On Thu, Mar 20, 2008 at 02:43:28PM -0700, Dave Leskovec wrote: > Daniel Veillard wrote: > > so it's restricted to root, it's probably fine, as we can go though the > > daemon for normal users, ssuming they get authenticated. > > Yes it's restricted to root. That could be removed if file capabili

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, >> +virConnectAuth

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 = CLONE_NEWPID|C

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; > +

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

2008-03-19 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: b/src/lxc_