[Lxc-users] sshd container problem

John de la Garza john at jjdev.com
Mon Jan 7 20:57:33 UTC 2013


I am trying to create a sshd container.  Any ideas on how to fix this?

I'm using a stock ubuntu 12.10 server

here is the output of my reproducing the issue
---------------
root at ubuntu:/usr/share/lxc/templates# cat /etc/lxc/lxc.conf 
lxc.network.type=veth
lxc.network.link=lxcbr0
lxc.network.flags=up
root at ubuntu:/usr/share/lxc/templates# lxc-create  -t sshd -n foo

No config file specified, using the default config
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): 
<I removed ssh config output>
'sshd' template installed
'foo' created
root at ubuntu:/usr/share/lxc/templates# lxc-start -n foo 
lxc-start: Read-only file system - error unlinking /usr/lib/x86_64-linux-gnu/lxc/dev/kmsg

lxc-start: failed to setup kmsg for 'foo'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'foo'

root at ubuntu:/usr/share/lxc/templates# ls  /usr/lib/x86_64-linux-gnu/lxc/
lxc-init




this is the config file created for the container:

lxc.network.type=veth
lxc.network.link=lxcbr0
lxc.network.flags=up
lxc.rootfs = /var/lib/lxc/foo/rootfs
lxc.utsname = foo
lxc.pts = 1024
# uncomment the next line to run the container unconfined:
#lxc.aa_profile = unconfined
lxc.mount.entry=/dev dev none ro,bind 0 0
lxc.mount.entry=/lib lib none ro,bind 0 0
lxc.mount.entry=/bin bin none ro,bind 0 0
lxc.mount.entry=/usr usr none ro,bind 0 0
lxc.mount.entry=/sbin sbin none ro,bind 0 0
lxc.mount.entry=tmpfs var/run/sshd tmpfs mode=0644 0 0
lxc.mount.entry=/usr/share/lxc/templates/lxc-sshd sbin/init none bind 0 0
lxc.mount.entry=proc proc proc nodev,noexec,nosuid 0 0
lxc.mount.entry=/lib64 lib64 none ro,bind 0 0





More information about the lxc-users mailing list