[Lxc-users] Can not start containers using latest tools from the git

John Drescher drescherjm at gmail.com
Thu Jan 21 04:29:07 UTC 2010


localhost ~ # lxc-create -n guest_1 -f /etc/lxc/guest_1.conf
'guest_1' created
localhost ~ # lxc-start -n guest_1
lxc-start: Invalid argument - failed to umount '/lxc-oldrootfs-wXIi91/dev/shm'
lxc-start: failed to pivot_root to '/lxc/guest_1'
lxc-start: failed to set rootfs for 'guest_1'
lxc-start: failed to setup the container

localhost ~ # cat /etc/lxc/guest_1.conf
lxc.utsname = guest_1
lxc.mount = /etc/lxc/guest_1.fstab
lxc.rootfs = /lxc/guest_1
lxc.tty = 4
lxc.pts = 1024
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = veth0
lxc.network.mtu = 1500

lxc.cgroup.devices.deny = a # Deny all access to devices

lxc.cgroup.devices.allow = c 1:3 rwm # dev/null
lxc.cgroup.devices.allow = c 1:5 rwm # dev/zero

lxc.cgroup.devices.allow = c 5:1 rwm # dev/console
lxc.cgroup.devices.allow = c 5:0 rwm # dev/tty
lxc.cgroup.devices.allow = c 4:0 rwm # dev/tty0
lxc.cgroup.devices.allow = c 4:1 rwm # dev/tty1
lxc.cgroup.devices.allow = c 4:2 rwm # dev/tty2


lxc.cgroup.devices.allow = c 1:9 rwm # dev/urandon
lxc.cgroup.devices.allow = c 1:8 rwm # dev/random
lxc.cgroup.devices.allow = c 136:* rwm # dev/pts/*
lxc.cgroup.devices.allow = c 5:2 rwm # dev/pts/ptmx

#rtc
lxc.cgroup.devices.allow = c 254:0 rwm


localhost ~ # cat /etc/lxc/guest_1.fstab
none /lxc/guest_1/dev/pts devpts defaults 0 0
#none /lxc/guest_1/proc    proc   defaults 0 0
#none /lxc/guest_1/sys     sysfs  defaults 0 0
none /lxc/guest_1/dev/shm tmpfs  defaults 0 0
/usr/portage /lxc/guest_1/usr/portage  none rw,bind 1 0

Thanks,
John M. Drescher




More information about the lxc-users mailing list