Changes

Jump to navigation Jump to search
754 bytes added ,  15:01, 16 August 2012
Created page with "=Requirements= * A console should be disabled (lxc.console = none) * udev should not run in CT ($ mv /sbin/udevd{,.bcp}) =Example= $ cat ~/test-lxc.conf lxc.console=none lxc...."
=Requirements=
* A console should be disabled (lxc.console = none)
* udev should not run in CT ($ mv /sbin/udevd{,.bcp})
=Example=
$ cat ~/test-lxc.conf
lxc.console=none
lxc.utsname = test-lxc
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.mount = /root/test-lxc/etc/fstab
lxc.rootfs = /root/test-lxc-root/

$ cat /root/test-lxc/etc/fstab
none /root/test-lxc-root/dev/pts devpts defaults 0 0
none /root/test-lxc-root/proc proc defaults 0 0
none /root/test-lxc-root/sys sysfs defaults 0 0
none /root/test-lxc-root/dev/shm tmpfs defaults 0 0

$ lxc-create -n test-lxc -f test-lxc.conf
$ mount -t cgroup c /cgroup
$ mount --bind test-lxc test-lxc-root/
$ lxc-start -n test-lxc

Navigation menu