[libvirt] [PATCH 2/3] Add pkg-config files for libvirt-qemu libvirt-lxc

2014-06-20 Thread Daniel P. Berrange
--- /dev/null +++ b/libvirt-lxc.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +datarootdir=@datarootdir@ + +libvirt_lxc_api=@datadir@/libvirt/api/libvirt-lxc-api.xml + +Name: libvirt-lxc +Version: @VERSION@ +Description: libvirt LXC

Re: [libvirt] [PATCH 2/3] Add pkg-config files for libvirt-qemu libvirt-lxc

2014-06-20 Thread Eric Blake
On 06/20/2014 10:51 AM, Daniel P. Berrange wrote: For some reason there have never been pkg-config files created for the libvirt-qemu.so and libvirt-lxc.so libraries. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- .gitignore| 2 +- Makefile.am | 4 +++-

Re: [libvirt] [PATCH v2] lxc: Add virCgroupSetOwner()

2014-02-24 Thread Daniel P. Berrange
On Fri, Feb 14, 2014 at 02:25:55PM +0100, Richard Weinberger wrote: diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index a6d60c5..4bef0db 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -3253,6 +3253,66 @@ cleanup: } +int virCgroupSetOwner(virCgroupPtr

Re: [libvirt] [PATCH v2] lxc: Add virCgroupSetOwner()

2014-02-24 Thread Richard Weinberger
Am 24.02.2014 13:20, schrieb Daniel P. Berrange: On Fri, Feb 14, 2014 at 02:25:55PM +0100, Richard Weinberger wrote: diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index a6d60c5..4bef0db 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -3253,6 +3253,66 @@ cleanup:

Re: [libvirt] [PATCH v2] lxc: Add virCgroupSetOwner()

2014-02-24 Thread Daniel P. Berrange
On Mon, Feb 24, 2014 at 01:25:04PM +0100, Richard Weinberger wrote: Am 24.02.2014 13:20, schrieb Daniel P. Berrange: On Fri, Feb 14, 2014 at 02:25:55PM +0100, Richard Weinberger wrote: diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index a6d60c5..4bef0db 100644 ---

[libvirt] [PATCH v2] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Richard Weinberger
Add a new helper function to change the permissions of a control group. This function is needed for user namespaces, we need to chmod() the cgroup to the initial uid/gid such that systemd is allowed to use the cgroup. Signed-off-by: Richard Weinberger rich...@nod.at --- Changes between v1 and v2:

[libvirt] [PATCH] [RFC] lxc: Remove !priv-cgroup case

2014-02-14 Thread Richard Weinberger
Currently we enforce that every container has a cgroup. So we can delete these two !priv-cgroup branches. Signed-off-by: Richard Weinberger rich...@nod.at --- Hi! Maybe I miss something but I think we can delete these two !priv-cgroup branches. If virLXCCgroupCreate() returns NULL the LXC

Re: [libvirt] [PATCH] [RFC] lxc: Remove !priv-cgroup case

2014-02-14 Thread Daniel P. Berrange
On Fri, Feb 14, 2014 at 03:21:01PM +0100, Richard Weinberger wrote: Currently we enforce that every container has a cgroup. So we can delete these two !priv-cgroup branches. Signed-off-by: Richard Weinberger rich...@nod.at --- Hi! Maybe I miss something but I think we can delete these

Re: [libvirt] [PATCH] [RFC] lxc: Remove !priv-cgroup case

2014-02-14 Thread Richard Weinberger
Am 14.02.2014 15:30, schrieb Daniel P. Berrange: On Fri, Feb 14, 2014 at 03:21:01PM +0100, Richard Weinberger wrote: Currently we enforce that every container has a cgroup. So we can delete these two !priv-cgroup branches. Signed-off-by: Richard Weinberger rich...@nod.at --- Hi! Maybe I

[libvirt] [PATCH v2] lxc: do cleanup when failed to create new string

2014-01-14 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: fix an indent issue src/lxc/lxc_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index c51c4d5..7d6c5d3 100644

Re: [libvirt] [PATCH v2]lxc: don't do duplicate work when getting pagesize

2013-11-25 Thread Michal Privoznik
On 25.11.2013 08:06, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com Don't do duplicate work when getting pagesize. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: remove redundant debug log src/lxc/lxc_container.c | 13 +++-- 1 file changed,

[libvirt] [PATCH v2]lxc: don't do duplicate work when getting pagesize

2013-11-24 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com Don't do duplicate work when getting pagesize. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: remove redundant debug log src/lxc/lxc_container.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-18 Thread Daniel P. Berrange
On Thu, Nov 14, 2013 at 05:44:40PM +0800, Chen Hanxiao wrote: -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Wednesday, November 13, 2013 6:35 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]lxc: don't mount

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-18 Thread Chen Hanxiao
-Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Monday, November 18, 2013 11:57 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known On Thu, Nov 14, 2013 at 05:44:40PM

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-17 Thread Gao feng
: Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known On Wed, Nov 13, 2013 at 04:51:43PM +0800, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, we could bind mount some dirs from host to guest, which don't belong to the target

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-15 Thread Daniel P. Berrange
On Thu, Nov 14, 2013 at 05:44:40PM +0800, Chen Hanxiao wrote: -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Wednesday, November 13, 2013 6:35 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]lxc: don't mount

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-14 Thread Chen Hanxiao
-Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Wednesday, November 13, 2013 6:35 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known On Wed, Nov 13, 2013 at 04:51

[libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-13 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, we could bind mount some dirs from host to guest, which don't belong to the target mapped uid/gid. Such as we could bind mount root's dirs to guest. What is worse, we could even modify root's files in that bind dir inside

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-13 Thread Gao feng
On 11/13/2013 04:51 PM, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, we could bind mount some dirs from host to guest, which don't belong to the target mapped uid/gid. Such as we could bind mount root's dirs to guest. What is worse, we could even

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 04:51:43PM +0800, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, we could bind mount some dirs from host to guest, which don't belong to the target mapped uid/gid. Such as we could bind mount root's dirs to guest. What is

Re: [libvirt] [CRIU] Live migration for containers - Was RE: libvirt support for LXC

2013-11-06 Thread Pavel Emelyanov
On 11/02/2013 04:27 PM, Daniel P. Berrange wrote: On Sat, Nov 02, 2013 at 12:56:37AM +, Christian Benvenuti (benve) wrote: Hello, based on the 3D below, it seems that the most logical way to add support for container live migration to libvirt is to integrate the latter with

Re: [libvirt] Live migration for containers - Was RE: libvirt support for LXC

2013-11-02 Thread Daniel P. Berrange
On Sat, Nov 02, 2013 at 12:56:37AM +, Christian Benvenuti (benve) wrote: Hello, based on the 3D below, it seems that the most logical way to add support for container live migration to libvirt is to integrate the latter with CRIU. If I understand it correctly, Daniel's

[libvirt] Live migration for containers - Was RE: libvirt support for LXC

2013-11-01 Thread Christian Benvenuti (benve)
Of Dmitry Guryanov Sent: Wednesday, February 13, 2013 2:58 AM To: Daniel P. Berrange Cc: libvir-list@redhat.com; c...@openvz.org; Kunal Kushwaha Subject: Re: [libvirt] libvirt support for LXC On 130207 15:19:08, Daniel P. Berrange wrote: On Thu, Feb 07, 2013 at 03:51:52PM +0530, Kunal

[libvirt] [PATCH v2] LXC: mount /dev/pts/0 to /dev/console

2013-10-29 Thread Gao feng
Now, /dev/console is linked to the /dev/pts/0, so for the process agetty, the tty device of agetty is pts/0. this will cause login container failed. since pts/0 is not in the /etc/securetty. so pam module pam_securetty will prevent the root user logging on the system. this patch doesn't make

Re: [libvirt] [PATCH v3]LXC: Helper function for checking permission of dir when userns enabled

2013-10-15 Thread Chen Hanxiao
ping... -Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Chen Hanxiao Sent: Wednesday, October 09, 2013 6:03 PM To: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v3]LXC: Helper function for checking permission

Re: [libvirt] [PATCH v3]LXC: Helper function for checking permission of dir when userns enabled

2013-10-15 Thread Daniel P. Berrange
: [libvirt] [PATCH v3]LXC: Helper function for checking permission of dir when userns enabled ping? -Original Message- From: Chen Hanxiao [mailto:chenhanx...@cn.fujitsu.com] Sent: Tuesday, September 10, 2013 4:18 PM To: libvir-list@redhat.com Cc: chenhanx

Re: [libvirt] [PATCH v3]LXC: Helper function for checking permission of dir when userns enabled

2013-10-15 Thread Chen Hanxiao
-Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Tuesday, October 15, 2013 7:07 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v3]LXC: Helper function for checking permission of dir when userns enabled On Tue, Oct 15

Re: [libvirt] [PATCH v3]LXC: Helper function for checking permission of dir when userns enabled

2013-10-09 Thread Chen Hanxiao
ping? -Original Message- From: Chen Hanxiao [mailto:chenhanx...@cn.fujitsu.com] Sent: Tuesday, September 10, 2013 4:18 PM To: libvir-list@redhat.com Cc: chenhanx...@cn.fujitsu.com Subject: [libvirt][PATCH v3]LXC: Helper function for checking permission of dir when userns enabled

