This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
технология_lxc [2020/06/22 20:26] val [Настройка lxc для запуска дочерней системы в контейнере] |
технология_lxc [2022/01/31 16:20] val [Технология LXC] |
||
---|---|---|---|
Line 3: | Line 3: | ||
* [[http://ru.wikipedia.org/wiki/LXC|LXC wiki]] | * [[http://ru.wikipedia.org/wiki/LXC|LXC wiki]] | ||
* [[https://help.ubuntu.com/lts/serverguide/lxc.html|Ubuntu-Руководство по Ubuntu Server-Виртуализация]] | * [[https://help.ubuntu.com/lts/serverguide/lxc.html|Ubuntu-Руководство по Ubuntu Server-Виртуализация]] | ||
+ | * [[https://linuxcontainers.org/lxc/getting-started/|LXC Getting started]] | ||
Line 31: | Line 32: | ||
gateway 192.168.X.1 | gateway 192.168.X.1 | ||
| | ||
- | # bridge_ports eth0 | + | bridge_ports eth0 |
- | # bridge_ports enp0s3 | + | |
# bridge_stp off | # bridge_stp off | ||
Line 103: | Line 103: | ||
</code><code> | </code><code> | ||
... | ... | ||
- | #lxc.network.link = empty | + | |
lxc.net.0.type = veth | lxc.net.0.type = veth | ||
lxc.net.0.link = br0 | lxc.net.0.link = br0 | ||
Line 111: | Line 111: | ||
lxc.start.auto = 1 | lxc.start.auto = 1 | ||
- | ... | ||
</code><code> | </code><code> | ||
root@server:~# lxc-ls -f | root@server:~# lxc-ls -f | ||
Line 123: | Line 122: | ||
root@server:~# lxc-attach -n www -- ps ax | root@server:~# lxc-attach -n www -- ps ax | ||
+ | или | ||
+ | root@server:~# ps -eo pid,cmd,lxc | grep www | ||
+ | |||
root@server:~# lxc-attach -n www -- /bin/bash | root@server:~# lxc-attach -n www -- /bin/bash | ||
Line 131: | Line 133: | ||
root@server:~# systemctl start lxc@www | root@server:~# systemctl start lxc@www | ||
- | |||
- | debian9# systemctl edit lxc@server | ||
- | |||
- | или | ||
- | |||
- | debian9# mkdir /etc/systemd/system/lxc@www.service.d/ | ||
- | debian9# cat /etc/systemd/system/lxc@www.service.d/kill_signal_fix.conf | ||
- | </code><code> | ||
- | [Service] | ||
- | KillSignal=SIGRTMIN+3 | ||
- | </code><code> | ||
root@server:~# systemctl stop lxc@www | root@server:~# systemctl stop lxc@www | ||
</code> | </code> |