<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Am Samstag, 16. Juni 2012, 00:01:53 schrieb Ramez Hanna:<br /></p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Fri, Jun 15, 2012 at 5:50 PM, Fajar A. Nugraha <<a href="mailto:list@fajar.net"><span style=" text-decoration: underline; color:#0057ae;">list@fajar.net</span></a>> wrote:<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:44px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Fri, Jun 15, 2012 at 7:26 PM, John Maclean <<a href="mailto:jayeola@gmail.com"><span style=" text-decoration: underline; color:#0057ae;">jayeola@gmail.com</span></a>> wrote:<br />> Hello all,<br />><br />> I have built lxc from the git hub repo and have been able to create<br />> containers using the stock templates for fedora. However, whenever I<br />> start a container it always locks the hosts, X session.<br />><br />> a - How can i diagnose this?<br />> b - How can i prevent this?<br /><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">The easy way would be just to use ubuntu precise for your host. Seriously :)<br /><br />The hard way, I think your guest is accessing your hosts's tty. You<br />can probably prevent that by something like this on your guests'<br />config file:<br /><br />#==========<br />lxc.cgroup.devices.deny = a<br /># Allow any mknod (but not using the node)<br />lxc.cgroup.devices.allow = c *:* m<br />lxc.cgroup.devices.allow = b *:* m<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 />#fuse<br />lxc.cgroup.devices.allow = c 10:229 rwm<br />#tun<br />lxc.cgroup.devices.allow = c 10:200 rwm<br />#full<br />lxc.cgroup.devices.allow = c 1:7 rwm<br />#hpet<br />lxc.cgroup.devices.allow = c 10:228 rwm<br />#kvm<br />lxc.cgroup.devices.allow = c 10:232 rwm<br />#==================<br /><span style=" color:#888888;"><br />--<br />Fajar<br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:44px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br />------------------------------------------------------------------------------<br />Live Security Virtual Conference<br />Exclusive live event will cover all the ways today's security and<br />threat landscape has changed and how IT managers can respond. Discussions<br />will include endpoint security, mobile security and the latest in malware<br />threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/"><span style=" text-decoration: underline; color:#0057ae;">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</span></a><br />_______________________________________________<br />Lxc-users mailing list<br /><a href="mailto:Lxc-users@lists.sourceforge.net"><span style=" text-decoration: underline; color:#0057ae;">Lxc-users@lists.sourceforge.net</span></a><br /><a href="https://lists.sourceforge.net/lists/listinfo/lxc-users"><span style=" text-decoration: underline; color:#0057ae;">https://lists.sourceforge.net/lists/listinfo/lxc-users</span></a><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">here is what i do<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">i always start the container form a terminalnot frommy x session</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">i also use the following script to start the container this fixes all problem</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">====</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"># cat /home/rhanna/bin/lxc-start-fedora <br />#! /bin/bash<br />options=$(getopt -o n: -l name: -- "$@")<br />eval set -- "$options"<br />while true<br />do<br />case "$1" in<br />-n|--name) name=$2; shift 2;;<br />--) shift<br />break;;<br />*) break ;;<br />esac<br />done<br /><br />if [ -z $name ]; then<br />echo "container name must be set, use -n|--name"<br />exit 1<br />fi<br />lxc-ls |grep $name >/dev/null 2>&1<br />if [ $? -ne 0 ]; then <br />echo "Container does not exist"<br />exit 1<br />fi<br />lxc-info -s -n$name|grep RUNNING >/dev/null 2>&1<br />if [ $? -eq 0 ]; then<br />echo "container already started"<br />exit 1<br />fi<br />mount |grep /tmp/lxc/$name > /dev/null 2>&1<br />if [ $? -eq 0 ]; then <br />umount /tmp/lxc/$name<br />fi<br />rm -rf /tmp/lxc/$name<br />mkdir -p /tmp/lxc/$name<br />mount none /tmp/lxc/$name -t tmpfs<br />rsync -a /var/lib/lxc/$name/rootfs/dev/ /tmp/lxc/$name<br />mount /tmp/lxc/$name /var/lib/lxc/$name/rootfs/dev/ -obind<br />lxc-start $* -n $name<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">=====-- <br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">BR<br />RH<br /><a href="http://informatiq.org"><span style=" text-decoration: underline; color:#0057ae;">http://informatiq.org</span></a><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">If you start the container in a screen you can work around this.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">/usr/bin/screen -dmS init-${container} /usr/bin/lxc-start -n ${container} -f /etc/lxc/${container}.conf</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">With best regards Joerg</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">                   </p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">          <br /><br /></p></body></html>