Re: [libvirt] [PATCH v2]lxc: do cleanup when failed to bind fs as read-only

2013-10-06 Thread Chen Hanxiao
-Original Message- From: Eric Blake [mailto:ebl...@redhat.com] Sent: Tuesday, October 01, 2013 3:38 AM Cc: Chen Hanxiao; libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]lxc: do cleanup when failed to bind fs as read-only On 09/30/2013 01:29 PM, Eric Blake wrote: On 09

Re: [libvirt] [PATCH v2] LXC: Detect fs support. Mount only supported filesystems

2013-10-06 Thread Gao feng
On 10/04/2013 07:33 PM, Purcareata Bogdan-B43198 wrote: +/* + * This function attempts to detect kernel support + * for a specific filesystem type. This is done by + * inspecting /proc/filesystems. + */ +static int lxcCheckFSSupport(const char *fs_type) +{ +FILE *fp = NULL; +int

Re: [libvirt] [PATCH v2] LXC: Detect fs support. Mount only supported filesystems

2013-10-06 Thread Gao feng
On 10/07/2013 11:44 AM, Gao feng wrote: On 10/04/2013 07:33 PM, Purcareata Bogdan-B43198 wrote: +/* + * This function attempts to detect kernel support + * for a specific filesystem type. This is done by + * inspecting /proc/filesystems. + */ +static int lxcCheckFSSupport(const char

Re: [libvirt] [PATCH v2] LXC: Detect fs support. Mount only supported filesystems

2013-10-04 Thread Gao feng
On 10/02/2013 10:05 PM, Bogdan Purcareata wrote: Kept ((access(dstpath, R_OK) 0) || (!lxcCheckFSSupport(mnt-type))) when determining support for the mount. Even if the filesystem type is supported, there is still a chance to fail when building the dstpath (virFileMakePath). If that call

Re: [libvirt] [PATCH v2] LXC: Detect fs support. Mount only supported filesystems

2013-10-04 Thread Purcareata Bogdan-B43198
-Original Message- From: Gao feng [mailto:gaof...@cn.fujitsu.com] Sent: Friday, October 04, 2013 12:55 PM To: Purcareata Bogdan-B43198 Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2] LXC: Detect fs support. Mount only supported filesystems On 10/02/2013 10:05 PM

[libvirt] [PATCH v2] LXC: Detect fs support. Mount only supported filesystems

2013-10-02 Thread Bogdan Purcareata
Kept ((access(dstpath, R_OK) 0) || (!lxcCheckFSSupport(mnt-type))) when determining support for the mount. Even if the filesystem type is supported, there is still a chance to fail when building the dstpath (virFileMakePath). If that call fails, starting the container will fail. Specifically

[libvirt] [PATCH v2]lxc: do cleanup when failed to bind fs as read-only

2013-09-30 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com We forgot to do cleanup when lxcContainerMountFSTmpfs failed to bind fs as read-only. v2: fix an indentation issue Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- src/lxc/lxc_container.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [libvirt] [PATCH v2]lxc: do cleanup when failed to bind fs as read-only

2013-09-30 Thread Eric Blake
On 09/30/2013 03:06 AM, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com We forgot to do cleanup when lxcContainerMountFSTmpfs failed to bind fs as read-only. v2: fix an indentation issue Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com ---

Re: [libvirt] [PATCH v2]lxc: do cleanup when failed to bind fs as read-only

2013-09-30 Thread Eric Blake
On 09/30/2013 01:29 PM, Eric Blake wrote: On 09/30/2013 03:06 AM, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com We forgot to do cleanup when lxcContainerMountFSTmpfs failed to bind fs as read-only. v2: fix an indentation issue Oh, and a side note. Patch changelogs,

[libvirt] [PATCH v3]LXC: Helper function for checking permission of dir when userns enabled

2013-09-10 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, the process with uid/gid in idmap should have enough permission to access dir we provided for containers. Currently, the debug log is very implicit or misleading sometimes. This patch will help clarify this for us when using debug

Re: [libvirt] [PATCH v2]LXC: Helper function for checking ownership of dir when userns enabled

2013-08-21 Thread Daniel P. Berrange
On Fri, Aug 09, 2013 at 04:05:58PM +0800, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, the ownership of dir we provided for containers should match the uid/gid in idmap. Currently, the debug log is very implicit or misleading sometimes. This patch

Re: [libvirt] [PATCH v2]LXC: Helper function for checking ownership of dir when userns enabled

2013-08-20 Thread Chen HanXiao
]LXC: Helper function for checking ownership of dir when userns enabled -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Saturday, August 10, 2013 12:54 AM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]LXC: Helper

