I have been struggling with LXC libvirt driver. I created LXC container fs from "yum install" with install root option.<div><br></div><div>After that edited few files and created special nodes</div><div><br></div>
<div><div>rm -f /dev/null</div><div>mknod -m 666 /dev/null c 1 3</div><div>mknod -m 666 /dev/zero c 1 5</div><div>mknod -m 666 /dev/urandom c 1 9</div><div>ln -s /dev/urandom /dev/random</div><div>mknod -m 600 /dev/console c 5 1</div>
<div>mknod -m 660 /dev/tty1 c 4 1</div><div>chown root:tty /dev/tty1</div><div>mkdir -p /dev/shm</div><div>chmod 1777 /dev/shm</div><div>mkdir -p /dev/pts</div><div>chmod 755 /dev/pts</div><div><br></div><div>basically all instructions from here</div>
<div><br></div><div><a href="http://wiki.1tux.org/wiki/Centos6/Installation/Minimal_installation_using_yum">http://wiki.1tux.org/wiki/Centos6/Installation/Minimal_installation_using_yum</a></div><div><br></div><div>My configuration looks like this</div>
<div><div><domain type='lxc'></div><div>  <name>c03</name></div><div>  <memory unit="G">4</memory></div><div>  <os></div><div>    <type>exe</type></div><div>
    <init>/sbin/init</init></div><div>  </os></div><div>  <vcpu>1</vcpu></div><div>  <clock offset='utc'/></div><div>  <on_poweroff>destroy</on_poweroff></div><div>  <on_reboot>restart</on_reboot></div>
<div>  <on_crash>destroy</on_crash></div><div>  <devices></div><div>    <emulator>/srv/libvirt-1.0.0/src/libvirt_lxc</emulator></div><div>    <filesystem type='mount'></div><div>
      <source dir='/srv/guest/c03'/></div><div>      <target dir='/'/></div><div>    </filesystem></div><div>    <interface type='network'></div><div>        <mac address='52:54:00:00:00:01'/></div>
<div>        <source network='default'/></div><div>        <target dev='vnic-c03'/></div><div>        <model type='virtio'/></div><div>     </interface></div><div><br></div>
<div>   <console type='pty' /></div><div>  </devices></div><div></domain></div></div><div><br></div><div>I compiled libvirt from source. MY container comes up fine but I get </div><div><br></div>
<div>init: tty (/dev/tty1) main process ended, respawning</div><div>init: tty (console) respawning too fast, stopped</div><div><br></div><div>also, I can't login as root, because it say /dev/pts/0 is not safe, but if I add a normal user with chroot and then I login, it works perfectly.</div>
<div><br></div><div>So in this case, after init stops everything, I can't get rc.local to execute and in turn can't get ip address and other configurations up and running.</div><div><br></div><div>help?</div><div>
<br></div>-- <br><font face="trebuchet ms, sans-serif">Thanks</font><div><font face="trebuchet ms, sans-serif"><br></font></div><div><font face="trebuchet ms, sans-serif">Ajey</font></div><div><br></div><br>
</div>