Re: [libvirt-users] LXC configuration for Systemd in the user namespace.

2014-01-23 Thread Gao feng
On 01/20/2014 04:49 PM, Jan Olszak wrote: > Hi there! > > Does anyone have a config file for libvirt-LXC, that makes it possible to: > > 1. Use all namespaces (user namespace in particular) > This is always supported by libvirt lxc. > 2. Run systemd inside a container. > I guess

Re: [libvirt-users] assign static external IP to container

2013-12-20 Thread Gao feng
On 12/20/2013 04:04 PM, Laine Stump wrote: > On 12/16/2013 04:47 AM, Gao feng wrote: >> On 12/14/2013 10:51 AM, scar wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA256 >>> >>> Gao feng @ 12/12/2013 10:18 PM: >>>> I saw there are

Re: [libvirt-users] fuse in libivrt-lxc

2013-12-18 Thread Gao feng
On 12/19/2013 05:16 AM, Eldar Yusupov wrote: > Hi, > > I created an LXC domain via libvirt (on Fedora 20), but when I'm trying to > mount a FUSE filesystem, like sshfs, I'm getting a following error: > > $ sshfs 172.30.15.2:/ / > fuse: device not found, try 'modprobe fuse' first > > I see that

Re: [libvirt-users] assign static external IP to container

2013-12-15 Thread Gao feng
On 12/14/2013 10:51 AM, scar wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Gao feng @ 12/12/2013 10:18 PM: >> I saw there are two bridge br0 and virbr0 in your host. which >> bridge the libvirt uses? what's result of #virsh net-list ? > > we

Re: [libvirt-users] assign static external IP to container

2013-12-12 Thread Gao feng
On 12/13/2013 01:18 PM, Gao feng wrote: > On 12/13/2013 12:33 PM, scar wrote: >> Gao feng @ 12/11/2013 01:49 AM: >>> I have a machine running libvirt lxc, >>> on this machine(host), the network configure looks like this >>> eth0 is the physical nic, virbr0 is t

Re: [libvirt-users] assign static external IP to container

2013-12-12 Thread Gao feng
On 12/13/2013 12:33 PM, scar wrote: > Gao feng @ 12/11/2013 01:49 AM: >> I have a machine running libvirt lxc, >> on this machine(host), the network configure looks like this >> eth0 is the physical nic, virbr0 is the bridge libvirt created, and vnet0 >> is the veth dev

Re: [libvirt-users] assign static external IP to container

2013-12-11 Thread Gao feng
On 12/09/2013 05:14 AM, scar wrote: > hello i have a server colocated in a datacenter with several external IP > addresses available to use. the physical server is using one of these > IPs, and i want to assign another, unused IP to the virtual machine. i > thought i could just do this by editing

Re: [libvirt-users] Question about setns recognising in libvirt autoconf

2013-12-08 Thread Gao feng
p anyway. > > On 2013-12-09 13:22 , hzguanqi...@corp.netease.com > <mailto:hzguanqi...@corp.netease.com> wrote: > > On 2013-12-09 13:18 , Gao feng <mailto:gaof...@cn.fujitsu.com> wrote: > > On 12/09/2013 01:06 PM, hzguanqi...@corp.netease.com wrote:

Re: [libvirt-users] Question about setns recognising in libvirt autoconf

2013-12-08 Thread Gao feng
On 12/09/2013 01:06 PM, hzguanqi...@corp.netease.com wrote: > Hi experts, > > When I test lxc container with lxc-enter-namespace command, It reported an > error as > following: > root@debian:~/github/libvirt# vir lxc-enter-namespace lxc --noseclabel > /bin/df -hl > error: Cannot get namespaces

Re: [libvirt-users] Help with Vrbr0

2013-11-24 Thread Gao feng
On 11/22/2013 06:52 PM, Sherin A wrote: > On Friday 22 November 2013 04:19 PM, Sherin A wrote: >> On Friday 22 November 2013 01:33 PM, Sherin A wrote: >>> On Friday 22 November 2013 01:24 PM, Gao feng wrote: >>>> On 11/22/2013 03:47 PM, Sherin A wrote: >>>&

Re: [libvirt-users] Problem about lxc-enter-namespace interface

2013-11-14 Thread Gao feng
On 11/14/2013 05:40 PM, hzguanqi...@corp.netease.com wrote: > On 2013-11-14 16:40 , Gao feng <mailto:gaof...@cn.fujitsu.com> wrote: > > On 11/14/2013 03:09 PM, hzguanqi...@corp.netease.com wrote: > > On 2013-11-14 15:03 , Gao feng <mailto:gaof.

