{"id":301605,"date":"2020-04-09T21:00:15","date_gmt":"2020-04-09T21:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=301605"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=301605","title":{"rendered":"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 LXD \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0432 Linux"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/496492\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jj\/qk\/qa\/jjqkqae2fpn42rq5ar3ukcjau1a.png\"><\/p>\n<p>  <\/p>\n<p><strong>LXD<\/strong> \u2014 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0433\u043b\u0430\u0441\u0438\u0442 <a href=\"https:\/\/linuxcontainers.org\/lxd\/introduction\/\" rel=\"nofollow\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a>. \u041e\u043d \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b Linux.<\/p>\n<p>  <\/p>\n<p><strong>\u042f\u0434\u0440\u043e LXD<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0435\u043c\u043e\u043d (\u0441\u0435\u0440\u0432\u0438\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 root), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 REST API \u0447\u0435\u0440\u0435\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 unix \u0441\u043e\u043a\u0435\u0442, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f. \u041a\u043b\u0438\u0435\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0441 \u0441\u0430\u043c\u0438\u043c LXD \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 REST API. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0435\u0441\u044c \u043b\u0438 \u0432\u044b \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0445\u043e\u0441\u0442\u0443 \u0438\u043b\u0438 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u0445 LXD, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0435\u0434\u0430\u0432\u043d\u044e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 LXD \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d QEMU \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0443\u0437\u043d\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0443\u043b\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449, \u0441\u0435\u0442\u044c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043b\u0438\u043c\u0438\u0442\u044b \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u0435\u043f\u0448\u043e\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e LXD \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0432 Linux.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0443:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/linuxcontainers.org\" rel=\"nofollow\">\u0421\u0430\u0439\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/a> <\/li>\n<li><a href=\"https:\/\/linuxcontainers.org\/lxd\/docs\/master\/\" rel=\"nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/discuss.linuxcontainers.org\/\" rel=\"nofollow\">\u0424\u043e\u0440\u0443\u043c <\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"installyaciya-lxd\">\u0418\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f LXD<\/h1>\n<p>  <\/p>\n<h2 id=\"installyaciya-lxd-v-distributivah-ubuntu\">\u0418\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f LXD \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 Ubuntu<\/h2>\n<p>  <\/p>\n<p>\u0412 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435 Ubuntu 19.10 \u043f\u0430\u043a\u0435\u0442 <code>lxd<\/code> \u0438\u043c\u0435\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e \u043d\u0430 <a href=\"https:\/\/pingvinus.ru\/note\/snap\" rel=\"nofollow\">snap-\u043f\u0430\u043a\u0435\u0442<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">apt search lxd  lxd\/eoan 1:0.7 all   Transitional package - lxd -&gt; snap (lxd)<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430 \u043f\u0430\u043a\u0435\u0442\u0430, \u043e\u0434\u0438\u043d \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u0430\u043a snap-\u043f\u0430\u043a\u0435\u0442. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u0432\u0443\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0441\u0438\u0440\u043e\u0442\u043e\u0439, \u0435\u0441\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c snap-\u043f\u0430\u043a\u0435\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c snap-\u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0439\u0442\u0438 \u043f\u0430\u043a\u0435\u0442 <code>lxd<\/code> \u0432 snap-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">snap find lxd  Name             Version        Publisher       Notes    Summary lxd              3.21           canonical\u2713      -        System container manager and API lxd-demo-server  0+git.6d54658  stgraber        -        Online software demo sessions using LXD nova             ocata          james-page      -        OpenStack Compute Service (nova) nova-hypervisor  ocata          james-page      -        OpenStack Compute Service - KVM Hypervisor (nova) distrobuilder    1.0            stgraber        classic  Image builder for LXC and LXD fabrica          0.1            ogra            -        Build snaps by simply pointing a web form to a git tree satellite        0.1.2          alanzanattadev  -        Advanced scalable Open source intelligence platform<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>list<\/code> \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0430\u043a\u0435\u0442 <code>lxd<\/code> \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">snap list  Name  Version    Rev   Tracking  Publisher   Notes core  16-2.43.3  8689  stable    canonical\u2713  core<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e LXD \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f snap-\u043f\u0430\u043a\u0435\u0442\u043e\u043c, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 <code>lxd<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0432 <code>\/usr\/bin<\/code> \u0438 \u0442.\u0434.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo apt update sudo apt install lxd<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u0430\u043a\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043a\u0430\u043a snap-\u043f\u0430\u043a\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">snap list  Name  Version    Rev    Tracking  Publisher   Notes core  16-2.43.3  8689   stable    canonical\u2713  core lxd   3.21       13474  stable\/\u2026  canonical\u2713  -<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"installyaciya-lxd-v-distributivah-arch-linux\">\u0418\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f LXD \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 Arch Linux<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 LXD \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u0435\u0440\u0432\u0430\u044f \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u043f\u0430\u043a\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo pacman -Syyu &amp;&amp; sudo pacman -S lxd<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430, \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f LXD \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 <code>lxd<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo usermod -a -G lxd ubuntu<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 <code>lxd<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">id -Gn ubuntu  ubuntu adm dialout cdrom floppy sudo audio dip video plugdev netdev lxd<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u0430 <code>lxd<\/code> \u043d\u0435 \u0432\u0438\u0434\u043d\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u0442\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0441\u0441\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0437\u0430\u043d\u043e\u0432\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u0438 \u0437\u0430\u0439\u0442\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0432 <code>systemd<\/code> \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 LXD \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo systemctl enable lxd<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo systemctl start lxd<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo systemctl status lxd<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"hranilische-lxd-storage\">\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 LXD (Storage)<\/h1>\n<p>  <\/p>\n<p>\u0414\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0432 LXD.<\/p>\n<p>  <\/p>\n<p>\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 (<em>Storage<\/em>) <a href=\"https:\/\/linuxcontainers.org\/lxd\/docs\/master\/storage\" rel=\"nofollow\">\u0441\u043e\u0441\u0442\u043e\u0438\u0442<\/a> \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 <em>Storage Pool<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a ZFS, BTRFS, LVM \u0438\u043b\u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 <em>Storage Pool<\/em> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0442\u043e\u043c\u0430 (<em>Storage Volume<\/em>) \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0431\u0440\u0430\u0437\u044b, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gh\/gr\/n9\/ghgrn9wyertfmqenwpikaenc4zm.png\"><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c \u0432 LXD \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>lxc storage<\/code> \u0441\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0432 \u043a\u043b\u044e\u0447 \u2014 <code>lxc storage --help<\/code><\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 <em>Storage Pool<\/em> \u0432 LXD \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">lxc storage list  +---------+-------------+--------+--------------------------------+---------+ |  NAME   | DESCRIPTION | DRIVER |             SOURCE             | USED BY | +---------+-------------+--------+--------------------------------+---------+ | hddpool |             | btrfs  | \/dev\/loop1                     | 2       | +---------+-------------+--------+--------------------------------+---------+ | ssdpool |             | btrfs  | \/var\/lib\/lxd\/disks\/ssdpool.img | 4       | +---------+-------------+--------+--------------------------------+---------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 <em>Storage Volume<\/em> \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c <em>Storage Pool<\/em> \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>lxc storage volume list<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">lxc storage volume list hddpool  +-------+------------------------------------------------------------------+-------------+---------+ | TYPE  |                               NAME                               | DESCRIPTION | USED BY | +-------+------------------------------------------------------------------+-------------+---------+ | image | ebd565585223487526ddb3607f5156e875c15a89e21b61ef004132196da6a0a3 |             | 1       | +-------+------------------------------------------------------------------+-------------+---------+<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">lxc storage volume list ssdpool  +-----------+------------------------------------------------------------------+-------------+---------+ |   TYPE    |                               NAME                               | DESCRIPTION | USED BY | +-----------+------------------------------------------------------------------+-------------+---------+ | container | alp3                                                             |             | 1       | +-----------+------------------------------------------------------------------+-------------+---------+ | container | jupyter                                                          |             | 1       | +-----------+------------------------------------------------------------------+-------------+---------+ | image     | ebd565585223487526ddb3607f5156e875c15a89e21b61ef004132196da6a0a3 |             | 1       | +-----------+------------------------------------------------------------------+-------------+---------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f <em>Storage Pool<\/em> \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 BTRFS, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a <em>Storage Volume<\/em> \u0438\u043b\u0438 <em>subvolumes<\/em> \u0432 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 BTRFS \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u044d\u0442\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo btrfs subvolume list -p \/var\/lib\/lxd\/storage-pools\/hddpool  ID 257 gen 818 parent 5 top level 5 path images\/ebd565585223487526ddb3607f5156e875c15a89e21b61ef004132196da6a0a3<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo btrfs subvolume list -p \/var\/lib\/lxd\/storage-pools\/ssdpool  ID 257 gen 1820 parent 5 top level 5 path images\/ebd565585223487526ddb3607f5156e875c15a89e21b61ef004132196da6a0a3 ID 260 gen 1819 parent 5 top level 5 path containers\/jupyter ID 263 gen 1820 parent 5 top level 5 path containers\/alp3<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"inicializaciya-lxd\">\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f LXD<\/h1>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e LXD \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0442\u044c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u043e \u0432\u044b\u0437\u043e\u0432\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>lxc --help<\/code> \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>lxd init<\/code> \u043e\u0442\u0432\u0435\u0442\u0438\u0432 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>  <\/p>\n<h2 id=\"vybor-faylovoy-sistemy-dlya-storage-pool\">\u0412\u044b\u0431\u043e\u0440 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f Storage Pool<\/h2>\n<p>  <\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 LXD \u0437\u0430\u0434\u0430\u0451\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e <em>Storage Pool<\/em>. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 BTRFS. <u>\u041f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0424\u0421 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e<\/u>. \u0414\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0424\u0421 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/linuxcontainers.org\/lxd\/docs\/master\/storage#storage-backends-and-supported-functions\" rel=\"nofollow\">\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439<\/a>:<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>Feature<\/th>\n<th>Directory<\/th>\n<th>Btrfs<\/th>\n<th>LVM<\/th>\n<th>ZFS<\/th>\n<th>CEPH<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Optimized image storage<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Optimized instance creation<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Optimized snapshot creation<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Optimized image transfer<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Optimized instance transfer<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Copy on write<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Block based<\/td>\n<td>no<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Instant cloning<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Storage driver usable inside a container<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>no<\/td>\n<td>no<\/td>\n<td>no<\/td>\n<\/tr>\n<tr>\n<td>Restore from older snapshots (not latest)<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>no<\/td>\n<td>yes<\/td>\n<\/tr>\n<tr>\n<td>Storage quotas<\/td>\n<td>yes(*)<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>yes<\/td>\n<td>no<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h2 id=\"inicializaciya-seti-i-storage-pool-s-pomoschyu-mastera\">\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0442\u0438 \u0438 Storage Pool \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0430\u0434\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b LXD \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>lxc init<\/code> \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0438\u0445 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0432\u0430\u0448\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">lxd init  Would you like to use LXD clustering? (yes\/no) [default=no]:  Do you want to configure a new storage pool? (yes\/no) [default=yes]:  Name of the new storage pool [default=default]: ssdpool          Name of the storage backend to use (lvm, btrfs, dir) [default=btrfs]:  Create a new BTRFS pool? (yes\/no) [default=yes]:  Would you like to use an existing block device? (yes\/no) [default=no]:  Size in GB of the new loop device (1GB minimum) [default=15GB]: 10GB Would you like to connect to a MAAS server? (yes\/no) [default=no]:  Would you like to create a new local network bridge? (yes\/no) [default=yes]:  What should the new bridge be called? [default=lxdbr0]:  What IPv4 address should be used? (CIDR subnet notation, \u201cauto\u201d or \u201cnone\u201d) [default=auto]: 10.0.5.1\/24 Would you like LXD to NAT IPv4 traffic on your bridge? [default=yes]:  What IPv6 address should be used? (CIDR subnet notation, \u201cauto\u201d or \u201cnone\u201d) [default=auto]: none Would you like LXD to be available over the network? (yes\/no) [default=no]:  Would you like stale cached images to be updated automatically? (yes\/no) [default=yes] no Would you like a YAML &quot;lxd init&quot; preseed to be printed? (yes\/no) [default=no]: <\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"sozdanie-dopolnitelnogo-storage-pool\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e Storage Pool<\/h2>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 <em>Storage Pool<\/em> \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0434\u0430\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 <code>ssdpool<\/code> \u0438 \u0444\u0430\u0439\u043b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0441\u044f \u0432 \u043c\u043e\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>\/var\/lib\/lxd\/disks\/ssdpool.img<\/code>. \u042d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 SSD \u0434\u0438\u0441\u043a\u0443 \u0432 \u043c\u043e\u0451\u043c \u041f\u041a.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438, \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0443\u044e \u0440\u043e\u043b\u044c \u0438\u0433\u0440\u0430\u0435\u0442 <em>Storage Pool<\/em> \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0442\u043e\u0440\u043e\u0439 <em>Storage Pool<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0442\u0438\u043f\u0435 \u0434\u0438\u0441\u043a\u0435, \u043d\u0430 HDD. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e LXD \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c <em>Storage Pool<\/em> \u0432\u043d\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 <code>\/var\/lib\/lxd\/disks\/<\/code> \u0438 \u0434\u0430\u0436\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, <a href=\"https:\/\/discuss.linuxcontainers.org\/t\/how-to-move-a-storage-to-other-places\/7171\/3\" rel=\"nofollow\">\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/a>. \u041e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\/\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 <em>Storage Pool<\/em> \u0443\u043a\u0430\u0437\u0430\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0431\u043b\u043e\u0447\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0443\u0442\u0438 \u043a loopback-\u0444\u0430\u0439\u043b\u0443 \u0443\u043a\u0430\u0437\u0430\u0432 \u044d\u0442\u043e \u0432 \u043a\u043b\u044e\u0447\u0435 <code>source<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <em>Storage Pool<\/em> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c loopback-\u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u0432\u0430\u0448\u0435\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 10GB:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">dd if=\/dev\/zero of=\/mnt\/work\/lxd\/hddpool.img bs=1MB count=10000  10000+0 records in 10000+0 records out 10000000000 bytes (10 GB, 9,3 GiB) copied, 38,4414 s, 260 MB\/s<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c loopback-\u0444\u0430\u0439\u043b \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 loopback-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo losetup --find --show \/mnt\/work\/lxd\/hddpool.img  \/dev\/loop1<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043b\u044e\u0447\u0443 <code>--show<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0438\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0441\u044f \u043d\u0430\u0448 loopback-\u0444\u0430\u0439\u043b. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0437\u0430\u043d\u044f\u0442\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">losetup -l  NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                      DIO LOG-SEC \/dev\/loop1         0      0         0  0 \/mnt\/work\/lxd\/hddpool.img        0     512 \/dev\/loop0         0      0         1  0 \/var\/lib\/lxd\/disks\/ssdpool.img   0     512<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 <code>\/dev\/loop1<\/code> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d loopback-\u0444\u0430\u0439\u043b <code>\/mnt\/work\/lxd\/hddpool.img<\/code>, \u0430 \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 <code>\/dev\/loop0<\/code> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d loopback-\u0444\u0430\u0439\u043b <code>\/var\/lib\/lxd\/disks\/ssdpool.img<\/code> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u043c\u0443 <em>Storage Pool<\/em>.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 <em>Storage Pool<\/em> \u0432 LXD \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e loopback-\u0444\u0430\u0439\u043b\u0430. LXD \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 loopback-\u0444\u0430\u0439\u043b <code>\/mnt\/work\/lxd\/hddpool.img<\/code> \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 <code>\/dev\/loop1<\/code> \u043f\u043e\u0434 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 BTRFS:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc storage create hddpool btrfs size=10GB source=\/dev\/loop1<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u0435\u0434\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 <em>Storage Pool<\/em> \u043d\u0430 \u044d\u043a\u0440\u0430\u043d:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc storage list  +---------+-------------+--------+--------------------------------+---------+ |  NAME   | DESCRIPTION | DRIVER |             SOURCE             | USED BY | +---------+-------------+--------+--------------------------------+---------+ | hddpool |             | btrfs  | \/dev\/loop1                     | 0       | +---------+-------------+--------+--------------------------------+---------+ | ssdpool |             | btrfs  | \/var\/lib\/lxd\/disks\/ssdpool.img | 0       | +---------+-------------+--------+--------------------------------+---------+<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"uvelichenie-razmera-storage-pool\">\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 Storage Pool<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <em>Storage Pool<\/em>, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c. \u0414\u043b\u044f <em>Storage Pool<\/em> \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 BTRFS \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo truncate -s +5G \/mnt\/work\/lxd\/hddpool.img sudo losetup -c \/dev\/loop1 sudo btrfs filesystem resize max \/var\/lib\/lxd\/storage-pools\/hddpool<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"avtovstavka-loopback-fayla-v-slot-loopback-ustroystva\">\u0410\u0432\u0442\u043e\u0432\u0441\u0442\u0430\u0432\u043a\u0430 loopback-\u0444\u0430\u0439\u043b\u0430 \u0432 \u0441\u043b\u043e\u0442 loopback-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/h3>\n<p>  <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0445\u043e\u0441\u0442\u0430, \u0444\u0430\u0439\u043b <code>\/mnt\/work\/lxd\/hddpool.img<\/code> &quot;\u0432\u044b\u043b\u0435\u0442\u0438\u0442&quot; \u0438\u0437 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 <code>\/dev\/loop1<\/code> \u0438 \u0441\u0435\u0440\u0432\u0438\u0441 LXD \u0443\u043f\u0430\u0434\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0443\u0432\u0438\u0434\u0438\u0442 \u0435\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <code>\/dev\/loop1<\/code> \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0445\u043e\u0441\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c <em>unit<\/em> \u0444\u0430\u0439\u043b \u0442\u0438\u043f\u0430 <em>service<\/em> \u0432 <code>\/etc\/systemd\/system\/<\/code> \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 SystemD:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cat &lt;&lt; EOF | sudo tee -a \/etc\/systemd\/system\/lxd-hddpool.service [Unit] Description=Losetup LXD Storage Pool (hddpool) After=local-fs.target  [Service] Type=oneshot ExecStart=\/sbin\/losetup \/dev\/loop1 \/mnt\/work\/lxd\/hddpool.img RemainAfterExit=true  [Install] WantedBy=local-fs.target EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo systemctl enable lxd-hddpool  Created symlink \/etc\/systemd\/system\/local-fs.target.wants\/lxd-hddpool.service \u2192 \/etc\/systemd\/system\/lxd-hddpool.service.<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">systemctl status lxd-hddpool.service   \u25cf lxd-hddpool.service - Losetup LXD Storage Pool (hddpool)      Loaded: loaded (\/etc\/systemd\/system\/lxd-hddpool.service; enabled; vendor preset: disabled)      Active: active (exited) since Wed 2020-04-08 03:43:53 MSK; 1min 37s ago     Process: 711 ExecStart=\/sbin\/losetup \/dev\/loop1 \/mnt\/work\/lxd\/hddpool.img (code=exited, status=0\/SUCCESS)    Main PID: 711 (code=exited, status=0\/SUCCESS)  \u0430\u043f\u0440 08 03:43:52 manjaro systemd[1]: Starting Losetup LXD Storage Pool (hddpool)... \u0430\u043f\u0440 08 03:43:53 manjaro systemd[1]: Finished Losetup LXD Storage Pool (hddpool).<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437 \u0432\u044b\u0432\u043e\u0434 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0440\u0430\u0432\u043d\u043e <em>active<\/em>, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u043d\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u044f <code>RemainAfterExit=true<\/code>.<\/p>\n<p>  <\/p>\n<h2 id=\"bezopasnost-privelegii-konteynerov\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c. \u041f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/h2>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0435\u0433\u043e \u044f\u0434\u0440\u043e, \u0442\u043e \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0445\u043e\u0441\u0442\u0430 LXD \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0433\u0434\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0441 UID \u0438 GID \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u043c\u0443 \u0436\u0435 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0443, \u0447\u0442\u043e \u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0441 UID \u0440\u0430\u0432\u043d\u044b\u043c 0 \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0435 \u0442\u0435 \u0436\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0447\u0442\u043e \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 UID \u0440\u0430\u0432\u043d\u044b\u043c 0. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, root \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u0441\u0435\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u043d\u043e \u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<p>  <\/li>\n<li>\n<p><strong>\u041d\u0435\u043f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0443 UID \u0438 GID \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u043e\u0442 0 \u0434\u043e 65535, \u043d\u043e \u0434\u043b\u044f \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0431\u0438\u0442\u0430 SubUID \u0438 SubGID \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 UID=0 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u0447\u0435\u043d \u0432 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a\u0430\u043a <code>SubUID + UID<\/code>. \u042d\u0442\u043e \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0445\u043e\u0441\u0442-\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0445\u043e\u0441\u0442-\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c, \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u043c UID\/GID.<\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u043c\u0435\u044e\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u043d\u0435\u043f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c SubUID \u0438 SubGID.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0432\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u0441\u043a\u0443 \u0434\u043b\u044f SubUID \u0438 SubGID \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo touch \/etc{\/subuid,\/subgid} sudo usermod --add-subuids 1000000-1065535 root  sudo usermod --add-subgids 1000000-1065535 root<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0441\u0435\u0440\u0432\u0438\u0441 LXD \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043d:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo systemctl restart lxd<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"sozdanie-virtualnogo-kommutatora-seti\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430 \u0441\u0435\u0442\u0438<\/h2>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u043d\u0435\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u0435\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>lxd init<\/code> \u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <em>lxdbr0<\/em>, \u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0441\u0435\u0442\u044c\u044e \u0432 LXD \u0438 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 (\u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043c\u043e\u0441\u0442, bridge) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 (\u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043c\u043e\u0441\u0442, bridge) \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0445\u043e\u0441\u0442 \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u044c:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l8\/3u\/km\/l83ukmshtxtanhyi4src9hmnqkm.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0441\u0435\u0442\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0438\u043b\u0438 \u0445\u043e\u0441\u0442\u043e\u043c \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440, \u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u043d\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0433\u043b\u0430\u0432\u0430\u0445, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u0430\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 \u0441 \u043f\u043e\u0434\u0441\u0435\u0442\u044c\u044e <code>10.0.5.0\/24<\/code> \u0438 IPv4 \u0430\u0434\u0440\u0435\u0441\u043e\u043c <code>10.0.5.1\/24<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 <code>ipv4.nat<\/code> \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u0445\u043e\u0441\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0443\u0436\u0431\u044b NAT:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc network create lxdbr0 ipv4.address=10.0.5.1\/24 ipv4.nat=true ipv6.address=none<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 LXD:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc network list  +--------+----------+---------+-------------+---------+ |  NAME  |   TYPE   | MANAGED | DESCRIPTION | USED BY | +--------+----------+---------+-------------+---------+ | eno1   | physical | NO      |             | 0       | +--------+----------+---------+-------------+---------+ | lxdbr0 | bridge   | YES     |             | 0       | +--------+----------+---------+-------------+---------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0443\u0431\u0435\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0448\u0442\u0430\u0442\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0435\u0434\u0441\u0442\u0432\u0430 Linux-\u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 \u2014 <code>ip link<\/code> \u0438\u043b\u0438 <code>ip addr<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">ip addr  1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1\/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1\/128 scope host         valid_lft forever preferred_lft forever 2: eno1: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000     link\/ether bc:ee:7b:5a:6b:44 brd ff:ff:ff:ff:ff:ff     altname enp0s25     inet6 fe80::9571:11f3:6e0c:c07b\/64 scope link noprefixroute         valid_lft forever preferred_lft forever 3: lxdbr0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP group default qlen 1000     link\/ether c2:38:90:df:cb:59 brd ff:ff:ff:ff:ff:ff     inet 10.0.5.1\/24 scope global lxdbr0        valid_lft forever preferred_lft forever     inet6 fe80::c038:90ff:fedf:cb59\/64 scope link         valid_lft forever preferred_lft forever 5: veth3ddab174@if4: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue master lxdbr0 state UP group default qlen 1000     link\/ether ca:c3:5c:1d:22:26 brd ff:ff:ff:ff:ff:ff link-netnsid 0<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"profil-konfiguracii\">\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h2>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 LXD \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0435\u0451 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/em>. \u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u0441\u043a\u0430\u0434\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u043e:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/h5\/kp\/ur\/h5kpur7w4q8qs7q4lti3lkdphdc.png\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 LXD \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0440\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f: <code>default<\/code>, <code>hddpool<\/code> \u0438 <code>hostfs<\/code>. \u0412\u0441\u0435 \u0442\u0440\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f (\u0441\u0435\u0440\u0430\u044f \u0437\u043e\u043d\u0430). \u041f\u0440\u043e\u0444\u0438\u043b\u044c <code>default<\/code> \u0438\u043c\u0435\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <code>root<\/code> \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>pool<\/code> \u0440\u0430\u0432\u0435\u043d <code>ssdpool<\/code>, \u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u0430\u0441\u043a\u0430\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044c <code>hddpool<\/code> \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>pool<\/code> \u043f\u0435\u0440\u0435\u043a\u0440\u043e\u0435\u0442 \u044d\u0442\u043e\u0442 \u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u044f <code>default<\/code> \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 <code>root<\/code> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>pool<\/code> \u0440\u0430\u0432\u043d\u044b\u043c <strong><code>hddpool<\/code><\/strong>, \u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044c <code>hostfs<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc profile list  +---------+---------+ |  NAME   | USED BY | +---------+---------+ | default | 1       | +---------+---------+ | hddroot | 0       | +---------+---------+ | ssdroot | 1       | +---------+---------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a\u043b\u044e\u0447 <code>--help<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc profile --help  Description:   Manage profiles  Usage:   lxc profile [command]  Available Commands:   add         Add profiles to instances   assign      Assign sets of profiles to instances   copy        Copy profiles   create      Create profiles   delete      Delete profiles   device      Manage instance devices   edit        Edit profile configurations as YAML   get         Get values for profile configuration keys   list        List profiles   remove      Remove profiles from instances   rename      Rename profiles   set         Set profile configuration keys   show        Show profile configurations   unset       Unset profile configuration keys<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"redaktirovanie-profilya\">\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <code>default<\/code> \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438 \u0432\u0441\u0435 \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u0435\u0442\u044c, \u0434\u043b\u044f \u043d\u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 (\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435) \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0435\u0442\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439, \u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u043c\u0438 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0443 \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0441\u0435\u0442\u044c \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0432 \u0441\u0435\u0442\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043d\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0437\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <code>eth0<\/code> \u0442\u0438\u043f\u0430 <code>nic<\/code> \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043a \u0441\u0435\u0442\u0438 <code>lxdbr0<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc profile device add default eth0 nic network=lxdbr0 name=eth0<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441, \u0442\u043e \u0432\u0441\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 IP \u0430\u0434\u0440\u0435\u0441. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c IP \u0430\u0434\u0435\u0440\u0441\u043e\u043c, \u0442\u043e\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f) \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c IP \u0430\u0434\u0440\u0435\u0441\u0430, \u0430 \u043d\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc profile show default  config: {} description: Default LXD profile devices:   eth0:     name: eth0     network: lxdbr0     type: nic   root:     path: \/     pool: ssdpool     type: disk name: default used_by: []<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0434\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (devices):<\/p>\n<p>  <\/p>\n<ul>\n<li><code>eth0<\/code> \u2014 \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0442\u0438\u043f\u0430 <code>nic<\/code> \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u043e\u0435 \u0441 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c (\u0441\u0435\u0442\u0435\u0432\u044b\u043c \u043c\u043e\u0441\u0442\u043e\u043c) <code>lxdbr0<\/code><\/li>\n<li><code>root<\/code> \u2014 \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0442\u0438\u043f\u0430 <code>disk<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0443\u043b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 <code>ssdpool<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"sozdanie-novyh-profiley\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 <em>Storage Pool<\/em> \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>ssdroot<\/code> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0442\u0438\u043f\u0430 <code>disk<\/code> \u0441 \u0442\u043e\u0447\u043a\u043e\u0439 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <code>\/<\/code> (root) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 <em>Storage Pool<\/em> \u2014 <code>ssdpool<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc profile create ssdroot lxc profile device add ssdroot root disk path=\/ pool=ssdpool<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0442\u0438\u043f\u0430 <code>disk<\/code>, \u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 <em>Storage Pool<\/em> \u2014 <code>hddpool<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc profile create hddroot lxc profile device add hddroot root disk path=\/ pool=hddpool<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc profile show ssdroot  config: {} description: &quot;&quot; devices:   root:     path: \/     pool: ssdpool     type: disk name: ssdroot used_by: []<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc profile show hddroot  config: {} description: &quot;&quot; devices:   root:     path: \/     pool: hddpool     type: disk name: hddroot used_by: []<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"repozitoriy-obrazov\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043e\u0431\u0440\u0430\u0437\u043e\u0432<\/h2>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u043c\u0438 \u043d\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u044f\u0434\u0440\u0430 Linux. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0441\u043b\u0443\u0436\u0438\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432.<\/p>\n<p>  <\/p>\n<h3 id=\"udalennye-repozitorii-obrazov\">\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e LXD \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li><strong>ubuntu:<\/strong> (for stable Ubuntu images)<\/li>\n<li><strong>ubuntu-daily:<\/strong> (for daily Ubuntu images)<\/li>\n<li><strong>images:<\/strong> (for a bunch of other distros)<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc remote list  +-----------------+------------------------------------------+---------------+-------------+--------+--------+ |      NAME       |                   URL                    |   PROTOCOL    |  AUTH TYPE  | PUBLIC | STATIC | +-----------------+------------------------------------------+---------------+-------------+--------+--------+ | images          | https:\/\/images.linuxcontainers.org       | simplestreams | none        | YES    | NO     | +-----------------+------------------------------------------+---------------+-------------+--------+--------+ | local (default) | unix:\/\/                                  | lxd           | file access | NO     | YES    | +-----------------+------------------------------------------+---------------+-------------+--------+--------+ | ubuntu          | https:\/\/cloud-images.ubuntu.com\/releases | simplestreams | none        | YES    | YES    | +-----------------+------------------------------------------+---------------+-------------+--------+--------+ | ubuntu-daily    | https:\/\/cloud-images.ubuntu.com\/daily    | simplestreams | none        | YES    | YES    | +-----------------+------------------------------------------+---------------+-------------+--------+--------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 <code>ubuntu:<\/code> \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc image -c dasut list ubuntu: | head -n 11  +-------------------------------------------------+--------------+----------+-----------------+ |                   DESCRIPTION                   | ARCHITECTURE |   SIZE   |      TYPE       | +-------------------------------------------------+--------------+----------+-----------------+ | ubuntu 12.04 LTS amd64 (release) (20150728)     | x86_64       | 153.72MB | CONTAINER       | +-------------------------------------------------+--------------+----------+-----------------+ | ubuntu 12.04 LTS amd64 (release) (20150819)     | x86_64       | 152.91MB | CONTAINER       | +-------------------------------------------------+--------------+----------+-----------------+ | ubuntu 12.04 LTS amd64 (release) (20150906)     | x86_64       | 154.69MB | CONTAINER       | +-------------------------------------------------+--------------+----------+-----------------+ | ubuntu 12.04 LTS amd64 (release) (20150930)     | x86_64       | 153.86MB | CONTAINER       | +-------------------------------------------------+--------------+----------+-----------------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u043f\u0446\u0438\u044e <code>-c<\/code> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <code>dasut<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u0438 \u0434\u043b\u0438\u043d\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>head<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 <a href=\"https:\/\/alpinelinux.org\/\" rel=\"nofollow\">AlpineLinux<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc image -c ldast list images:alpine\/3.11  +------------------------------+--------------------------------------+--------------+--------+-----------+ |            ALIAS             |             DESCRIPTION              | ARCHITECTURE |  SIZE  |   TYPE    | +------------------------------+--------------------------------------+--------------+--------+-----------+ | alpine\/3.11 (3 more)         | Alpine 3.11 amd64 (20200220_13:00)   | x86_64       | 2.40MB | CONTAINER | +------------------------------+--------------------------------------+--------------+--------+-----------+ | alpine\/3.11\/arm64 (1 more)   | Alpine 3.11 arm64 (20200220_13:00)   | aarch64      | 2.22MB | CONTAINER | +------------------------------+--------------------------------------+--------------+--------+-----------+ | alpine\/3.11\/armhf (1 more)   | Alpine 3.11 armhf (20200220_13:00)   | armv7l       | 2.13MB | CONTAINER | +------------------------------+--------------------------------------+--------------+--------+-----------+ | alpine\/3.11\/i386 (1 more)    | Alpine 3.11 i386 (20200220_13:01)    | i686         | 2.42MB | CONTAINER | +------------------------------+--------------------------------------+--------------+--------+-----------+ | alpine\/3.11\/ppc64el (1 more) | Alpine 3.11 ppc64el (20200220_13:00) | ppc64le      | 2.31MB | CONTAINER | +------------------------------+--------------------------------------+--------------+--------+-----------+ | alpine\/3.11\/s390x (1 more)   | Alpine 3.11 s390x (20200220_13:00)   | s390x        | 2.09MB | CONTAINER | +------------------------------+--------------------------------------+--------------+--------+-----------+<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"lokalnyy-repozitoriy-obrazov\">\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043e\u0431\u0440\u0430\u0437\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0438\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <code>local:<\/code>. \u0421\u0435\u0439\u0447\u0430\u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0443\u0441\u0442, \u0443\u0431\u0435\u0434\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u0434\u0430\u0441\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>lxc image list<\/code>. \u0415\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u0443 <code>list<\/code> \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u2014 <code>local:<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc image list local:  +-------+-------------+--------+-------------+--------------+------+------+-------------+ | ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE | +-------+-------------+--------+-------------+--------------+------+------+-------------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u041a\u043e\u043c\u0430\u043d\u0434\u0430<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>lxc image <strong>alias<\/strong><\/td>\n<td>Manage image aliases<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>copy<\/strong><\/td>\n<td>Copy images between servers<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>delete<\/strong><\/td>\n<td>Delete images<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>edit<\/strong><\/td>\n<td>Edit image properties<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>export<\/strong><\/td>\n<td>Export and download images<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>import<\/strong><\/td>\n<td>Import images into the image store<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>info<\/strong><\/td>\n<td>Show useful information about images<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>list<\/strong><\/td>\n<td>List images<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>refresh<\/strong><\/td>\n<td>Refresh images<\/td>\n<\/tr>\n<tr>\n<td>lxc image <strong>show<\/strong><\/td>\n<td>Show image properties<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0437 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e <code>images:<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc image copy images:alpine\/3.11\/amd64 local: --alias=alpine3  Image copied successfully!<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u0435\u0434\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <code>local:<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc image -c lfdatsu list local:  +---------+--------------+------------------------------------+--------------+-----------+--------+------------------------------+ |  ALIAS  | FINGERPRINT  |            DESCRIPTION             | ARCHITECTURE |   TYPE    |  SIZE  |         UPLOAD DATE          | +---------+--------------+------------------------------------+--------------+-----------+--------+------------------------------+ | alpine3 | 73a3093d4a5c | Alpine 3.11 amd64 (20200220_13:00) | x86_64       | CONTAINER | 2.40MB | Feb 21, 2020 at 1:36pm (UTC) | +---------+--------------+------------------------------------+--------------+-----------+--------+------------------------------+<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"konfiguraciya-lxd\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f LXD<\/h2>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430, LXD \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 YAML-\u0444\u0430\u0439\u043b\u0430, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0437\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043c\u0438\u043d\u0443\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0432\u044b\u0448\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0442\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0442.\u0434. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u044c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u044d\u0442\u0438\u043c <a href=\"https:\/\/linuxcontainers.org\/lxd\/docs\/master\/preseed\" rel=\"nofollow\">\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>lxc config<\/code> \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config set images.auto_update_cached=false<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"sozdanie-i-upravlenie-konteynerom\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c<\/h1>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>lxc init<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:\u043e\u0431\u0440\u0430\u0437<\/code> \u0438 \u0437\u0430\u0442\u0435\u043c \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <code>local:<\/code> \u0442\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439. \u0415\u0441\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d, \u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0431\u0440\u0430\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u0415\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0437 \u0443\u043a\u0430\u0437\u0430\u043d \u0438\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0442\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043e\u0431\u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0435\u0440\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc init alpine3 alp --storage=hddpool --profile=default --profile=hddroot<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043a\u043b\u044e\u0447\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>alpine3<\/code> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u043b\u044c\u044f\u0441 (\u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c) \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0431\u044b\u043b \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u0415\u0441\u043b\u0438 \u0431\u044b \u0430\u043b\u044c\u044f\u0441 \u0431\u044b\u043b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430, \u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0437 \u043f\u043e \u0435\u0433\u043e <em>Fingerprint<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/li>\n<li><code>alp<\/code> \u2014 \u0417\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/li>\n<li><code>--storage<\/code> \u2014 \u042d\u0442\u043e\u0442 \u043a\u043b\u044e\u0447 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432 \u043a\u0430\u043a\u043e\u043c <em>Storage Pool<\/em> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440<\/li>\n<li><code>--profile<\/code> \u2014 \u042d\u0442\u0438 \u043a\u043b\u044e\u0447\u0438 \u043a\u0430\u0441\u043a\u0430\u0434\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c init-\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc start alp<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>lxc launch<\/code> \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>lxc init<\/code> \u0438 <code>lxc start<\/code> \u0432 \u043e\u0434\u043d\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc list -c ns46tb +------+---------+------------------+------+-----------+--------------+ | NAME |  STATE  |       IPV4       | IPV6 |   TYPE    | STORAGE POOL | +------+---------+------------------+------+-----------+--------------+ | alp  | RUNNING | 10.0.5.46 (eth0) |      | CONTAINER | hddpool      | +------+---------+------------------+------+-----------+--------------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config show alp  architecture: x86_64 config:   image.architecture: amd64   image.description: Alpine 3.11 amd64 (20200326_13:39)   image.os: Alpine   image.release: &quot;3.11&quot;   image.serial: &quot;20200326_13:39&quot;   image.type: squashfs   volatile.base_image: ebd565585223487526ddb3607f5156e875c15a89e21b61ef004132196da6a0a3   volatile.eth0.host_name: vethb1fe71d8   volatile.eth0.hwaddr: 00:16:3e:5f:73:3e   volatile.idmap.base: &quot;0&quot;   volatile.idmap.current: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.idmap.next: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.last_state.idmap: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.last_state.power: RUNNING devices:   root:     path: \/     pool: hddpool     type: disk ephemeral: false profiles: - default - hddroot stateful: false description: &quot;&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <code>profiles<\/code> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0432\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u2014 <code>default<\/code> \u0438 <code>hddroot<\/code>. \u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <code>devices<\/code> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f <code>default<\/code>. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u044e\u0447 <code>--expanded<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config show alp --expanded  architecture: x86_64 config:   image.architecture: amd64   image.description: Alpine 3.11 amd64 (20200326_13:39)   image.os: Alpine   image.release: &quot;3.11&quot;   image.serial: &quot;20200326_13:39&quot;   image.type: squashfs   volatile.base_image: ebd565585223487526ddb3607f5156e875c15a89e21b61ef004132196da6a0a3   volatile.eth0.host_name: vethb1fe71d8   volatile.eth0.hwaddr: 00:16:3e:5f:73:3e   volatile.idmap.base: &quot;0&quot;   volatile.idmap.current: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.idmap.next: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.last_state.idmap: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.last_state.power: RUNNING devices:   eth0:     name: eth0     network: lxdbr0     type: nic   root:     path: \/     pool: hddpool     type: disk ephemeral: false profiles: - default - hddroot stateful: false description: &quot;&quot;<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"ustanovka-staticheskogo-ip-adresa\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e IP \u0430\u0434\u0440\u0435\u0441\u0430<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c IP \u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 <code>eth0<\/code> \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>lxc config device set alp<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0431\u0449\u0438\u0442, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <code>eth0<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044e <code>default<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config device set alp eth0 ipv4.address 10.0.5.5  Error: The device doesn't exist<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f <code>eth0<\/code> \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435, \u043d\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0435\u0434\u0438\u043d \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config device add alp eth0 nic name=eth0 nictype=bridged parent=lxdbr0 ipv4.address=10.0.5.5<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc restart alp<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0442\u043e \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u043f\u0446\u0438\u044e <code>--expanded<\/code> \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <code>eth0<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0435\u0433\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438 \u043e\u043d\u043e \u043a\u0430\u0441\u043a\u0430\u0434\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u043b\u043e \u044d\u0442\u043e \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u044f <code>default<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config show alp  architecture: x86_64 config:   image.architecture: amd64   image.description: Alpine 3.11 amd64 (20200326_13:39)   image.os: Alpine   image.release: &quot;3.11&quot;   image.serial: &quot;20200326_13:39&quot;   image.type: squashfs   volatile.base_image: ebd565585223487526ddb3607f5156e875c15a89e21b61ef004132196da6a0a3   volatile.eth0.host_name: veth2a1dc59d   volatile.eth0.hwaddr: 00:16:3e:0e:e2:71   volatile.idmap.base: &quot;0&quot;   volatile.idmap.current: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.idmap.next: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.last_state.idmap: '[{&quot;Isuid&quot;:true,&quot;Isgid&quot;:false,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536},{&quot;Isuid&quot;:false,&quot;Isgid&quot;:true,&quot;Hostid&quot;:1000000,&quot;Nsid&quot;:0,&quot;Maprange&quot;:65536}]'   volatile.last_state.power: RUNNING devices:   eth0:     ipv4.address: 10.0.5.5     name: eth0     nictype: bridged     parent: lxdbr0     type: nic   root:     path: \/     pool: hddpool     type: disk ephemeral: false profiles: - default - hddroot stateful: false description: &quot;&quot;<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"udalenie-konteynera\">\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>lxc delete<\/code>, \u043d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>lxc stop<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc stop alp<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc list  +------+---------+-------------------+------+-----------+-----------+ | NAME |  STATE  |       IPV4        | IPV6 |   TYPE    | SNAPSHOTS | +------+---------+-------------------+------+-----------+-----------+ | alp  | STOPPED | 10.0.5.10 (eth0)  |      | CONTAINER | 0         | +------+---------+-------------------+------+-----------+-----------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u0442\u0430\u043b\u043e <em>STOPPED<\/em>, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 <em>Storage Pool<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc delete alp<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"dostup-k-konteyneru\">\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043c\u0438\u043d\u0443\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>lxc exec<\/code> \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0431\u0435\u0437 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f shell \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (pipe) \u0438 \u0442.\u0434., \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u044f\u0432\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc exec alp -- \/bin\/sh -c &quot;echo \\$HOME&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0431\u044b\u043b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <code>\\<\/code> \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u0430 <code>$<\/code> \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>$HOME<\/code> \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0430 \u0431\u044b\u043b\u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0441\u0435\u0430\u043d\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 hotkey <code>CTRL+D<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc exec alp -- \/bin\/sh<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"upravlenie-resursami-konteynera\">\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n<p>  <\/p>\n<p>\u0412 LXD \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/linuxcontainers.org\/lxd\/docs\/master\/instances#key\/value-configuration\" rel=\"nofollow\">\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"ogranichenie-resursov-ram-ozu\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 RAM (\u041e\u0417\u0423)<\/h3>\n<p>  <\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>limits.memory<\/code> \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u0451\u043c RAM \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e \u0438 \u043e\u0434\u0438\u043d \u0438\u0437 <a href=\"https:\/\/linuxcontainers.org\/lxd\/docs\/master\/instances#units-for-storage-and-network-limits\" rel=\"nofollow\">\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u0432<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u044a\u0451\u043c RAM \u0440\u0430\u0432\u043d\u044b\u0439 256 MB:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config set alp limits.memory 256MB<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>limits.memory.enforce<\/code><\/li>\n<li><code>limits.memory.hugepages<\/code><\/li>\n<li><code>limits.memory.swap<\/code><\/li>\n<li><code>limits.memory.swap.priority<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>lxc config show<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0432\u0441\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config show alp  architecture: x86_64 config:   image.architecture: amd64   image.description: Alpine 3.11 amd64 (20200220_13:00)   image.os: Alpine   image.release: &quot;3.11&quot;   image.serial: &quot;20200220_13:00&quot;   image.type: squashfs   limits.memory: 256MB   volatile.base_image: 73a3093d4a5ce0148fd84b95369b3fbecd19a537ddfd2e2d20caa2eef0e8fd60   volatile.eth0.host_name: veth75b6df07   volatile.eth0.hwaddr: 00:16:3e:a1:e7:46   volatile.idmap.base: &quot;0&quot;   volatile.idmap.current: '[]'   volatile.idmap.next: '[]'   volatile.last_state.idmap: '[]'   volatile.last_state.power: RUNNING devices: {} ephemeral: false profiles: - default stateful: false description: &quot;&quot;<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"ogranichenie-resursov-cpu-cp\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 CPU (\u0426\u041f)<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0426\u041f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/linuxcontainers.org\/lxd\/docs\/master\/instances#cpu-limits\" rel=\"nofollow\">\u0442\u0438\u043f\u043e\u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439<\/a>:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>limit.cpu<\/code> \u2014 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u044f\u0434\u0440\u0430\u043c \u0426\u041f<\/li>\n<li><code>limits.cpu.allowance<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u0438\u0431\u043e \u043a\u0432\u043e\u0442\u0430\u043c\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 CFS, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0448\u043b\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043b\u0438\u0431\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 CPU, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0448\u043b\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/li>\n<li><code>limits.cpu.priority<\/code> \u2014 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432, \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config set alp limits.cpu.allowance 40%<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config show alp  architecture: x86_64 config:   image.architecture: amd64   image.description: Alpine 3.11 amd64 (20200220_13:00)   image.os: Alpine   image.release: &quot;3.11&quot;   image.serial: &quot;20200220_13:00&quot;   image.type: squashfs   limits.cpu.allowance: 40%   limits.memory: 256MB   volatile.base_image: 73a3093d4a5ce0148fd84b95369b3fbecd19a537ddfd2e2d20caa2eef0e8fd60   volatile.eth0.host_name: veth75b6df07   volatile.eth0.hwaddr: 00:16:3e:a1:e7:46   volatile.idmap.base: &quot;0&quot;   volatile.idmap.current: '[]'   volatile.idmap.next: '[]'   volatile.last_state.idmap: '[]'   volatile.last_state.power: RUNNING devices: {} ephemeral: false profiles: - default stateful: false description: &quot;&quot;<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"ogranichenie-diskovogo-prostranstva\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430<\/h3>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <code>limits.read<\/code>, <code>limits.write<\/code> \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0451\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 (\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 ZFS \u0438\u043b\u0438 BTRFS):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config device set alp root size=2GB<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <code>devices.root.size<\/code> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u0441\u044f \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc config show alp ... devices:   root:     path: \/     pool: hddpool     size: 2GB     type: disk ephemeral: false profiles: - default - hddroot stateful: false description: &quot;&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u0432\u043e\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>lxc info<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc info alp ... Resources:   Processes: 5   Disk usage:     root: 1.05GB   CPU usage:     CPU usage (in seconds): 1   Memory usage:     Memory (current): 5.46MB   Network usage:     eth0:       Bytes received: 802B       Bytes sent: 1.59kB       Packets received: 4       Packets sent: 14     lo:       Bytes received: 0B       Bytes sent: 0B       Packets received: 0       Packets sent: 0<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 2GB, \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>df<\/code> \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0435\u0441\u0442 \u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c 2 \u043d\u043e\u0432\u044b\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 <em>Storage Pool<\/em> (hddpool):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc init alpine3 alp1 --storage=hddpool --profile=default --profile=hddroot lxc init alpine3 alp2 --storage=hddpool --profile=default --profile=hddroot<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc list +------+---------+------------------+------+-----------+-----------+ | NAME |  STATE  |       IPV4       | IPV6 |   TYPE    | SNAPSHOTS | +------+---------+------------------+------+-----------+-----------+ | alp1 | RUNNING | 10.0.5.46 (eth0) |      | CONTAINER | 0         | +------+---------+------------------+------+-----------+-----------+ | alp2 | RUNNING | 10.0.5.30 (eth0) |      | CONTAINER | 0         | +------+---------+------------------+------+-----------+-----------+<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1GB:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc exec alp1 -- dd if=\/dev\/urandom of=file.img bs=1M count=1000<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0441\u043e\u0437\u0434\u0430\u043d:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">lxc exec alp1 -- ls -lh total 1000M   -rw-r--r--    1 root     root     1000.0M Mar 27 10:16 file.img<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u0430\u043c\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 <em>Storage Volume<\/em> \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 <em>Storage Pool<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc exec alp2 -- ls -lh total 0<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0434\u0430\u0435\u0442 <code>df<\/code> \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0434\u0440\u0443\u0433\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc exec alp1 -- df -hT Filesystem           Type            Size      Used Available Use% Mounted on \/dev\/loop1           btrfs           9.3G   1016.4M      7.8G  11% \/ ...<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc exec alp2 -- df -hT Filesystem           Type            Size      Used Available Use% Mounted on \/dev\/loop1           btrfs           9.3G   1016.4M      7.8G  11% \/ ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <code>\/dev\/loop1<\/code> \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043a\u0430\u043a \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>Storage Pool<\/em> \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044d\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442 \u0435\u0433\u043e \u043e\u0431\u044a\u0451\u043c \u043d\u0430 \u0434\u0432\u043e\u0438\u0445.<\/p>\n<p>  <\/p>\n<h3 id=\"statistika-potrebleniya-resursov\">\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc info alp  Name: alp Location: none Remote: unix:\/\/ Architecture: x86_64 Created: 2020\/04\/08 18:05 UTC Status: Running Type: container Profiles: default, hddroot Pid: 19219 Ips:   eth0: inet    10.0.5.5        veth2a1dc59d   eth0: inet6   fe80::216:3eff:fe0e:e271        veth2a1dc59d   lo:   inet    127.0.0.1   lo:   inet6   ::1 Resources:   Processes: 5   Disk usage:     root: 495.62kB   CPU usage:     CPU usage (in seconds): 1   Memory usage:     Memory (current): 4.79MB   Network usage:     eth0:       Bytes received: 730B       Bytes sent: 1.59kB       Packets received: 3       Packets sent: 14     lo:       Bytes received: 0B       Bytes sent: 0B       Packets received: 0       Packets sent: 0<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"rabota-so-snepshotami\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043d\u0435\u043f\u0448\u043e\u0442\u0430\u043c\u0438<\/h2>\n<p>  <\/p>\n<p>\u0412 LXD \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437 \u043d\u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043d\u0435\u043f\u0448\u043e\u0442, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc snapshot alp alp_snapshot1<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>lxc snapshot<\/code> \u043d\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0430 <code>list<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043d\u0435\u043f\u0448\u043e\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u044b\u0432\u043e\u0434\u044f\u0449\u0435\u0439 \u043e\u0431\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc info alp ... ... Snapshots:   alp_snapshot1 (taken at 2020\/04\/08 18:18 UTC) (stateless)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438\u0437 \u0441\u043d\u0435\u043f\u0448\u043e\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>lxc restore<\/code> \u0443\u043a\u0430\u0437\u0430\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c \u0441\u043d\u0435\u043f\u0448\u043e\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc restore alp alp_snapshot1<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0441\u043d\u0435\u043f\u0448\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u2014 <code>lxc delete {container}\/snapshot-name}<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">lxc delete alp\/alp_snapshot1<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 stateless-\u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b. \u0412 LXD \u0435\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432 \u2014 stateful, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0421\u043e stateful-\u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430\u043c\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0440\u044f\u0434 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>  <\/p>\n<h1 id=\"chto-eschyo\">\u0427\u0442\u043e \u0435\u0449\u0451?<\/h1>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043b\u044f Python \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/pylxd.readthedocs.io\" rel=\"nofollow\">PyLXD<\/a> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 API \u043a LXD<\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/496492\/\"> https:\/\/habr.com\/ru\/post\/496492\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/496492\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jj\/qk\/qa\/jjqkqae2fpn42rq5ar3ukcjau1a.png\"><\/p>\n<p>  <\/p>\n<p><strong>LXD<\/strong> \u2014 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0433\u043b\u0430\u0441\u0438\u0442 <a href=\"https:\/\/linuxcontainers.org\/lxd\/introduction\/\" rel=\"nofollow\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a>. \u041e\u043d \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b Linux.<\/p>\n<p>  <\/p>\n<p><strong>\u042f\u0434\u0440\u043e LXD<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0435\u043c\u043e\u043d (\u0441\u0435\u0440\u0432\u0438\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 root), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 REST API \u0447\u0435\u0440\u0435\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 unix \u0441\u043e\u043a\u0435\u0442, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f. \u041a\u043b\u0438\u0435\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0441 \u0441\u0430\u043c\u0438\u043c LXD \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 REST API. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0435\u0441\u044c \u043b\u0438 \u0432\u044b \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0445\u043e\u0441\u0442\u0443 \u0438\u043b\u0438 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u0445 LXD, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0435\u0434\u0430\u0432\u043d\u044e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 LXD \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d QEMU \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0443\u0437\u043d\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0443\u043b\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449, \u0441\u0435\u0442\u044c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043b\u0438\u043c\u0438\u0442\u044b \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u0435\u043f\u0448\u043e\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e LXD \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0432 Linux.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-301605","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=301605"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301605\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}