「Incus」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(関連記事を更新)
(→‎インストール: リンクを修正)
(同じ利用者による、間の8版が非表示)
1行目: 1行目:
[[Category:Virtualization]]
+
[[Category:仮想化]]
 
[[en:Incus]]
 
[[en:Incus]]
 
[[es:Incus]]
 
[[es:Incus]]
7行目: 7行目:
 
{{Related articles end}}
 
{{Related articles end}}
   
'''[https://linuxcontainers.org/incus/introduction/ Incus]''' is a manager/hypervisor for containers (via [[LXC]]) and virtual-machines (via [[QEMU]]).
+
'''[https://linuxcontainers.org/incus/introduction/ Incus]''' はコンテナ ( [[LXC]] 経由) と仮想マシン ( [[QEMU]] 経由) の管理/ハイパーバイザーです。
   
  +
これは元の保守者による [https://ubuntu.com/lxd LXD] のフォークです。[[LXD]] Wiki ページのドキュメントはまだ大部分が関連しており、読むことを推奨します。
It is a fork of [https://ubuntu.com/lxd LXD] by the original maintainers. Documentation from the [[LXD]] wiki page is still largely relevant and encouraged reading.
 
   
== Installation ==
+
== インストール ==
   
[[Install]] the {{Pkg|incus}} package, then [[enable]] the {{ic|incus.socket}}.
+
{{Pkg|incus}} パッケージを[[インストール]]し、{{ic|incus.socket}}を[[有効化]]します。
   
  +
また、例えばインスタンスを自動起動させたい場合は、{{ic|incus.service}} を直接、[[有効化/起動]]することもできます。
Alternatively, you can [[enable/start]] the {{ic|incus.service}} directly, in case you want instances to autostart for example.
 
   
  +
コンテナ作成をユーザーに委任するには、{{ic|incus-user.socket}} ユニットを[[有効化/起動]]します。グループ委任については [[#非特権ユーザーとして Incus にアクセスする]]を参照してください。
To delegate container creation to users, [[enable/start]] the {{ic|incus-user.socket}} unit. See [[#Accessing Incus as an unprivileged user]] for group delegation.
 
   
=== Migrating from LXD ===
+
=== LXD からの移行 ===
   
  +
既存の LXD インストールから移行する場合は、この時点で行う必要があります。移行ツールは空のターゲット Incus サーバーに対してのみ実行されるためです。
If you wish to migrate from an existing LXD installation, you should do so at this point, as the migration tool will only run against an empty target Incus server.
 
   
After verifying that both the {{ic|lxc info}} and {{ic|incus info}} commands are running correctly, read the upstream [https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/ documentation] about the process, and afterwards run the migration tool:
+
{{ic|lxc info}} {{ic|incus info}} コマンドが正しく動作していることを確認した後、上流の [https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/ documentation] を読み、その後で移行ツールを実行してください:
   
 
# lxd-to-incus
 
# lxd-to-incus
   
== Configuration ==
+
== 設定 ==
   
=== Unprivileged containers ===
+
=== 非特権コンテナ ===
   
  +
非特権コンテナの使用を推奨します (違いの説明については [[Linux コンテナ#特権コンテナと非特権コンテナ]] を参照)。
It is recommended to use unprivileged containers (See [[Linux Containers#Privileged or unprivileged containers]] for an explanation of the difference).
 
   
  +
これを行うには、コンテナ化された uid/gid ペアに対するマッピングを含むように {{ic|/etc/subuid}} と {{ic|/etc/subgid}} (これらのファイルが存在しない場合は作成する) を変更します。以下の例は単に root ユーザー (および systemd システムユニット) 用です:
For this, modify both {{ic|/etc/subuid}} and {{ic|/etc/subgid}} (if these files are not present, create them) to contain the mapping to the containerized uid/gid pairs for each user who shall be able to run the containers. The example below is simply for the root user (and systemd system unit):
 
   
You can either use {{ic|usermod}} as follows:
+
以下のように {{ic|usermod}} を使用することもできます:
   
 
{{ic|usermod -v 1000000-1000999999 -w 1000000-1000999999 root}}
 
{{ic|usermod -v 1000000-1000999999 -w 1000000-1000999999 root}}
   
  +
または、上記のファイルを直接以下のように変更します:
Or modify the above mentioned files directly as follows:
 
   
 
{{hc|/etc/subuid|
 
{{hc|/etc/subuid|
49行目: 49行目:
 
}}
 
}}
   
  +
これで、すべてのコンテナはデフォルトで{{ic|非特権}}で起動されます。
Now, every container will be started {{ic|unprivileged}} by default.
 
   
  +
代替案については [[LXD#特権コンテナ]] を参照してください。
For the alternative, see [[LXD#Privileged containers]].
 
   
=== Configure Incus ===
+
=== Incus の設定 ===
   
  +
最初の起動時に、Incus を設定する必要があります。
On the first start, Incus needs to be configured.
 
   
  +
root として実行:
Run as root:
 
   
 
# incus admin init
 
# incus admin init
   
  +
これにより、ストレージ、ネットワークなどの異なるトピックをカバーする対話式の設定ガイドがターミナルで開始されます。
This will start an interactive configuration guide in the terminal, that covers different topics like storages, networks etc. <br>
 
You can find an overview in the official [https://linuxcontainers.org/incus/docs/main/tutorial/first_steps/ Getting Started Guide].
 
   
  +
公式の [https://linuxcontainers.org/incus/docs/main/tutorial/first_steps/ Getting Started Guide] で概要を確認できます。
=== Accessing Incus as an unprivileged user ===
 
   
  +
=== 非特権ユーザーとして Incus にアクセスする ===
Incus defines two user groups:
 
   
  +
Incus は2つのユーザーグループを定義しています:
* {{ic|incus}} "allows basic user access, no configuration and all actions restricted to a per-user project."
 
* {{ic|incus-admin}} "allows full control over Incus."
 
   
  +
* {{ic|incus}} "基本的なユーザーアクセスを許可し、設定なしで全てのアクションはユーザープロジェクトごとに制限されます。"
To control Incus without having to run all commands as root, [[Users and groups#Group management|add your user]] to these groups.
 
  +
* {{ic|incus-admin}} "Incus の完全な制御を許可します。"
   
  +
すべてのコマンドを root として実行する必要なく Incus を制御するためには、[[ユーザーとグループ#グループ管理|あなたのユーザー]]をこれらのグループに追加します。
{{Warning|Anyone added to the {{ic|incus-admin}} group is root equivalent. For more information, see [https://github.com/lxc/incus#security] and [https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1829071].}}
 
   
  +
{{Warning|{{ic|incus-admin}} グループに追加された人は root と同等です。詳細は [https://github.com/lxc/incus#security] と [https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1829071] を参照してください。}}
== Usage ==
 
   
  +
== 使用方法 ==
=== Overview of commands ===
 
   
  +
=== コマンドの概要 ===
You can get an overview of all available commands by typing:
 
  +
  +
使用可能なすべてのコマンドの概要を表示するには、以下を入力します:
   
 
$ incus
 
$ incus
   
=== Create a container ===
+
=== コンテナの作成 ===
   
  +
{{ic|incus launch}} を使用してコンテナを作成できます。例えば:
You can create a container with {{ic|incus launch}}, for example:
 
   
 
$ incus launch ubuntu:20.04
 
$ incus launch ubuntu:20.04
   
  +
コンテナはイメージサーバーまたはリモート LXD サーバーからダウンロードされたイメージに基づいています。
Container are based on images, that are downloaded from image servers or remote LXD servers.
 
   
  +
既に追加されたサーバーのリストを表示するには:
You can see the list of already added servers with:
 
   
 
$ incus remote list
 
$ incus remote list
   
You can list all images on a server with {{ic|incus image list}}, for example:
+
サーバー上のすべてのイメージをリストするには {{ic|incus image list}} を使用します。例えば:
   
 
$ incus image list images:
 
$ incus image list images:
   
This will show you all images on one of the default servers: [https://images.linuxcontainers.org images.linuxcontainers.org]
+
これにより、デフォルトサーバーの一つである [https://images.linuxcontainers.org images.linuxcontainers.org] のすべてのイメージが表示されます。
   
  +
ディストリビューション名などの用語を追加してイメージを検索することもできます:
You can also search for images by adding terms like the distribution name:
 
   
 
$ incus image list images:debian
 
$ incus image list images:debian
   
  +
特定のサーバーからのイメージでコンテナを起動するには:
Launch a container with an image from a specific server with:
 
   
 
$ incus launch servername:imagename
 
$ incus launch servername:imagename
   
  +
例えば:
For example:
 
   
 
$ incus launch images:centos/8/amd64 centos
 
$ incus launch images:centos/8/amd64 centos
   
To create an amd64 Arch container:
+
amd64 Arch コンテナを作成するには:
   
 
$ incus launch images:archlinux/current/amd64 arch
 
$ incus launch images:archlinux/current/amd64 arch
   
== Tips and tricks ==
+
== ヒントとコツ ==
   
  +
=== ホスト上で名前でコンテナにアクセスする ===
=== Access the containers by name on the host ===
 
   
This assumes that you are using the default bridge that it is named {{ic|incusbr0}} and that you are using [[systemd-resolved]].
+
これは、デフォルトのブリッジが {{ic|incusbr0}} という名前であり、[[systemd-resolved]] を使用していると仮定しています。
   
 
# systemd-resolve --interface incusbr0 --set-domain '~incus' --set-dns $(incus network get incusbr0 ipv4.address | cut -d / -f 1)
 
# systemd-resolve --interface incusbr0 --set-domain '~incus' --set-dns $(incus network get incusbr0 ipv4.address | cut -d / -f 1)
   
  +
これで、名前でコンテナにアクセスできるようになります:
You can now access the containers by name:
 
   
 
$ ping ''containername''.incus
 
$ ping ''containername''.incus
   
  +
== トラブルシューティング ==
== Troubleshooting ==
 
   
  +
=== 仮想マシンの起動に失敗する ===
=== Starting a virtual machine fails ===
 
   
  +
以下のエラーが表示された場合:
If you see the error:
 
   
 
Error: Couldn't find one of the required UEFI firmware files: [{code:OVMF_CODE.4MB.fd vars:OVMF_VARS.4MB.ms.fd} {code:OVMF_CODE.2MB.fd vars:OVMF_VARS.2MB.ms.fd} {code:OVMF_CODE.fd vars:OVMF_VARS.ms.fd} {code:OVMF_CODE.fd vars:qemu.nvram}]
 
Error: Couldn't find one of the required UEFI firmware files: [{code:OVMF_CODE.4MB.fd vars:OVMF_VARS.4MB.ms.fd} {code:OVMF_CODE.2MB.fd vars:OVMF_VARS.2MB.ms.fd} {code:OVMF_CODE.fd vars:OVMF_VARS.ms.fd} {code:OVMF_CODE.fd vars:qemu.nvram}]
   
  +
これは、Arch Linux がセキュアブート署名された ovmf ファームウェアを配布していないためです。仮想マシンを起動するためには、現時点ではセキュアブートを無効にする必要があります:
It's because Arch Linux does not distribute secure boot signed ovmf firmware. To boot virtual machines, you need to disable secure boot for the time being:
 
   
 
$ incus launch ubuntu:18.04 test-vm --vm -c security.secureboot=false
 
$ incus launch ubuntu:18.04 test-vm --vm -c security.secureboot=false
   
  +
これをデフォルトプロファイルに追加する方法は以下の通りです:
This can also be added to the default profile by doing:
 
   
 
$ incus profile set default security.secureboot=false
 
$ incus profile set default security.secureboot=false
   
=== Incus does not respect Shell's environment proxy variables ===
+
=== Incus Shell の環境プロキシ変数を尊重しない ===
   
Examples are {{ic|incus launch}} or {{ic|incus image}} commands not using value of {{ic|*_proxy}}/{{ic|*_PROXY}} [[variable|variables]] when downloading images.
+
例えば {{ic|incus launch}} {{ic|incus image}} コマンドがイメージをダウンロードする際に {{ic|*_proxy}}/{{ic|*_PROXY}} [[変数]]の値を使用していません。
   
Incus implements a server-client paradigm. It simply means that operations are done by {{ic|incusd}} acting as the [https://linuxcontainers.org/incus/docs/main/server Incus server] usually running in the background, unless invoked from an interactive shell. And {{ic|incus}} commandline interface is used to communicate with Incus server acting as the [https://linuxcontainers.org/incus/docs/main/client Incus client].
+
Incus はサーバークライアントパラダイムを採用しています。これは、操作が [https://linuxcontainers.org/incus/docs/main/server Incus server] として機能する {{ic|incusd}} によって行われ、対話型シェルから呼び出されない限り通常はバックグラウンドで実行されることを意味します。そして、{{ic|incus}} コマンドラインインターフェイスは [https://linuxcontainers.org/incus/docs/main/client Incus client] として Incus サーバーと通信するために使用されます。
   
That makes {{ic|incusd}}, typically started as a service, not inheriting shell's environment variables of the client. But respecting variables of the environment that it's invoked from, instead.[https://linuxcontainers.org/incus/docs/main/environment] In Arch Linux, Incus server is started by systemd.
+
これにより、通常サービスとして開始される {{ic|incusd}} は、クライアントのシェルの環境変数を継承せず、代わりに呼び出された環境の変数を尊重します。[https://linuxcontainers.org/incus/docs/main/environment] Arch Linux では、Incus サーバーは systemd によって開始されます。
   
  +
この問題には多くの回避策があります。いくつかの例を以下に示します。詳細は Incus の [https://github.com/lxc/incus/issues/574 issue#574] を参照してください。
There can be many workarounds to this difficulty, following exist some examples. See Incus's [https://github.com/lxc/incus/issues/574 issue#574] for more information.
 
   
==== Temporary ====
+
==== 一時的 ====
   
===== Import Shell variables to systemd's environment =====
+
===== Shell 変数を systemd の環境にインポートする =====
   
  +
まず、{{ic|*_PROXY}} 変数を[[環境変数#セッションまたはシェルごと|エクスポート]]します:
First, [[Environment variables#Per session or shell|export]] {{ic|*_PROXY}} variables:
 
   
 
$ export ''ALL''_PROXY="socks://''proxy_server_address'':''port''/"
 
$ export ''ALL''_PROXY="socks://''proxy_server_address'':''port''/"
   
  +
これらを systemd の環境にインポートします:
Import them to systemd's environment:
 
   
 
# systemctl import-environment ''ALL''_PROXY
 
# systemctl import-environment ''ALL''_PROXY
   
[[start|Re/start]] {{ic|incus.service}} unit.
+
{{ic|incus.service}} ユニットを[[起動|再/起動]]します。
   
{{tip|Use {{ic|systemctl unset-environment}} command to unset a variable and [[restart]] the service.}}
+
{{tip|変数を解除するには {{ic|systemctl unset-environment}} コマンドを使用し、サービスを[[再起動]]してください。}}
   
==== Persistent ====
+
==== 恒久的 ====
   
===== Edit incus service unit =====
+
===== incus サービスユニットを編集する =====
   
If you want Incus daemon to always start with some static environment variables, like {{ic|*_proxy}}, you can use {{ic|Environment}} directive of [[systemd]]. {{ic|systemctl set-property}} command cannot manipulate {{ic|Environment}} directive. [[Edit]] {{ic|incus.service}} and add {{ic|Environment}} key with appropriate {{ic|variable{{=}}value}} pair. For example:
+
Incus デーモンが一部の静的環境変数、例えば {{ic|*_proxy}} で常に起動するようにしたい場合、[[systemd]] {{ic|Environment}} ディレクティブを使用できます。{{ic|systemctl set-property}} コマンドでは {{ic|Environment}} ディレクティブを操作することはできません。{{ic|incus.service}} を[[編集]] し、適切な {{ic|1=variable=value}} ペアを含む {{ic|Environment}} キーを追加します。例えば:
   
{{hc|# systemctl edit incus.service|
+
{{hc|1=# systemctl edit incus.service|
...
+
2=...
   
 
[Service]
 
[Service]
Environment{{=}}''ALL''_PROXY{{=}}"socks://''proxy_server_address'':''port''/"
+
Environment=''ALL''_PROXY="socks://''proxy_server_address'':''port''/"
   
 
...}}
 
...}}
   
===== Use Incus core.proxy options =====
+
===== Incus core.proxy オプションを使用する =====
   
One can make Incus server use a desired proxy with [https://linuxcontainers.org/incus/docs/main/howto/server_configure/ configuring] Incus's server with [https://linuxcontainers.org/incus/docs/main/server_config/#server-core:core.proxy_http core.proxy] options. For instance:
+
Incus サーバーが望むプロキシを使用するようにするには、[https://linuxcontainers.org/incus/docs/main/howto/server_configure/ Incus サーバーを設定]する際に [https://linuxcontainers.org/incus/docs/main/server_config/#server-core:core.proxy core.proxy] オプションを使用します。例えば:
   
 
# incus config set core.proxy_http "''proxy_address'':''proxy_port''"
 
# incus config set core.proxy_http "''proxy_address'':''proxy_port''"
   
  +
{{note|{{ic|core.proxy}} オプションはグローバルスコープを持ちます。つまり、クラスタメンバーに即座に適用されます。}}
{{note|{{ic|core.proxy}} options have global scopes. I.e. they apply to cluster members, immediately.}}
 
   
  +
== アンインストール ==
== Uninstall ==
 
   
  +
サービスを[[停止]]して無効にし、その後 {{Pkg|incus}} パッケージを[[アンインストール]]します。
[[Stop]] and disable the services. Then [[uninstall]] the {{Pkg|incus}} package.
 
   
  +
すべてのデータを削除したい場合:
If you want to remove all data:
 
   
 
# rm -r /var/lib/incus
 
# rm -r /var/lib/incus
   
  +
例示したネットワーク設定を使用していた場合は、それも削除する必要があります。
If you used any of the example networking configuration, you should remove those as well.
 
  +
  +
== 参照 ==
   
  +
* [https://linuxcontainers.org/incus/ Incus の公式ホームページ]
== See also ==
 
  +
* [https://linuxcontainers.org/incus/docs/main/ 公式ドキュメント]
  +
* [https://linuxcontainers.org/incus/docs/main/tutorial/first_steps/ 初心者ガイド]
  +
* [https://discuss.linuxcontainers.org/ 公式フォーラム]
  +
* [https://github.com/lxc/incus Incus の GitHub リポジトリ]
   
  +
{{TranslationStatus|Incus|2024-05-12|803506}}
* [https://linuxcontainers.org/incus/ The official Incus homepage]
 
* [https://linuxcontainers.org/incus/docs/main/ Official documentation]
 
* [https://linuxcontainers.org/incus/docs/main/tutorial/first_steps/ Getting Started Guide]
 
* [https://discuss.linuxcontainers.org/ Official Forum]
 
* [https://github.com/lxc/incus The Incus GitHub repository]
 

2024年5月11日 (土) 15:49時点における版

関連記事

Incus はコンテナ ( LXC 経由) と仮想マシン ( QEMU 経由) の管理/ハイパーバイザーです。

これは元の保守者による LXD のフォークです。LXD Wiki ページのドキュメントはまだ大部分が関連しており、読むことを推奨します。

インストール

incus パッケージをインストールし、incus.socket有効化します。

また、例えばインスタンスを自動起動させたい場合は、incus.service を直接、有効化/起動することもできます。

コンテナ作成をユーザーに委任するには、incus-user.socket ユニットを有効化/起動します。グループ委任については #非特権ユーザーとして Incus にアクセスするを参照してください。

LXD からの移行

既存の LXD インストールから移行する場合は、この時点で行う必要があります。移行ツールは空のターゲット Incus サーバーに対してのみ実行されるためです。

lxc infoincus info コマンドが正しく動作していることを確認した後、上流の documentation を読み、その後で移行ツールを実行してください:

# lxd-to-incus

設定

非特権コンテナ

非特権コンテナの使用を推奨します (違いの説明については Linux コンテナ#特権コンテナと非特権コンテナ を参照)。

これを行うには、コンテナ化された uid/gid ペアに対するマッピングを含むように /etc/subuid/etc/subgid (これらのファイルが存在しない場合は作成する) を変更します。以下の例は単に root ユーザー (および systemd システムユニット) 用です:

以下のように usermod を使用することもできます:

usermod -v 1000000-1000999999 -w 1000000-1000999999 root

または、上記のファイルを直接以下のように変更します:

/etc/subuid
root:1000000:1000000000
/etc/subgid
root:1000000:1000000000

これで、すべてのコンテナはデフォルトで非特権で起動されます。

代替案については LXD#特権コンテナ を参照してください。

Incus の設定

最初の起動時に、Incus を設定する必要があります。

root として実行:

# incus admin init

これにより、ストレージ、ネットワークなどの異なるトピックをカバーする対話式の設定ガイドがターミナルで開始されます。

公式の Getting Started Guide で概要を確認できます。

非特権ユーザーとして Incus にアクセスする

Incus は2つのユーザーグループを定義しています:

  • incus "基本的なユーザーアクセスを許可し、設定なしで全てのアクションはユーザープロジェクトごとに制限されます。"
  • incus-admin "Incus の完全な制御を許可します。"

すべてのコマンドを root として実行する必要なく Incus を制御するためには、あなたのユーザーをこれらのグループに追加します。

警告: incus-admin グループに追加された人は root と同等です。詳細は [1][2] を参照してください。

使用方法

コマンドの概要

使用可能なすべてのコマンドの概要を表示するには、以下を入力します:

$ incus

コンテナの作成

incus launch を使用してコンテナを作成できます。例えば:

$ incus launch ubuntu:20.04

コンテナはイメージサーバーまたはリモート LXD サーバーからダウンロードされたイメージに基づいています。

既に追加されたサーバーのリストを表示するには:

$ incus remote list

サーバー上のすべてのイメージをリストするには incus image list を使用します。例えば:

$ incus image list images:

これにより、デフォルトサーバーの一つである images.linuxcontainers.org のすべてのイメージが表示されます。

ディストリビューション名などの用語を追加してイメージを検索することもできます:

$ incus image list images:debian

特定のサーバーからのイメージでコンテナを起動するには:

$ incus launch servername:imagename

例えば:

$ incus launch images:centos/8/amd64 centos

amd64 Arch コンテナを作成するには:

$ incus launch images:archlinux/current/amd64 arch

ヒントとコツ

ホスト上で名前でコンテナにアクセスする

これは、デフォルトのブリッジが incusbr0 という名前であり、systemd-resolved を使用していると仮定しています。

# systemd-resolve --interface incusbr0 --set-domain '~incus' --set-dns $(incus network get incusbr0 ipv4.address | cut -d / -f 1)

これで、名前でコンテナにアクセスできるようになります:

$ ping containername.incus

トラブルシューティング

仮想マシンの起動に失敗する

以下のエラーが表示された場合:

Error: Couldn't find one of the required UEFI firmware files: [{code:OVMF_CODE.4MB.fd vars:OVMF_VARS.4MB.ms.fd} {code:OVMF_CODE.2MB.fd vars:OVMF_VARS.2MB.ms.fd} {code:OVMF_CODE.fd vars:OVMF_VARS.ms.fd} {code:OVMF_CODE.fd vars:qemu.nvram}]

これは、Arch Linux がセキュアブート署名された ovmf ファームウェアを配布していないためです。仮想マシンを起動するためには、現時点ではセキュアブートを無効にする必要があります:

$ incus launch ubuntu:18.04 test-vm --vm -c security.secureboot=false

これをデフォルトプロファイルに追加する方法は以下の通りです:

$ incus profile set default security.secureboot=false

Incus が Shell の環境プロキシ変数を尊重しない

例えば incus launchincus image コマンドがイメージをダウンロードする際に *_proxy/*_PROXY 変数の値を使用していません。

Incus はサーバークライアントパラダイムを採用しています。これは、操作が Incus server として機能する incusd によって行われ、対話型シェルから呼び出されない限り通常はバックグラウンドで実行されることを意味します。そして、incus コマンドラインインターフェイスは Incus client として Incus サーバーと通信するために使用されます。

これにより、通常サービスとして開始される incusd は、クライアントのシェルの環境変数を継承せず、代わりに呼び出された環境の変数を尊重します。[3] Arch Linux では、Incus サーバーは systemd によって開始されます。

この問題には多くの回避策があります。いくつかの例を以下に示します。詳細は Incus の issue#574 を参照してください。

一時的

Shell 変数を systemd の環境にインポートする

まず、*_PROXY 変数をエクスポートします:

$ export ALL_PROXY="socks://proxy_server_address:port/"

これらを systemd の環境にインポートします:

# systemctl import-environment ALL_PROXY

incus.service ユニットを再/起動します。

ヒント: 変数を解除するには systemctl unset-environment コマンドを使用し、サービスを再起動してください。

恒久的

incus サービスユニットを編集する

Incus デーモンが一部の静的環境変数、例えば *_proxy で常に起動するようにしたい場合、systemdEnvironment ディレクティブを使用できます。systemctl set-property コマンドでは Environment ディレクティブを操作することはできません。incus.service編集 し、適切な variable=value ペアを含む Environment キーを追加します。例えば:

# systemctl edit incus.service
...

[Service]
Environment=ALL_PROXY="socks://proxy_server_address:port/"

...
Incus core.proxy オプションを使用する

Incus サーバーが望むプロキシを使用するようにするには、Incus サーバーを設定する際に core.proxy オプションを使用します。例えば:

# incus config set core.proxy_http "proxy_address:proxy_port"
ノート: core.proxy オプションはグローバルスコープを持ちます。つまり、クラスタメンバーに即座に適用されます。

アンインストール

サービスを停止して無効にし、その後 incus パッケージをアンインストールします。

すべてのデータを削除したい場合:

# rm -r /var/lib/incus

例示したネットワーク設定を使用していた場合は、それも削除する必要があります。

参照

翻訳ステータス: このページは en:Incus の翻訳バージョンです。最後の翻訳日は 2024-05-12 です。もし英語版に 変更 があれば、翻訳の同期を手伝うことができます。