[Lxc-users] Can not write log, openpty() failed

Serge Hallyn serge.hallyn at canonical.com
Tue Jan 24 16:14:27 UTC 2012


Quoting christian mueller (christian.mueller7 at gmx.de):
> Hi,
> 
> i wanted to try out LXC and tried to create an LXC instance on ubuntu 11.10.
> 
> To do so I followed this guide:
> 
> http://wiki.debian.org/LXC
> 
> and finally executed:
> 
> lxc-create -n myfirstcontainer -f lxc.conf -t ubuntu -- - path=/home/chm/lxc/myfirstcontainer/

I assume you did '--path=/home/chm/lxc/myfirstcontainer/', not
'- path=/home/chm/lxc/myfirstcontainer/'?

> and received the following error message:
> 
> Can not write log, openpty() failed (/dev/pts not mounted?)

This is unrelated to the more important issue:

> Additional Information:
> - /dev/pts is mounted on my host system
> - when i try to start the new machine
> lxc-start --logfile=/var/log/lxc --logpriority=INFO  -n myfirstcontainer
> my hosts x-server chrashes.

Yikes, trivially reproduced.

Now, first, since you specified path=/home/chm/lxc/myfirstcontainer/
to lxc-create, you need to do

lxc-start -n myfirstcontainer -c /home/chm/lxc/myfirstcontainer/

So the first bug is that /var/lib/lxc/myfirstcontainer/ gets created,
with a bad config, allowing 'lxc-start -n myfirstcontainer' to try
and work.

However,

	lxc-start -n myfirstcontainer -c /home/chm/lxc/myfirstcontainer/

still doesn't work for me.

Would you mind opening a bug on launchpad?  Otherwise I'll do it.

> Any Ideas what went wrong?

Can I ask why you specified '--path'?  I'm tempted to remove that option
from the template, in favor of a '-B dir --dir=/home/chm/lxc/myfirstcontainer'
option to lxc-create itself for specifying where only the rootfs will go.

(This would fit in with the '-B lvm' which is added to lxc-create in
git://github.com/hallyn/lxc.git)

thanks,
-serge




More information about the lxc-users mailing list