Re: [libvirt] [PATCH v2]LXC: Helper function for checking ownership of dir when userns enabled

2013-08-13 Thread Chen HanXiao
-Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Saturday, August 10, 2013 12:54 AM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]LXC: Helper function for checking ownership of dir when userns enabled On Fri, Aug 09

[libvirt] [PATCH v2]LXC: Helper function for checking ownership of dir when userns enabled

2013-08-09 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, the ownership of dir we provided for containers should match the uid/gid in idmap. Currently, the debug log is very implicit or misleading sometimes. This patch will help clarify this for us when using debug log or virsh. v2:

Re: [libvirt] [PATCH v2]LXC: Helper function for checking ownership of dir when userns enabled

2013-08-09 Thread Daniel P. Berrange
On Fri, Aug 09, 2013 at 04:05:58PM +0800, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, the ownership of dir we provided for containers should match the uid/gid in idmap. Currently, the debug log is very implicit or misleading sometimes. This patch

[libvirt] [PATCH] Ensure LXC/QEMU APIs set the filename for errors

2013-08-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virLibConnError macros in libvirt-lxc.c and libvirt-qemu.c were passing NULL for the filename. This causes a crash if the logging code is configured to use journald. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt-lxc.c | 6

Re: [libvirt] [PATCH] Ensure LXC/QEMU APIs set the filename for errors

2013-08-02 Thread Jiri Denemark
On Fri, Aug 02, 2013 at 12:17:03 +0100, Daniel Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The virLibConnError macros in libvirt-lxc.c and libvirt-qemu.c were passing NULL for the filename. This causes a crash if the logging code is configured to use journald.

[libvirt] [PATCH RESEND] LXC: fix memory leak when userns configuration is incorrect

2013-07-03 Thread Gao feng
We forgot to free the stack when Kernel doesn't support user namespace. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_container.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 282c726..c8420db 100644 ---

Re: [libvirt] [PATCH RESEND] LXC: fix memory leak when userns configuration is incorrect

2013-07-03 Thread Daniel P. Berrange
On Wed, Jul 03, 2013 at 07:16:04PM +0800, Gao feng wrote: We forgot to free the stack when Kernel doesn't support user namespace. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_container.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_container.c

[libvirt] [PATCH 1/3] Change VM cgroup suffix from '{lxc, qemu}.libvirt' to 'libvirt-{lxc, qemu}'

2013-04-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Recently we changed to create VM cgroups with the naming pattern $VMNAME.$DRIVER.libvirt. Following discussions with the systemd community it was decided that only having a single '.' in the names is preferrable. So this changes the naming scheme to be

Re: [libvirt] [PATCH 1/3] Change VM cgroup suffix from '{lxc, qemu}.libvirt' to 'libvirt-{lxc, qemu}'

2013-04-26 Thread Eric Blake
On 04/26/2013 04:45 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Recently we changed to create VM cgroups with the naming pattern $VMNAME.$DRIVER.libvirt. Following discussions with the systemd community it was decided that only having a single '.' in the names

[libvirt] libvirt-1.0.2 qith lxc and /proc/meminfo

2013-03-04 Thread Thierry Parmentelat
Hello there I'm using libvirt-1.0.2 to spawn off linux containers We currently have 2 very similar setups that run on fedora 16 and f18 respectively And I'm seeing one weird difference concerning /proc/meminfo While everything is fine on the fedora16 world, on the fedora18 side here is what the

Re: [libvirt] libvirt-1.0.2 qith lxc and /proc/meminfo

2013-03-04 Thread Daniel P. Berrange
On Mon, Mar 04, 2013 at 12:41:39PM +0100, Thierry Parmentelat wrote: Hello there I'm using libvirt-1.0.2 to spawn off linux containers We currently have 2 very similar setups that run on fedora 16 and f18 respectively And I'm seeing one weird difference concerning /proc/meminfo While

Re: [libvirt] libvirt support for LXC

2013-02-19 Thread Kunal Kushwaha
, Daniel P. Berrange wrote: On Thu, Feb 07, 2013 at 03:51:52PM +0530, Kunal Kushwaha wrote: Hi, I am new to this community and am not much aware of current status libvirt work for LXC. Currently I am evaluating LXC with libvirt. and I found still many features like checkpoint

Re: [libvirt] libvirt support for LXC

2013-02-13 Thread Dmitry Guryanov
On 130207 15:19:08, Daniel P. Berrange wrote: On Thu, Feb 07, 2013 at 03:51:52PM +0530, Kunal Kushwaha wrote: Hi, I am new to this community and am not much aware of current status libvirt work for LXC. Currently I am evaluating LXC with libvirt. and I found still many features

