hiii<div><br></div><div>thnks Canhua.</div><div>But still there is a problem  </div><div>Here are thing i did</div><div><br></div><div><div>1) lxc-create -n vm2 -f /home/nishant/vm2/lxc-macvlan.conf -t sshd</div><div><br></div>
<div>Generating public/private rsa key pair.</div><div>Enter passphrase (empty for no passphrase): </div><div>Enter same passphrase again: </div><div>Your identification has been saved in /var/lib/lxc/vm2/rootfs/etc/ssh/ssh_host_rsa_key.</div>
<div>Your public key has been saved in /var/lib/lxc/vm2/rootfs/etc/ssh/ssh_host_rsa_key.pub.</div><div>The key fingerprint is:</div><div>28:b5:ba:f9:ab:48:c2:7f:e0:3e:a2:f8:8f:c8:7b:3e root@ubuntu</div><div>The key's randomart image is:</div>
<div>+--[ RSA 2048]----+</div><div>|                 |</div><div>|                 |</div><div>|      .          |</div><div>|     . o         |</div><div>|    . o S        |</div><div>|.  . o           |</div><div>|..o o            |</div>
<div>|o=.E +           |</div><div>|=+X=Ooo.         |</div><div>+-----------------+</div><div>Generating public/private dsa key pair.</div><div>Enter passphrase (empty for no passphrase): </div><div>Enter same passphrase again: </div>
<div>Your identification has been saved in /var/lib/lxc/vm2/rootfs/etc/ssh/ssh_host_dsa_key.</div><div>Your public key has been saved in /var/lib/lxc/vm2/rootfs/etc/ssh/ssh_host_dsa_key.pub.</div><div>The key fingerprint is:</div>
<div>b6:c6:1b:ad:77:ab:4e:6e:f9:cd:c2:6d:af:d7:d4:f8 root@ubuntu</div><div>The key's randomart image is:</div><div>+--[ DSA 1024]----+</div><div>|                 |</div><div>|                 |</div><div>|                 |</div>
<div>|                 |</div><div>|        S      ..|</div><div>|       o o    . o|</div><div>|        = oo . o.|</div><div>|       . *+ +oo E|</div><div>|        o+++o+++.|</div><div>+-----------------+</div><div>'sshd' template installed</div>
<div>'vm2' created</div></div><div><br></div><div>2) When i did </div><div>lxc-start -n vm2 -f /home/nishant/vm2//lxc-macvlan.conf /bin/bash</div><div> After this command the terminal hangs....</div><div><br></div>
<div>3)lxc-ls</div><div>   vm2</div><div><br></div><div>4)lxc-info -n vm2</div><div>vm2 is stopped</div><div><br></div><div>am i right in executing command or is there something i m missing in executing......</div><div>Plz help me.</div>
<div><br></div><div>The only change i did is copied conf file to loc /home/nishant/vm2 and changed lxc.rootfs=/home/nishant/vm2 and changed the lxc.utsname = vm2.</div><div>Do i need to make some changes in /etc/fstab and creating control groups.</div>
<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Regards,</div><div>Nishant.</div><div><br><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 5:36 AM, Canhua <span dir="ltr"><<a href="mailto:dreameration@gmail.com">dreameration@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">You may have missed to lxc-create the container. You shoulld run:<br>
   lxc-create -n [container-name] -f [/path/to/config-file] -t [template-name]<br>
