hiii Canhua,<div><br></div><div><div> lxc-start -n vm2</div><div><br></div><div>/usr/lib/lxc/lxc-init is /usr/lib/lxc/lxc-init</div><div>sshd is /usr/sbin/sshd</div><div>Could not load host key: /etc/ssh/ssh_host_rsa_key</div>
<div>Could not load host key: /etc/ssh/ssh_host_dsa_key</div><div><br></div><div>And contents of /etc/ssh are::</div><div><br></div><div><div>ls /etc/ssh/</div><div>moduli      sshd_config       ssh_host_dsa_key.pub  ssh_host_rsa_key.pub</div>
<div>ssh_config  ssh_host_dsa_key  ssh_host_rsa_key</div></div><div><br></div><div><br></div><div>What is problem this time ?????</div><div><br></div><div>Regards,</div><div>Nishant.</div><div><br></div><br><div class="gmail_quote">
On Thu, Aug 25, 2011 at 1:26 PM, 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;">
hi, You may start container just like this:<br>
   lxc-start -n vm2<br>
without  -f ...<br>
<div><div></div><div class="h5"><br>
On Thu, Aug 25, 2011 at 3:09 PM, nishant mungse <<a href="mailto:nishantmungse@gmail.com">nishantmungse@gmail.com</a>> wrote:<br>
> hiii<br>
> thnks Canhua.<br>
> But still there is a problem<br>
> Here are thing i did<br>
> 1) lxc-create -n vm2 -f /home/nishant/vm2/lxc-macvlan.conf -t sshd<br>
> Generating public/private rsa key pair.<br>
> Enter passphrase (empty for no passphrase):<br>
> Enter same passphrase again:<br>
> Your identification has been saved in<br>
> /var/lib/lxc/vm2/rootfs/etc/ssh/ssh_host_rsa_key.<br>
> Your public key has been saved in<br>
> /var/lib/lxc/vm2/rootfs/etc/ssh/ssh_host_rsa_key.pub.<br>
> The key fingerprint is:<br>
> 28:b5:ba:f9:ab:48:c2:7f:e0:3e:a2:f8:8f:c8:7b:3e root@ubuntu<br>
> The key's randomart image is:<br>
> +--[ RSA 2048]----+<br>
> |                 |<br>
> |                 |<br>
> |      .          |<br>
> |     . o         |<br>
> |    . o S        |<br>
> |.  . o           |<br>
> |..o o            |<br>
> |o=.E +           |<br>
> |=+X=Ooo.         |<br>
> +-----------------+<br>
> Generating public/private dsa key pair.<br>
> Enter passphrase (empty for no passphrase):<br>
> Enter same passphrase again:<br>
> Your identification has been saved in<br>
> /var/lib/lxc/vm2/rootfs/etc/ssh/ssh_host_dsa_key.<br>
> Your public key has been saved in<br>
> /var/lib/lxc/vm2/rootfs/etc/ssh/ssh_host_dsa_key.pub.<br>
> The key fingerprint is:<br>
> b6:c6:1b:ad:77:ab:4e:6e:f9:cd:c2:6d:af:d7:d4:f8 root@ubuntu<br>
> The key's randomart image is:<br>
> +--[ DSA 1024]----+<br>
> |                 |<br>
> |                 |<br>
> |                 |<br>
> |                 |<br>
> |        S      ..|<br>
> |       o o    . o|<br>
> |        = oo . o.|<br>
> |       . *+ +oo E|<br>
> |        o+++o+++.|<br>
> +-----------------+<br>
> 'sshd' template installed<br>
> 'vm2' created<br>
> 2) When i did<br>
> lxc-start -n vm2 -f /home/nishant/vm2//lxc-macvlan.conf /bin/bash<br>
>  After this command the terminal hangs....<br>
> 3)lxc-ls<br>
>    vm2<br>
> 4)lxc-info -n vm2<br>
> vm2 is stopped<br>
> am i right in executing command or is there something i m missing in<br>
> executing......<br>
> Plz help me.<br>
> The only change i did is copied conf file to loc /home/nishant/vm2 and<br>
> changed lxc.rootfs=/home/nishant/vm2 and changed the lxc.utsname = vm2.<br>
> Do i need to make some changes in /etc/fstab and creating control groups.<br>
><br>
><br>
><br>
><br>
> Regards,<br>
> Nishant.<br>
><br>
> On Thu, Aug 25, 2011 at 5:36 AM, Canhua <<a href="mailto:dreameration@gmail.com">dreameration@gmail.com</a>> wrote:<br>
>><br>
>> You may have missed to lxc-create the container. You shoulld run:<br>
>>   lxc-create -n [container-name] -f [/path/to/config-file] -t<br>
>> [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>
>> <<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<br>
>> > 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<br>
>> > 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<br>
>> >> <<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<br>
>> >> > 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<br>
>> >> > 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>
>> >> > ------------------------------------------------------------------------------<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>
><br>
><br>
</div></div></blockquote></div><br></div>