Re: [libvirt] libvirt support for LXC

2013-02-07 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 03:51:52PM +0530, Kunal Kushwaha wrote: Hi, I am new to this community and am not much aware of current status libvirt work for LXC. Currently I am evaluating LXC with libvirt. and I found still many features like checkpoint/restore/live migration , Checkpoint

[libvirt] [PATCH v2] LXC: create directory /dev/shm automatically

2013-01-29 Thread Gao feng
Now we mount /dev as tmpfs and haven't created directory /dev/shm,so the glibc api such as shm_open/sem_open will create files under dir /dev.(since /dev is mounted as tmpfs) Through these api still useable in container,but this cause directory /dev looks a little chaos. We already have

Re: [libvirt] [PATCH] libvirt: lxc: don't mkdir when selinux is disabled

2013-01-15 Thread Daniel P. Berrange
On Tue, Jan 15, 2013 at 10:13:36AM +0800, Gao feng wrote: On 2013/01/09 19:20, Gao feng wrote: libvirt lxc will fail to start when selinux is disabled. error: Failed to start domain noroot error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt

Re: [libvirt] [PATCH] libvirt: lxc: don't mkdir when selinux is disabled

2013-01-15 Thread Eric Blake
On 01/15/2013 02:26 AM, Daniel P. Berrange wrote: On Tue, Jan 15, 2013 at 10:13:36AM +0800, Gao feng wrote: On 2013/01/09 19:20, Gao feng wrote: libvirt lxc will fail to start when selinux is disabled. error: Failed to start domain noroot error: internal error guest failed to start: PATH=/bin

[libvirt] [PATCH] libvirt: lxc: fix incorrect parameter of lxcContainerMountProcFuse

2013-01-09 Thread Gao feng
when we have no host's src mapped to container's root. there is not .oldroot dir,we should pass / to lxcContainerMountProcFuse in function lxcContainerSetupExtraMounts. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_container.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCH] libvirt: lxc: fix incorrect parameter of lxcContainerMountProcFuse

2013-01-09 Thread Daniel P. Berrange
On Wed, Jan 09, 2013 at 04:05:58PM +0800, Gao feng wrote: when we have no host's src mapped to container's root. there is not .oldroot dir,we should pass / to lxcContainerMountProcFuse in function lxcContainerSetupExtraMounts. Signed-off-by: Gao feng gaof...@cn.fujitsu.com ---

Re: [libvirt] [PATCH] libvirt: lxc: fix incorrect parameter of lxcContainerMountProcFuse

2013-01-09 Thread Gao feng
On 2013/01/09 18:33, Daniel P. Berrange wrote: On Wed, Jan 09, 2013 at 04:05:58PM +0800, Gao feng wrote: when we have no host's src mapped to container's root. there is not .oldroot dir,we should pass / to lxcContainerMountProcFuse in function lxcContainerSetupExtraMounts. Signed-off-by:

Re: [libvirt] [PATCH] libvirt: lxc: fix incorrect parameter of lxcContainerMountProcFuse

2013-01-09 Thread Daniel P. Berrange
On Wed, Jan 09, 2013 at 06:45:48PM +0800, Gao feng wrote: On 2013/01/09 18:33, Daniel P. Berrange wrote: On Wed, Jan 09, 2013 at 04:05:58PM +0800, Gao feng wrote: when we have no host's src mapped to container's root. there is not .oldroot dir,we should pass / to lxcContainerMountProcFuse

[libvirt] [PATCH] libvirt: lxc: don't mkdir when selinux is disabled

2013-01-09 Thread Gao feng
libvirt lxc will fail to start when selinux is disabled. error: Failed to start domain noroot error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=b9873916-3516-c199-8112-1592ff694a9e LIBVIRT_LXC_UUID=b9873916-3516-c199-8112-1592ff694a9e

Re: [libvirt] [PATCH] Network: LXC generic ethernet interface

2012-09-27 Thread Daniel P. Berrange
On Mon, Sep 24, 2012 at 10:48:44AM +0900, Takayuki Usui wrote: The patch adds generic ethernet type to LXC, that allows you to make an arbitrary virtual network interface and associate it to an LXC domain. That does not, however, provide a means to execute a script, that is still available

[libvirt] [PATCH] Network: LXC generic ethernet interface

2012-09-23 Thread Takayuki Usui
The patch adds generic ethernet type to LXC, that allows you to make an arbitrary virtual network interface and associate it to an LXC domain. That does not, however, provide a means to execute a script, that is still available only for QEMU. 1. Create a virtual ethernet device pair