Re: [libvirt-users] Problem about lxc-enter-namespace interface

2013-11-14 Thread Gao feng
On 11/14/2013 03:09 PM, hzguanqi...@corp.netease.com wrote: > On 2013-11-14 15:03 , Gao feng <mailto:gaof...@cn.fujitsu.com> wrote: > > On 11/14/2013 02:57 PM, hzguanqi...@corp.netease.com wrote: > > On 2013-11-14 14:17 , Gao feng <mailto:gaof.

Re: [libvirt-users] Problem about lxc-enter-namespace interface

2013-11-13 Thread Gao feng
On 11/14/2013 02:57 PM, hzguanqi...@corp.netease.com wrote: > On 2013-11-14 14:17 , Gao feng <mailto:gaof...@cn.fujitsu.com> wrote: > > On 11/14/2013 01:52 PM, hzguanqi...@corp.netease.com wrote: > > On 2013-11-14 13:41 , Gao feng <mailto:gaof.

Re: [libvirt-users] Problem about lxc-enter-namespace interface

2013-11-13 Thread Gao feng
On 11/14/2013 01:52 PM, hzguanqi...@corp.netease.com wrote: > On 2013-11-14 13:41 , Gao feng <mailto:gaof...@cn.fujitsu.com> wrote: > > On 11/14/2013 01:24 PM, Gao feng wrote: > > On 11/14/2013 10:59 AM, hzguanqi...@corp.netease.com wrote: > >> Hi expe

Re: [libvirt-users] Problem about lxc-enter-namespace interface

2013-11-13 Thread Gao feng
On 11/14/2013 01:24 PM, Gao feng wrote: > On 11/14/2013 10:59 AM, hzguanqi...@corp.netease.com wrote: >> Hi experts, >> >> When I test lxc-enter-namespace interface, it turned out such an error: >> >> hzguanqiang@debian:~$ <mailto:hzguanqiang@debian:~$>

Re: [libvirt-users] Problem about lxc-enter-namespace interface

2013-11-13 Thread Gao feng
On 11/14/2013 10:59 AM, hzguanqi...@corp.netease.com wrote: > Hi experts, > > When I test lxc-enter-namespace interface, it turned out such an error: > > hzguanqiang@debian:~$ vir version > Compiled against library: libvirt 1.1.4 > Using library: libvirt 1.1.4 > U

Re: [libvirt-users] User Namespace in LXC

2013-11-12 Thread Gao feng
Hi Saurabh, First of all. I think there are something wrong in you container configure file the should under . such as xxx 102400 102400 1 /machine exe /bin/sh destroy restart destroy If your system doesn't suppo

Re: [libvirt-users] User Namespace in LXC

2013-11-11 Thread Gao feng
On 11/11/2013 05:52 PM, Saurabh Deochake wrote: > Hi Gao, > > I appreciate your quick reply. > >>you can try create a file in container, and on host, the owner of this file >>is uid=1000. >>and on the other side, if a file's owner is uid 1000 on host. in this >>container, you will >>see the own

Re: [libvirt-users] User Namespace in LXC

2013-11-11 Thread Gao feng
On 11/11/2013 05:15 PM, Saurabh Deochake wrote: > Hi all, > > I'm trying to restrict privileges of root user inside the container. I > searched about it and got to know about "idmap" element in domain XML. > > I added "idmap" element in my container's XML file: > > > > > > > I re

Re: [libvirt-users] libvirt-1.2.2-r1 (Gentoo) fails to start LXC containers

2013-09-11 Thread Gao feng
On 09/11/2013 04:44 PM, Daniel P. Berrange wrote: > On Tue, Sep 10, 2013 at 09:09:44AM -0500, Dennis Jenkins wrote: >> I recently upgraded "libvirt" on Gentoo to 1.2.2-r1 (latest available). I >> have not used LXC containers for a few weeks, so I don't recall what >> version of libvirt I was using

Re: [libvirt-users] Problems with user namespaces

2013-09-09 Thread Gao feng
On 09/09/2013 10:26 PM, Jaka Hudoklin wrote: > It seems to be working now, what I needed was libvirt built with libcap > support and also securityfs patch. Thanks! good news, I guess you haven't fully enabled the debug message. You should modify your lxc.conf and set log_with_libvirtd = 1 too.

Re: [libvirt-users] Problems with user namespaces

2013-09-08 Thread Gao feng
On 09/06/2013 07:32 PM, Jaka Hudoklin wrote: > Hello! > > Okay i tried again with only staticly linked busybox: > offlinehacker:~/ $ /home/offlinehacker/busybox/busybox > BusyBox v1.17.1 (Debian 1:1.17.1-8) multi-call binary. > Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko > a

