lxc:install_lxc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lxc:install_lxc [2021/01/03 17:17] – peter | lxc:install_lxc [2021/01/07 20:13] (current) – peter | ||
---|---|---|---|
Line 8: | Line 8: | ||
<code bash> | <code bash> | ||
- | sudo apt install lxc | + | sudo apt install lxc |
</ | </ | ||
Line 20: | Line 20: | ||
<code bash> | <code bash> | ||
- | sudo apt install lxc-utils | + | sudo apt install lxc-utils |
</ | </ | ||
Line 138: | Line 138: | ||
alpine 3.10 armhf default 20210103_13: | alpine 3.10 armhf default 20210103_13: | ||
alpine 3.10 i386 default 20210103_13: | alpine 3.10 i386 default 20210103_13: | ||
- | alpine 3.10 ppc64el default 20210103_13: | + | ... |
- | alpine 3.10 s390x default 20210103_13: | + | |
- | alpine 3.11 amd64 default 20210103_13: | + | |
- | alpine 3.11 arm64 default 20210103_13: | + | |
- | alpine 3.11 armhf default 20210103_13: | + | |
- | alpine 3.11 i386 default 20210103_13: | + | |
- | alpine 3.11 ppc64el default 20210103_13: | + | |
- | alpine 3.11 s390x default 20210103_13: | + | |
- | alpine 3.12 amd64 default 20210103_13: | + | |
- | alpine 3.12 arm64 default 20210103_13: | + | |
- | alpine 3.12 armhf default 20210103_13: | + | |
- | alpine 3.12 i386 default 20210103_13: | + | |
- | alpine 3.12 ppc64el default 20210103_13: | + | |
- | alpine 3.12 s390x default 20210103_13: | + | |
- | alpine edge amd64 default 20210103_13: | + | |
- | alpine edge arm64 default 20210103_13: | + | |
- | alpine edge armhf default 20210103_13: | + | |
- | alpine edge i386 default 20210103_13: | + | |
- | alpine edge ppc64el default 20210103_13: | + | |
- | alpine edge s390x default 20210103_13: | + | |
- | alt Sisyphus amd64 default 20210103_01: | + | |
- | alt Sisyphus arm64 default 20210103_01: | + | |
- | alt Sisyphus i386 default 20210103_01: | + | |
- | alt Sisyphus ppc64el default 20210103_01: | + | |
- | alt p9 amd64 default 20210103_01: | + | |
- | alt p9 arm64 default 20210103_01: | + | |
- | alt p9 i386 default 20210103_01: | + | |
- | apertis v2019.5 amd64 default 20210103_10: | + | |
- | apertis v2019.5 arm64 default 20210103_10: | + | |
- | apertis v2019.5 armhf default 20210103_10: | + | |
- | apertis v2020.3 amd64 default 20210103_10: | + | |
- | apertis v2020.3 arm64 default 20210103_10: | + | |
- | apertis v2020.3 armhf default 20210103_10: | + | |
- | archlinux current amd64 default 20210103_04: | + | |
- | archlinux current arm64 default 20210103_04: | + | |
- | archlinux current armhf default 20210103_04: | + | |
- | centos 7 amd64 default 20210103_07: | + | |
- | centos 7 armhf default 20210103_07: | + | |
- | centos 7 i386 default 20210103_07: | + | |
- | centos 8-Stream amd64 default 20210103_07: | + | |
- | centos 8-Stream arm64 default 20210103_07: | + | |
- | centos 8-Stream ppc64el default 20210103_07: | + | |
centos 8 amd64 default 20210103_07: | centos 8 amd64 default 20210103_07: | ||
centos 8 arm64 default 20210103_07: | centos 8 arm64 default 20210103_07: | ||
Line 185: | Line 144: | ||
debian bullseye amd64 default 20210103_05: | debian bullseye amd64 default 20210103_05: | ||
debian bullseye arm64 default 20210103_05: | debian bullseye arm64 default 20210103_05: | ||
+ | ... | ||
+ | ubuntu trusty arm64 default 20210103_07: | ||
+ | ubuntu trusty armhf default 20210103_07: | ||
+ | ubuntu trusty i386 default 20210103_07: | ||
+ | ubuntu trusty ppc64el default 20210103_07: | ||
+ | ubuntu xenial amd64 default 20210103_07: | ||
+ | ubuntu xenial arm64 default 20210103_07: | ||
+ | ubuntu xenial armhf default 20210103_07: | ||
... | ... | ||
</ | </ | ||
Line 214: | Line 181: | ||
--- | --- | ||
+ | |||
You just created an Ubuntu xenial amd64 (20210103_07: | You just created an Ubuntu xenial amd64 (20210103_07: | ||
To enable SSH, run: apt install openssh-server | To enable SSH, run: apt install openssh-server | ||
No default root or user password are set by LXC. | No default root or user password are set by LXC. | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Check the container status ==== | ||
+ | |||
+ | <code bash> | ||
+ | lxc-info -n test | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | Name: test | ||
+ | State: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Start the Container ==== | ||
+ | |||
+ | <code bash> | ||
+ | lxc-start -n test | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | <code bash> | ||
+ | lxc-start: test: lxccontainer.c: | ||
+ | lxc-start: test: tools/ | ||
+ | lxc-start: test: tools/ | ||
+ | lxc-start: test: tools/ | ||
+ | </ | ||
+ | |||
+ | By default, unprivileged users are not allowed to create any network device on the host. To fix: | ||
+ | |||
+ | <file bash / | ||
+ | peter veth lxcbr0 10 | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Check the container status again ==== | ||
+ | |||
+ | <code bash> | ||
+ | lxc-info -n test | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | Name: test | ||
+ | State: | ||
+ | PID: 793414 | ||
+ | IP: | ||
+ | Link: | ||
+ | TX bytes: | ||
+ | RX bytes: | ||
+ | Total bytes: | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Get a Shell inside the Container ==== | ||
+ | |||
+ | <code bash> | ||
+ | lxc-attach -n test | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Stop the Test Container ==== | ||
+ | |||
+ | <code bash> | ||
+ | lxc-stop -n test | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Remove the Test Container ==== | ||
+ | |||
+ | <code bash> | ||
+ | lxc-destroy -n test | ||
</ | </ | ||
lxc/install_lxc.1609694233.txt.gz · Last modified: 2021/01/03 17:17 by peter