[libvirt] [PATCH 1/3] Create /var/lib/libvirt/filesystems for LXC trees

2011-11-01 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com We already have a /var/lib/libvirt/images for OS install images. We need a separate /var/lib/libvirt/filesystems for OS install trees, since SELinux labelling will be different * libvirt.spec.in: Add /var/lib/libvirt/filesystems * src/Makefile.am:

Re: [libvirt] [PATCH 1/3] Create /var/lib/libvirt/filesystems for LXC trees

2011-11-01 Thread Stefan Berger
On 11/01/2011 08:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com We already have a /var/lib/libvirt/images for OS install images. We need a separate /var/lib/libvirt/filesystems for OS install trees, since SELinux labelling will be different * libvirt.spec.in: Add

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-10-04 Thread Daniel P. Berrange
On Mon, Oct 03, 2011 at 02:03:18PM -0500, Serge E. Hallyn wrote: Quoting Daniel P. Berrange (berra...@redhat.com): The LXC controller 'main' method received the handshake FD and invokes lxcControllerRun(). This method does various setup tasks, in particular the following:

[libvirt] [PATCH] Make LXC work with new network configuration types

2011-10-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If using one of the new non-NAT/routed virtual network configurations, the LXC driver would not know how to setup the VETH devices. Adding in calls to setup the actual network configuration at VM startup and cleanup when shutting down fixes this. *

Re: [libvirt] [PATCH] Make LXC work with new network configuration types

