[Lxc-users] help regarding lxc

Canhua dreameration at gmail.com
Thu Aug 25 00:06:40 UTC 2011


You may have missed to lxc-create the container. You shoulld run:
   lxc-create -n [container-name] -f [/path/to/config-file] -t [template-name]
for example lxc-create -n vm0 -f [lxc-veth.conf] -t debian

On Wed, Aug 24, 2011 at 10:17 PM, nishant mungse
<nishantmungse at gmail.com> wrote:
> hello Canhua,
> I did apt-get bootstrap and installed it.
> And now when i did ::
> lxc-start -n vm0 [-f config file] -d
> and after that i checked
> lxc-info -n vm0
> o/p was vm0 is stopped.
> I did the same thing which is given in that site you mentioned.
> Wrote all the things in config file which are given in that site but still
> it is not working.
> These are things i did::
> 1) Copied all the contents of config path and only changed ipv4 add and hwd
> address .
>  Container with network virtualized using the macvlan device driver
> lxc.utsname = vm0
> lxc.network.type = macvlan
> lxc.network.flags = up
> lxc.network.link = eth0
> lxc.network.hwaddr = **
> lxc.network.ipv4 =  **
> lxc.tty = 4
> lxc.pts = 1024
> lxc.rootfs = /srv/lxc/vm0/rootfs
> lxc.cgroup.devices.deny = a
> # /dev/null and zero
> lxc.cgroup.devices.allow = c 1:3 rwm
> lxc.cgroup.devices.allow = c 1:5 rwm
> # consoles
> lxc.cgroup.devices.allow = c 5:1 rwm
> lxc.cgroup.devices.allow = c 5:0 rwm
> lxc.cgroup.devices.allow = c 4:0 rwm
> lxc.cgroup.devices.allow = c 4:1 rwm
> # /dev/{,u}random
> lxc.cgroup.devices.allow = c 1:9 rwm
> lxc.cgroup.devices.allow = c 1:8 rwm
> lxc.cgroup.devices.allow = c 136:* rwm
> lxc.cgroup.devices.allow = c 5:2 rwm
> # rtc
> lxc.cgroup.devices.allow = c 254:0 rwm
>
>
> 2) wrote cgroup /cgroup cgroup defaults 0 0 in /etc/fstab
>
> 3) mount cgroup
> 4)  after that i did::
> lxc-start -n vm0 -f /var/lib/lxc/vm0/lxc-macvlan.conf -d
> and lxc-info -n vm0 gives "vm0 is stopped"
> 4) and lxc-checkconfig gave
> Kernel config /proc/config.gz not found, looking in other places...
> Found kernel config file /boot/config-2.6.35-22-generic
> --- Namespaces ---
> Namespaces: enabled
> Utsname namespace: enabled
> Ipc namespace: enabled
> Pid namespace: enabled
> User namespace: enabled
> Network namespace: enabled
> Multiple /dev/pts instances: enabled
> --- Control groups ---
> Cgroup: enabled
> Cgroup namespace: enabled
> Cgroup device: enabled
> Cgroup sched: enabled
> Cgroup cpu account: enabled
> Cgroup memory controller: enabled
> Cgroup cpuset: enabled
> --- Misc ---
> Veth pair device: enabled
> Macvlan: enabled
> Vlan: enabled
> Note : Before booting a new kernel, you can check its configuration
> usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
> Please help me out ASAP.
> Regards,
> Nishant.
>
> On Wed, Aug 24, 2011 at 5:25 PM, Canhua <dreameration at gmail.com> wrote:
>>
>> It seems you didn't bootstrap any distribution.  Please see
>> http://blog.foaa.de/2010/05/lxc-on-debian-squeeze/ , note especially
>> the use of debootstrap
>>
>> On Wed, Aug 24, 2011 at 5:30 PM, nishant mungse <nishantmungse at gmail.com>
>> wrote:
>> > Hii all
>> > I am using lxc for creating containers.
>> >  But when i create lxc container using "lxc-create -n abc" it creates a
>> > abc
>> > container and when i do lxc-info -n abc its show "abc is stopped" and
>> > when i
>> > perform "lxc-start -n abc [-f conf file ]" the terminal hangs and if do
>> > "lxc-execute -n abc [-f conf file ] \bin\bash" terminal hangs.
>> > It is not even working for  "/usr/bin/lxc-execute -n foo -f
>> > /usr/share/doc/lxc/examples/lxc-macvlan.conf /bin/bash".
>> > I am using UBUNTU 10.10.
>> > Plz help me ASAP.
>> > Regards,
>> > Nishant.
>> >
>> > ------------------------------------------------------------------------------
>> > EMC VNX: the world's simplest storage, starting under $10K
>> > The only unified storage solution that offers unified management
>> > Up to 160% more powerful than alternatives and 25% more efficient.
>> > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>> > _______________________________________________
>> > Lxc-users mailing list
>> > Lxc-users at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/lxc-users
>> >
>> >
>
>




More information about the lxc-users mailing list