Re: [libvirt-users] Problems with user namespaces

2013-09-05 Thread Gao feng
On 09/06/2013 03:15 AM, Jaka Hudoklin wrote: > Hello! > > I'm testing user namespaces and I have quite some problem getting them to > work. > > First of all, I have user namespaces support enabled in kernel: > > offlinehacker:~/ $ uname -r > 3.10.10 > offlinehacker:~/ $ ls /proc/self/ns/ > ipc@

Re: [libvirt-users] No valid cgroup for machine...

2013-09-04 Thread Gao feng
On 09/04/2013 07:05 AM, Jaka Hudoklin wrote: > Hello! > > How do i get pass this error? > > offlinehacker:~/ $ virsh --debug 0 -c lxc:/// create o1.xml > > create: file(optdata): o1.xml > error: Failed to create domain from o1.xml > error: internal error: No valid cgroup for machine c1 > Can y

Re: [libvirt-users] error: virDBusCallMethod

2013-09-03 Thread Gao feng
On 09/03/2013 04:36 PM, Thomas Stein wrote: > Hello. > > Since upgrading to libvirt-1.1.2 i get this error: > > 2013-09-03 08:29:55.258+: 2281: error : virDBusCallMethod:1156 : The name > org.freedesktop.machine1 was not provided by any .service files You should update systemd to the versio

Re: [libvirt-users] ?????? How to deal with LXC cgroup access control withapparmor ?

2013-08-26 Thread Gao feng
On 08/26/2013 04:36 PM, jj wrote: > thx, Gao feng, > If I do not want to disable the cgroup in container , is there any config > file ? or do i have to do something to the libvirt source code > to skip it ? > > Sorry, I don't quite understand what's your re

Re: [libvirt-users] How to deal with LXC cgroup access control with apparmor ?

2013-08-26 Thread Gao feng
On 08/26/2013 03:42 PM, 止语 wrote: > I am playing with libvirt 1.1.1 (lxc) > when I was starting a LXC container, the process location of cgroup is > pretty , just the root directory > from the process. But I could tune the cgroup in a container as an user that > logged, This is not accepted...

Re: [libvirt-users] Is there any virsh command to setup cpusettune for lxc?

2013-08-07 Thread Gao feng
On 08/07/2013 06:09 PM, Gao feng wrote: > Hi Guan Qiang, > On 08/07/2013 05:04 PM, hzguanqi...@corp.netease.com wrote: >> Hi Gao feng, >> >> I noticed one of your patch which adds cpuset cgroup support for lxc have >> been merged in libvirt 1.0.4. >> But I

Re: [libvirt-users] Is there any virsh command to setup cpusettune for lxc?

2013-08-07 Thread Gao feng
Hi Guan Qiang, On 08/07/2013 05:04 PM, hzguanqi...@corp.netease.com wrote: > Hi Gao feng, > > I noticed one of your patch which adds cpuset cgroup support for lxc have > been merged in libvirt 1.0.4. > But I can't find any virsh command to set cpusettune for lxc containe

Re: [libvirt-users] How to monitor a lxc container started by libvirt_lxc from inside ?

2013-07-23 Thread Gao feng
On 07/24/2013 10:28 AM, hzguanqiang wrote: > On 2013-07-23 18:14, "Daniel P. Berrange" wrote: > >>> On Tue, Jul 23, 2013 at 04:56:30PM +0800, hzguanqiang wrote: >>> Hi Guys, >>> When I created a lxc container by libvirt, I logged into the lxc >>> container and noticed that info under /proc/ dir d

Re: [libvirt-users] How to monitor a lxc container started by libvirt_lxc from inside ?

2013-07-23 Thread Gao feng
On 07/24/2013 10:28 AM, hzguanqiang wrote: > On 2013-07-23 18:14, "Daniel P. Berrange" wrote: > >>> On Tue, Jul 23, 2013 at 04:56:30PM +0800, hzguanqiang wrote: >>> Hi Guys, >>> When I created a lxc container by libvirt, I logged into the lxc >>> container and noticed that info under /proc/ dir d

Re: [libvirt-users] Hotplug of disk devices in LXC failed with libvirt of version 1.0.2

2013-07-17 Thread Gao feng
On 07/17/2013 04:15 PM, Gao feng wrote: > On 07/16/2013 01:29 PM, Guan Qiang wrote: >> 于 2013/7/15 17:32, Gao feng 写道: >>> On 07/15/2013 05:18 PM, hzguanqiang wrote: >>>> Hi, Gao Feng >>>> >>>> I've tried what you said, but still exists th

