Show pageBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Linux Containers (LXC) ====== * [[https://linuxcontainers.org/lxc/introduction/]] * [[https://developer.ibm.com/tutorials/l-lxc-containers/]] ===== Administration ===== ==== Start / Stop ==== Daemonize LXC container lxc-start -d -n === Autostart === <file - /var/lib/lxc/CONTAINERNAME/config> lxc.group = onboot # Autostart lxc.start.auto = 1 lxc.start.delay = 5 lxc.start.order = 100 </file> <file - /etc/default/lxc> LXC_AUTO="true" # BOOTGROUPS - What groups should start on bootup? # Comma separated list of groups. # Leading comma, trailing comma or embedded double # comma indicates when the NULL group should be run. # Example (default): boot the onboot group first then the NULL group BOOTGROUPS="onboot," </file> ==== Konsole ==== Mit der Root-Konsole eines Systemcontainers verbinden lxc-attach -n name ===== Erstellen ===== lxc-create -t template -n name Liste der Templates: ls /usr/share/lxc/templates === Ubuntu === Release festlegen: lxc-create -n name -t ubuntu-cloud -- -r wily (wily mit dem Release ersetzen) ===== troubleshooting ===== ==== LXC doesn't work behind corporate proxy ==== If your lxc-create download hangs somewhere along those lines: <code>[…] Downloading ubuntu bionic minimal ... W: Target architecture is the same as host architecture; disabling QEMU support I: Running command: debootstrap --arch amd64 --verbose --components=main,universe --include=apt-transport-https,ssh,vim,language-pack-en bionic /var/cache/lxc/bionic/partial-amd64 http://archive.ubuntu.com/ubuntu I: Target architecture can be executed W: Cannot check Release signature; keyring file not available /usr/share/keyrings/ubuntu-archive-keyring.gpg I: Retrieving InRelease</code> And you have a corporate proxy, e.g. [[cntlm|CNTLM]], you have to set the following variables in wgetrc: <file ini /etc/wgetrc> # You can set the default proxies for Wget to use for http, https, and ftp. # They will override the value in the environment. https_proxy = http://127.0.0.1:3128 http_proxy = http://127.0.0.1:3128 ftp_proxy = http://127.0.0.1:3128 </file> Last modified: 2024-07-05 14:31