for example lxc-create -n vm0 -f [lxc-veth.conf] -t debian<br>
<br>
On Wed, Aug 24, 2011 at 10:17 PM, nishant mungse<br>
<div><div></div><div class="h5"><<a href="mailto:nishantmungse@gmail.com">nishantmungse@gmail.com</a>> wrote:<br>
> hello Canhua,<br>
> I did apt-get bootstrap and installed it.<br>
> And now when i did ::<br>
> lxc-start -n vm0 [-f config file] -d<br>
> and after that i checked<br>
> lxc-info -n vm0<br>
> o/p was vm0 is stopped.<br>
> I did the same thing which is given in that site you mentioned.<br>
> Wrote all the things in config file which are given in that site but still<br>
> it is not working.<br>
> These are things i did::<br>
> 1) Copied all the contents of config path and only changed ipv4 add and hwd<br>
> address .<br>
>  Container with network virtualized using the macvlan device driver<br>
> lxc.utsname = vm0<br>
> lxc.network.type = macvlan<br>
> lxc.network.flags = up<br>
> lxc.network.link = eth0<br>
> lxc.network.hwaddr = **<br>
> lxc.network.ipv4 =  **<br>
> lxc.tty = 4<br>
> lxc.pts = 1024<br>
> lxc.rootfs = /srv/lxc/vm0/rootfs<br>
> lxc.cgroup.devices.deny = a<br>
> # /dev/null and zero<br>
> lxc.cgroup.devices.allow = c 1:3 rwm<br>
> lxc.cgroup.devices.allow = c 1:5 rwm<br>
> # consoles<br>
> lxc.cgroup.devices.allow = c 5:1 rwm<br>
> lxc.cgroup.devices.allow = c 5:0 rwm<br>
> lxc.cgroup.devices.allow = c 4:0 rwm<br>
> lxc.cgroup.devices.allow = c 4:1 rwm<br>
> # /dev/{,u}random<br>
> lxc.cgroup.devices.allow = c 1:9 rwm<br>
> lxc.cgroup.devices.allow = c 1:8 rwm<br>
> lxc.cgroup.devices.allow = c 136:* rwm<br>
> lxc.cgroup.devices.allow = c 5:2 rwm<br>
> # rtc<br>
> lxc.cgroup.devices.allow = c 254:0 rwm<br>
><br>
><br>
> 2) wrote cgroup /cgroup cgroup defaults 0 0 in /etc/fstab<br>
><br>
> 3) mount cgroup<br>
> 4)  after that i did::<br>
> lxc-start -n vm0 -f /var/lib/lxc/vm0/lxc-macvlan.conf -d<br>
> and lxc-info -n vm0 gives "vm0 is stopped"<br>
> 4) and lxc-checkconfig gave<br>
> Kernel config /proc/config.gz not found, looking in other places...<br>
> Found kernel config file /boot/config-2.6.35-22-generic<br>
> --- Namespaces ---<br>
> Namespaces: enabled<br>
> Utsname namespace: enabled<br>
> Ipc namespace: enabled<br>
> Pid namespace: enabled<br>
> User namespace: enabled<br>
> Network namespace: enabled<br>
> Multiple /dev/pts instances: enabled<br>
> --- Control groups ---<br>
> Cgroup: enabled<br>
> Cgroup namespace: enabled<br>
> Cgroup device: enabled<br>
> Cgroup sched: enabled<br>
> Cgroup cpu account: enabled<br>
> Cgroup memory controller: enabled<br>
> Cgroup cpuset: enabled<br>
> --- Misc ---<br>
> Veth pair device: enabled<br>
> Macvlan: enabled<br>
> Vlan: enabled<br>
> Note : Before booting a new kernel, you can check its configuration<br>
> usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig<br>
> Please help me out ASAP.<br>
> Regards,<br>
> Nishant.<br>
><br>
> On Wed, Aug 24, 2011 at 5:25 PM, Canhua <<a href="mailto:dreameration@gmail.com">dreameration@gmail.com</a>> wrote:<br>
>><br>
>> It seems you didn't bootstrap any distribution.  Please see<br>
>> <a href="http://blog.foaa.de/2010/05/lxc-on-debian-squeeze/" target="_blank">http://blog.foaa.de/2010/05/lxc-on-debian-squeeze/</a> , note especially<br>
>> the use of debootstrap<br>
>><br>
>> On Wed, Aug 24, 2011 at 5:30 PM, nishant mungse <<a href="mailto:nishantmungse@gmail.com">nishantmungse@gmail.com</a>><br>
>> wrote:<br>
>> > Hii all<br>
>> > I am using lxc for creating containers.<br>
>> >  But when i create lxc container using "lxc-create -n abc" it creates a<br>
>> > abc<br>
>> > container and when i do lxc-info -n abc its show "abc is stopped" and<br>
>> > when i<br>
>> > perform "lxc-start -n abc [-f conf file ]" the terminal hangs and if do<br>
>> > "lxc-execute -n abc [-f conf file ] \bin\bash" terminal hangs.<br>
>> > It is not even working for  "/usr/bin/lxc-execute -n foo -f<br>
>> > /usr/share/doc/lxc/examples/lxc-macvlan.conf /bin/bash".<br>
>> > I am using UBUNTU 10.10.<br>
>> > Plz help me ASAP.<br>
>> > Regards,<br>
>> > Nishant.<br>
>> ><br>
>> > ------------------------------------------------------------------------------<br>
>> > EMC VNX: the world's simplest storage, starting under $10K<br>
>> > The only unified storage solution that offers unified management<br>
>> > Up to 160% more powerful than alternatives and 25% more efficient.<br>
>> > Guaranteed. <a href="http://p.sf.net/sfu/emc-vnx-dev2dev" target="_blank">http://p.sf.net/sfu/emc-vnx-dev2dev</a><br>
>> > _______________________________________________<br>
>> > Lxc-users mailing list<br>
>> > <a href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a><br>
>> > <a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>