Re: [libvirt-users] Hotplug of disk devices in LXC failed with libvirt of version 1.0.2

2013-07-17 Thread Gao feng
On 07/16/2013 01:29 PM, Guan Qiang wrote: > 于 2013/7/15 17:32, Gao feng 写道: >> On 07/15/2013 05:18 PM, hzguanqiang wrote: >>> Hi, Gao Feng >>> >>> I've tried what you said, but still exists the problem: >>> >>> ubuntu@lxc:~$ vir attach-

Re: [libvirt-users] Hotplug of disk devices in LXC failed with libvirt of version 1.0.2

2013-07-15 Thread Gao feng
On 07/15/2013 05:18 PM, hzguanqiang wrote: > Hi, Gao Feng > > I've tried what you said, but still exists the problem: > > ubuntu@lxc:~$ vir attach-disk instance-002c /dev/dm-0 sdb > error: Failed to attach disk > error: Unable to create device /proc/10366/root/

Re: [libvirt-users] Hotplug of disk devices in LXC failed with libvirt of version 1.0.2

2013-07-15 Thread Gao feng
On 07/15/2013 04:01 PM, hzguanqiang wrote: > Hi Daniel, > > I noticed that the patch "Add support for hotplug/unplug of disk devices in > LXC" you wrote had been merged into libvirt of version 1.0.2. > But when I used this function, it report an error with details as following: > > ubuntu@lxc:~$

[libvirt-users] [PATCH 2/2] LXC: hostdev: parent directroy for hostdev atomically

2013-07-08 Thread Gao feng
Create parent directroy for hostdev atomically when we start a lxc domain or attach a hostdev to a lxc domain. Signed-off-by: Gao feng --- src/lxc/lxc_container.c | 42 -- src/lxc/lxc_driver.c| 14 ++ 2 files changed, 42 insertions(+), 14

[libvirt-users] [PATCH 1/2] LXC: hostdev: introduce lxcContainerSetupHostdevCapsMakePath

2013-07-08 Thread Gao feng
This helper function is used to create parent directroy for the hostdev which will be added to the container. if the parent directory of this hostdev doesn't exist, the mknod of the hostdev will fail. Signed-off-by: Gao feng --- src/lxc/lxc_container.c | 17 + sr

Re: [libvirt-users] Permission problem with /dev/net/tun

2013-07-08 Thread Gao feng
On 07/09/2013 05:51 AM, Thomas Karcher wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi Daniel, > > On 07/08/2013 11:41 AM, Daniel P. Berrange wrote: >>> the symptom my libvirt LXC container suffers from is: >>> root@depot:/dev/net# ls -la total 0 drwxr-xr-x 2 root root 40 >>> Ju

Re: [libvirt-users] libvirt_lxc and sysfs

2013-06-09 Thread Gao feng
On 06/10/2013 01:41 PM, pr.G wrote: > On Mon, Jun 10, 2013 at 09:29:32AM +0400, свящ. Георгий Гольцов wrote: >> On Mon, Jun 10, 2013 at 09:07:08AM +0800, Gao feng wrote: >>> On 06/09/2013 08:14 PM, pr.G wrote: >>>> Hello. >>>> >>>> Is it possib

Re: [libvirt-users] libvirt_lxc and sysfs

2013-06-09 Thread Gao feng
On 06/09/2013 08:14 PM, pr.G wrote: > Hello. > > Is it possible to start container via libvirt_lxc without mounting /sys > inside container? > > When I start container via lxc-start and do not add mount point to config, > then /sys inside container is empty. > > When I do it via virsh -c lxc://

Re: [libvirt-users] How to give access to /dev/tty

2013-04-02 Thread Gao feng
On 2013/04/02 17:38, Guillaume Thouvenin wrote: > Javi Legido a écrit : > >> I'm sure that if ou give 5 cents of exactly what do you want to achieve >> somebody can provide a solution: connect from the hypervisor to the VM >> through console? Administer the VM through a GUI? ... > > Hi Javi, >

Re: [libvirt-users] libvirt v1.0.2 fails to boot LXC container, but v1.0.0 works

2013-03-05 Thread Gao feng
On 2013/03/06 06:13, Dennis Jenkins wrote: > On Mon, Feb 11, 2013 at 3:57 AM, Michal Privoznik wrote: >> On 08.02.2013 21:46, Dennis Jenkins wrote: >>> On Fri, Feb 8, 2013 at 12:38 PM, Dennis Jenkins >>> wrote: Hello. tl;dr = v1.0.0 can boot my LXC containers, v.1.0.1 and v.1.0.2 f