2011-10-04 Thread Laine Stump
On 10/04/2011 08:52 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com If using one of the new non-NAT/routed virtual network configurations, the LXC driver would not know how to setup the VETH devices. Adding in calls to setup the actual network configuration at VM

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-10-03 Thread Daniel P. Berrange
); if (lxcContainerWaitForContinue(handshakefds[0]) 0) { The 'virCommandRun' is where libvirt_lxc controller is forked (in the background). The main libvirt LXC driver code then blocks on this 'lxcContainerWaitForContinue(handshakefds[0]) line, for the controller to finish initializing. The LXC controller

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-10-03 Thread Serge E. Hallyn
/+bug/842845 Forwarded: not-needed Index: libvirt-0.9.2/src/lxc/lxc_controller.c === --- libvirt-0.9.2.orig/src/lxc/lxc_controller.c 2011-10-03 13:10:31.098934902 -0500 +++ libvirt-0.9.2/src/lxc/lxc_controller.c 2011-10-03 13:10

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-30 Thread Daniel P. Berrange
On Thu, Sep 29, 2011 at 10:12:17PM -0500, Serge E. Hallyn wrote: Quoting Daniel P. Berrange (berra...@redhat.com): On Wed, Sep 28, 2011 at 02:14:52PM -0500, Serge E. Hallyn wrote: Nova (openstack) calls libvirt to create a container, then periodically checks using GetInfo to see whether

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-30 Thread Serge Hallyn
Quoting Daniel P. Berrange (berra...@redhat.com): On Thu, Sep 29, 2011 at 10:12:17PM -0500, Serge E. Hallyn wrote: Quoting Daniel P. Berrange (berra...@redhat.com): On Wed, Sep 28, 2011 at 02:14:52PM -0500, Serge E. Hallyn wrote: Nova (openstack) calls libvirt to create a container, then

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-29 Thread Daniel P. Berrange
On Wed, Sep 28, 2011 at 02:14:52PM -0500, Serge E. Hallyn wrote: Nova (openstack) calls libvirt to create a container, then periodically checks using GetInfo to see whether the container is up. If it does this too quickly, then libvirt returns an error, which in libvirt.py causes an exception

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-29 Thread Serge E. Hallyn
Quoting Daniel P. Berrange (berra...@redhat.com): On Wed, Sep 28, 2011 at 02:14:52PM -0500, Serge E. Hallyn wrote: Nova (openstack) calls libvirt to create a container, then periodically checks using GetInfo to see whether the container is up. If it does this too quickly, then libvirt

Re: [libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-29 Thread Serge E. Hallyn
Quoting Daniel P. Berrange (berra...@redhat.com): On Wed, Sep 28, 2011 at 02:14:52PM -0500, Serge E. Hallyn wrote: Nova (openstack) calls libvirt to create a container, then periodically checks using GetInfo to see whether the container is up. If it does this too quickly, then libvirt

[libvirt] [PATCH] Improve LXC startup error messages

2011-09-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The LXC controller and container attempt to run in lockstep using a series of handshakes. There was a flaw in the container side though, causing it todo partial setup work, before waiting for the initial controller handshake. This in turn meant some

[libvirt] [RFC PATCH] lxc: don't return error on GetInfo when cgroups not yet set up

2011-09-28 Thread Serge E. Hallyn
Nova (openstack) calls libvirt to create a container, then periodically checks using GetInfo to see whether the container is up. If it does this too quickly, then libvirt returns an error, which in libvirt.py causes an exception to be raised, the same type as if the container was bad. This may

Re: [libvirt] [PATCH] Improve LXC startup error messages

2011-09-28 Thread Daniel Veillard
On Wed, Sep 28, 2011 at 03:11:10PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The LXC controller and container attempt to run in lockstep using a series of handshakes. There was a flaw in the container side though, causing it todo partial setup work, before

[libvirt] [PATCH v2] lxc: Fail connection attempt if cgroups not mounted

2011-06-23 Thread Cole Robinson
Currently a user can connect to lxc:/// if cgroups aren't mounted, but they can't do a whole lot: starting and even stopping guests doesn't work (the latter only if cgroups were unmounted behind libvirt's back). To make matters worse, even after mounting cgroups, libvirt must be restarted to

Re: [libvirt] [PATCH RESEND] lxc: Seperate domain config loading

2011-05-31 Thread Daniel P. Berrange
On Mon, May 30, 2011 at 05:54:20PM +0800, Osier Yang wrote: This patch seperate the domain config loading just as qemu driver does, first loading config of running or trasient domains, then of persistent inactive domains. And only try to reconnect the monitor of running domains, so that it

Re: [libvirt] [PATCH RESEND] lxc: Seperate domain config loading

2011-05-31 Thread Osier Yang
于 2011年05月31日 17:38, Daniel P. Berrange 写道: On Mon, May 30, 2011 at 05:54:20PM +0800, Osier Yang wrote: This patch seperate the domain config loading just as qemu driver does, first loading config of running or trasient domains, then of persistent inactive domains. And only try to reconnect the

[libvirt] [PATCH RESEND] lxc: Seperate domain config loading

2011-05-30 Thread Osier Yang
This patch seperate the domain config loading just as qemu driver does, first loading config of running or trasient domains, then of persistent inactive domains. And only try to reconnect the monitor of running domains, so that it won't always throws errors saying can't connect to domain monitor.

[libvirt] [PATCH] Make LXC container startup/shutdown/I/O more robust

2011-02-22 Thread Daniel P. Berrange
+9,24 @@ light-weight application container which does not have it's own root image. Y start it using /p +h2Cgroups Requirements/h2 + +p +The libvirt LXC driver requires that certain cgroups controllers are +mounted on the host OS. The minimum required controllers are 'cpuacct', +'memory

[libvirt] [PATCH] Fix LXC container console device setup

2010-11-10 Thread Daniel P. Berrange
From: Daniel P. Berrange d...@berrange.com The /dev/console device inside the container must NOT map to the real /dev/console device node, since this allows the container control over the current host console. A fun side effect of this is that starting a container containing a real Fedora OS will

Re: [libvirt] [PATCH] Fix LXC container console device setup

2010-11-10 Thread Daniel Veillard
On Wed, Nov 10, 2010 at 01:30:07PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange d...@berrange.com The /dev/console device inside the container must NOT map to the real /dev/console device node, since this allows the container control over the current host console. A fun side

[libvirt] Fwd: Re: Lxc support

2010-10-29 Thread Jean-Philippe Menil
Message original Sujet: Re: [libvirt] Lxc support Date : Fri, 29 Oct 2010 13:13:16 +0200 De : Jean-Philippe Menil jean-philippe.me...@univ-nantes.fr Répondre à : jean-philippe.me...@univ-nantes.fr Organisation : IRTS - DSI - Université de Nantes Pour : Daniel P. Berrange berra

Re: [libvirt] [PATCH] desactivate lxc and qemu support on non-linux systems

2010-04-27 Thread Daniel Veillard
On Mon, Apr 26, 2010 at 08:44:29PM +0200, Matthias Bolte wrote: 2010/4/26 Eric Blake ebl...@redhat.com: On 04/26/2010 07:41 AM, Daniel Veillard wrote:   note that with_qemu is set to yes by default Daniel diff --git a/configure.ac b/configure.ac index 99bc906..d360b4e 100644 ---

Re: [libvirt] [PATCH] desactivate lxc and qemu support on non-linux systems

2010-04-26 Thread Eric Blake
On 04/26/2010 07:41 AM, Daniel Veillard wrote: note that with_qemu is set to yes by default Daniel diff --git a/configure.ac b/configure.ac index 99bc906..d360b4e 100644 --- a/configure.ac +++ b/configure.ac @@ -205,6 +205,18 @@ if test $prefix = /usr test $sysconfdir =

Re: [libvirt] [PATCH] desactivate lxc and qemu support on non-linux systems

2010-04-26 Thread Matthias Bolte
2010/4/26 Eric Blake ebl...@redhat.com: On 04/26/2010 07:41 AM, Daniel Veillard wrote:   note that with_qemu is set to yes by default Daniel diff --git a/configure.ac b/configure.ac index 99bc906..d360b4e 100644 --- a/configure.ac +++ b/configure.ac @@ -205,6 +205,18 @@ if test $prefix

Re: [libvirt] Bringing up LXC container from virsh command prompt.

2010-03-04 Thread Daniel P. Berrange
On Thu, Mar 04, 2010 at 11:54:18AM +0530, Kumar L Srikanth-B22348 wrote: Hi, I am new to libvirt virsh console. Currently I am working on Linux Containers(LXC). After lot of exploration, I am able to create a Linux Container(fedora12) with the help of lxc-tools(lxc-create, lxc-start,

Re: [libvirt] Bringing up LXC container from virsh command prompt.

2010-03-04 Thread Kumar L Srikanth-B22348
Hi Daniel, I am able to get the 'ifconfig' details in any one of the following 2 cases: 1. If I execute '/sbin/ifconfig' 2. If I include '/sbin' in the PATH environment variable. But, the result of ifconfig is showing all the IP's available in the host machine (The same result when I execute

Re: [libvirt] Bringing up LXC container from virsh command prompt.

2010-03-04 Thread Daniel P. Berrange
On Thu, Mar 04, 2010 at 03:25:18PM +0530, Kumar L Srikanth-B22348 wrote: Hi Daniel, I am able to get the 'ifconfig' details in any one of the following 2 cases: 1. If I execute '/sbin/ifconfig' 2. If I include '/sbin' in the PATH environment variable. But, the result of ifconfig is showing

Re: [libvirt] Bringing up LXC container from virsh command prompt.

2010-03-04 Thread Kumar L Srikanth-B22348
So, again I need to add one network interface in the libvirt XML?. It will not take the interface which was created earlier while creating container using lxc-tools?. But, in the container which was created with lxc-tools(lxc-create, lxc-start ..etc), I am not getting any such issues. Why I am

Re: [libvirt] Bringing up LXC container from virsh command prompt.

2010-03-04 Thread Daniel P. Berrange
On Thu, Mar 04, 2010 at 03:38:43PM +0530, Kumar L Srikanth-B22348 wrote: So, again I need to add one network interface in the libvirt XML?. It will not take the interface which was created earlier while creating container using lxc-tools?. But, in the container which was created with

Re: [libvirt] Bringing up LXC container from virsh command prompt.

2010-03-04 Thread Kumar L Srikanth-B22348
Hi, I want to create eth0 network interface in the container, which is linked to br0 bridge in the host machine. For that, I have created a bridge 'br0' with the IP '172.16.1.10'. Now, I want to create a network interface eth0 in the container with the IP '172.16.1.17'. I created the following

[libvirt] Bringing up LXC container from virsh command prompt.

2010-03-03 Thread Kumar L Srikanth-B22348
Hi, I am new to libvirt virsh console. Currently I am working on Linux Containers(LXC). After lot of exploration, I am able to create a Linux Container(fedora12) with the help of lxc-tools(lxc-create, lxc-start, ...etc). I am able to start that container and use it's console. I am able to assign

[libvirt] and for LXC?

2010-03-01 Thread Mihamina Rakotomandimby
Manao ahoana, Hello, Bonjour, Is there some plan/schedule to make libvirt LXC friendly? Or is it already? Misaotra, Thanks, Merci. -- Architecte Informatique chez Blueline/Gulfsat: Administration Systeme, Recherche Developpement +261 34 29 155 34 / +261 33 11 207 36

Re: [libvirt] and for LXC?

2010-03-01 Thread Daniel Veillard
On Mon, Mar 01, 2010 at 04:14:34PM +0300, Mihamina Rakotomandimby wrote: Manao ahoana, Hello, Bonjour, Is there some plan/schedule to make libvirt LXC friendly? Or is it already? http://libvirt.org/ livirt supports: The LXC Linux container system http://libvirt.org/drvlxc.html

[libvirt] FW: Regarding lxc driver for libvirt.

2010-02-05 Thread Kumar L Srikanth-B22348
Can anyone help in the below issue? Regards, Srikanth. -Original Message- From: Kumar L Srikanth-B22348 Sent: Friday, February 05, 2010 4:02 PM To: 'libvir-list@redhat.com' Subject: Regarding lxc driver for libvirt. Hi, I am new to libvirt. I want to create a Domain using libvirt XML

<    1   2   3   >