Dobrica Pavlinušić's random unstructured stuff
LXC: Revision 11
This are notes for my LXC workshop, in state of flux Cgroups
Systemd
launchd alterntive, somilar to inetd, but for unix sockets (mostly) LXCVirtual Servers and Checkpoint/Restart in Mainstream Linux http://lxc.sourceforge.net/doc/sigops/appcr.pdf
Virtual, virtual...
don't delete filesdpkg-divert --rename /etc/init/theinitfile.conf networkprepare host machine
br0 macvlan
lxc.network.type=macvlan ip link add link <phys> name <vif> address <mac address> type macvlan mode (bridge|vepa|private) ip link add link bond200 name bond200:0 address 00:aa:bb:cc:dd:ee type macvlan mode bridge ip -d show link bond200:0
lxc.network.type = macvlan veth
lxc.network.type=veth physkernel > 2.6.35
lxc.network.type=phys cpuset.cpusecho 1 > /cgroup/<name>/cpuset.cpus # 2nd CPU! echo 1,2,3 > /cgroup/<name>/cpuset.cpus echo 0-7 > /cgroup/<name>/cpuset.cpus lxc-execute -n foo -s lxc.cgroup.cpuset.cpus="1,2,3" myforks cpu.shareslxc-execute -n foo -s lxc.cgroup.cpu.shares=1 /bin/bash lxc-execute -n bar -s /bin/bash while $(true); do echo -n . ; done lxc-cgroup -n foo cpu.shares=1024 lxc-create/usr/lib/lxc/templates/
export MIRROR=http://192.168.1.20:3142/ftp.debian.org
cat > /tmp/lenny.conf
t61p:~# lxc-create -n lenny -t debian -f /tmp/lenny.conf lxc-executeapplication container (shares filesystem!) lxc-ssh monitoringhtophtop - cgroups > r192
t61p:/tmp# apt-get source htop t61p:/tmp/htop-0.9# DEB_BUILD_OPTIONS="--enable-cgroup" fakeroot debian/rules binary
t61p:/tmp/htop-0.9# fakeroot debian/rules binary procfs
http://lxc.sourceforge.net/download/procfs/procfs.tar.gz (fuse, defunct) debugginglxc-start --logpriority=TRACE -o /tmp/trace.log --name my_container (must have redirect to file!) slow network?
/usr/sbin/ethtool -K br0 sg off kernel patcheshttp://lxc.sourceforge.net/patches/linux/ Are we in container?on host:
dpavlin@stage:~$ cat /proc/$$/cgroup inside container:
dpavlin@narada:~$ cat /proc/$$/cgroup |