インスタンスオプション

インスタンスオプションはインスタンスに直接関係する設定オプションです。

インスタンスオプションをどのように設定するかの手順はインスタンスオプションを設定するを参照してください。

key/value 形式の設定は、名前空間で分けられています。 以下のオプションが利用できます:

各オプションに型が定義されていますが、すべての値は文字列として保管され、REST API で文字列としてエクスポートされる(こうすることで後方互換性を壊すことなく任意の追加の値をサポートできます)ことに注意してください。

その他のオプション

以下のセクションに一覧表示される設定オプションに加えて、以下のインスタンスオプションがサポートされます:

agent.nic_config

Whether to use the name and MTU of the default network interfaces

Key: agent.nic_config
Type:

bool

Default:

false

Live update:

no

Condition:

virtual machine

For containers, the name and MTU of the default network interfaces is used for the instance devices. For virtual machines, set this option to true to set the name and MTU of the default network interfaces to be the same as the instance devices.

cluster.evacuate

What to do when evacuating the instance

Key: cluster.evacuate
Type:

string

Default:

auto

Live update:

no

The cluster.evacuate provides control over how instances are handled when a cluster member is being evacuated.

Available Modes:

  • auto (default): The system will automatically decide the best evacuation method based on the instance's type and configured devices:

    • If any device is not suitable for migration, the instance will not be migrated (only stopped).

    • Live migration will be used only for virtual machines with the migration.stateful setting enabled and for which all its devices can be migrated as well.

  • live-migrate: Instances are live-migrated to another server. This means the instance remains running and operational during the migration process, ensuring minimal disruption.

  • migrate: In this mode, instances are migrated to another server in the cluster. The migration process will not be live, meaning there will be a brief downtime for the instance during the migration.

  • stop: Instances are not migrated. Instead, they are stopped on the current server.

  • stateful-stop: Instances are not migrated. Instead, they are stopped on the current server but with their runtime state (memory) stored on disk for resuming on restore.

  • force-stop: Instances are not migrated. Instead, they are forcefully stopped.

See クラスタメンバーの退避と復元 for more information.

linux.kernel_modules

Kernel modules to load before starting the instance

Key: linux.kernel_modules
Type:

string

Live update:

yes

Condition:

container

Specify the kernel modules as a comma-separated list.

linux.sysctl.*

Override for the corresponding sysctl setting in the container

Key: linux.sysctl.*
Type:

string

Live update:

no

Condition:

container

user.*

Free-form user key/value storage

Key: user.*
Type:

string

Live update:

no

User keys can be used in search.

environment.*

インスタンスのための環境変数

Key: environment.*
Type:

string

Live update:

yes (exec)

key/value の環境変数をインスタンスにエクスポートできます。 これらはその後 incus exec に設定されます。

ブート関連のオプション

以下のインスタンスオプションはインスタンスのブート関連の挙動を制御します:

boot.autostart

Whether to always start the instance when the daemon starts

Key: boot.autostart
Type:

bool

Live update:

no

If set to false, restore the last state.

boot.autostart.delay

Delay after starting the instance

Key: boot.autostart.delay
Type:

integer

Default:

0

Live update:

no

The number of seconds to wait after the instance started before starting the next one.

boot.autostart.priority

What order to start the instances in

Key: boot.autostart.priority
Type:

integer

Default:

0

Live update:

no

The instance with the highest value is started first.

boot.host_shutdown_action

What action to take on the instance when the host is shut down

Key: boot.host_shutdown_action
Type:

integer

Default:

stop

Live update:

yes

Action to take on host shut down

boot.host_shutdown_timeout

How long to wait for the instance to shut down

Key: boot.host_shutdown_timeout
Type:

integer

Default:

30

Live update:

yes

Number of seconds to wait for the instance to shut down before it is force-stopped.

boot.stop.priority

What order to shut down the instances in

Key: boot.stop.priority
Type:

integer

Default:

0

Live update:

no

The instance with the highest value is shut down first.

cloud-init 設定

以下のインスタンスオプションはインスタンスのcloud-init設定を制御します:

cloud-init.network-config

Network configuration for cloud-init

Key: cloud-init.network-config
Type:

string

Default:

DHCP on eth0

Live update:

no

Condition:

If supported by image

The content is used as seed value for cloud-init.

cloud-init.user-data

User data for cloud-init

Key: cloud-init.user-data
Type:

string

Default:

#cloud-config

Live update:

no

Condition:

If supported by image

The content is used as seed value for cloud-init.

cloud-init.vendor-data

Vendor data for cloud-init

Key: cloud-init.vendor-data
Type:

string

Default:

#cloud-config

Live update:

no

Condition:

If supported by image

The content is used as seed value for cloud-init.

user.network-config

Legacy version of cloud-init.network-config

Key: user.network-config
Type:

string

Default:

DHCP on eth0

Live update:

no

Condition:

If supported by image

user.user-data

Legacy version of cloud-init.user-data

Key: user.user-data
Type:

string

Default:

#cloud-config

Live update:

no

Condition:

If supported by image

user.vendor-data

Legacy version of cloud-init.vendor-data

Key: user.vendor-data
Type:

string

Default:

#cloud-config

Live update:

no

Condition:

If supported by image

これらのオプションのサポートは使用するイメージに依存し、保証はされません。

cloud-init.user-datacloud-init.vendor-dataの両方を指定すると、両方のオプションの設定がマージされます。 このため、これらのオプションに設定するcloud-init設定が同じキーを含まないようにしてください。

リソース制限

以下のインスタンスオプションはインスタンスのリソース制限を指定します:

limits.cpu

Which CPUs to expose to the instance

Key: limits.cpu
Type:

string

Default:

1 (VMs)

Live update:

yes

A number or a specific range of CPUs to expose to the instance.

See CPUピンニング for more information.

limits.cpu.allowance

How much of the CPU can be used

Key: limits.cpu.allowance
Type:

string

Default:

100%

Live update:

yes

Condition:

container

To control how much of the CPU can be used, specify either a percentage (50%) for a soft limit or a chunk of time (25ms/100ms) for a hard limit.

See 割り当てと優先度(コンテナのみ) for more information.

limits.cpu.nodes

Which NUMA nodes to place the instance CPUs on

Key: limits.cpu.nodes
Type:

string

Live update:

yes

A comma-separated list of NUMA node IDs or ranges to place the instance CPUs on. Alternatively, the value balanced may be used to have Incus pick the least busy NUMA node on startup.

See 割り当てと優先度(コンテナのみ) for more information.

limits.cpu.priority

CPU scheduling priority compared to other instances

Key: limits.cpu.priority
Type:

integer

Default:

10 (maximum)

Live update:

yes

Condition:

container

When overcommitting resources, specify the CPU scheduling priority compared to other instances that share the same CPUs. Specify an integer between 0 and 10.

See 割り当てと優先度(コンテナのみ) for more information.

limits.disk.priority

Priority of the instance's I/O requests

Key: limits.disk.priority
Type:

integer

Default:

5 (medium)

Live update:

yes

Controls how much priority to give to the instance's I/O requests when under load.

Specify an integer between 0 and 10.

limits.hugepages.1GB

Limit for the number of 1 GB huge pages

Key: limits.hugepages.1GB
Type:

string

Live update:

yes

Condition:

container

Fixed value (in bytes) to limit the number of 1 GB huge pages. Various suffixes are supported (see ストレージとネットワーク制限の単位).

See huge page の制限 for more information.

limits.hugepages.1MB

Limit for the number of 1 MB huge pages

Key: limits.hugepages.1MB
Type:

string

Live update:

yes

Condition:

container

Fixed value (in bytes) to limit the number of 1 MB huge pages. Various suffixes are supported (see ストレージとネットワーク制限の単位).

See huge page の制限 for more information.

limits.hugepages.2MB

Limit for the number of 2 MB huge pages

Key: limits.hugepages.2MB
Type:

string

Live update:

yes

Condition:

container

Fixed value (in bytes) to limit the number of 2 MB huge pages. Various suffixes are supported (see ストレージとネットワーク制限の単位).

See huge page の制限 for more information.

limits.hugepages.64KB

Limit for the number of 64 KB huge pages

Key: limits.hugepages.64KB
Type:

string

Live update:

yes

Condition:

container

Fixed value (in bytes) to limit the number of 64 KB huge pages. Various suffixes are supported (see ストレージとネットワーク制限の単位).

See huge page の制限 for more information.

limits.memory

Usage limit for the host's memory

Key: limits.memory
Type:

string

Default:

1Gib (VMs)

Live update:

yes

Percentage of the host's memory or a fixed value in bytes. Various suffixes are supported.

See ストレージとネットワーク制限の単位 for details.

limits.memory.enforce

Whether the memory limit is hard or soft

Key: limits.memory.enforce
Type:

string

Default:

hard

Live update:

yes

Condition:

container

If the instance's memory limit is hard, the instance cannot exceed its limit. If it is soft, the instance can exceed its memory limit when extra host memory is available.

limits.memory.hugepages

Whether to back the instance using huge pages

Key: limits.memory.hugepages
Type:

bool

Default:

false

Live update:

no

Condition:

virtual machine

If this option is set to false, regular system memory is used.

limits.memory.swap

Control swap usage by the instance

Key: limits.memory.swap
Type:

string

Default:

true

Live update:

yes

Condition:

container

When set to true or false, it controls whether the container is likely to get some of its memory swapped by the kernel. Alternatively, it can be set to a bytes value which will then allow the container to make use of additional memory through swap.

limits.memory.swap.priority

Prevents the instance from being swapped to disk

Key: limits.memory.swap.priority
Type:

integer

Default:

10 (maximum)

Live update:

yes

Condition:

container

Specify an integer between 0 and 10. The higher the value, the less likely the instance is to be swapped to disk.

limits.processes

Maximum number of processes that can run in the instance

Key: limits.processes
Type:

integer

Default:

empty

Live update:

yes

Condition:

container

If left empty, no limit is set.

limits.kernel.*

インスタンスごとのカーネルリソース

Key: limits.kernel.*
Type:

string

Live update:

no

Condition:

container

インスタンスにカーネルの制限を設定できます、たとえば、オープンできるファイル数を制限できます。 詳細は カーネルリソース制限 を参照してください。

PU制限

CPU 使用率を制限するための異なるオプションがあります:

  • limits.cpuを設定して、インスタンスが見ることができ、使用することができる CPU を制限します。 このオプションの設定方法は、CPUピンニングを参照してください。

  • limits.cpu.allowanceを設定して、インスタンスが利用可能な CPU にかける負荷を制限します。 このオプションはコンテナのみで利用可能です。 このオプションの設定方法は、割り当てと優先度(コンテナのみ)を参照してください。

これらのオプションは同時に設定して、インスタンスが見ることができる CPU とそれらのインスタンスの許可される使用量の両方を制限することが可能です。 しかし、limits.cpu.allowanceを時間制限と共に使用する場合、スケジューラーに多くの制約をかけ、効率的な割り当てが難しくなる可能性があるため、limits.cpuの追加使用は避けるべきです。

CPU 制限は cgroup コントローラーのcpusetcpuを組み合わせて実装しています。

CPUピンニング

limits.cpucpusetコントローラーを使って、CPU を固定(ピンニング)します。 どの CPU を、またはどれぐらいの数の CPU を、インスタンスから見えるようにし、使えるようにするかを指定できます:

  • どの CPU を使うかを指定するには、limits.cpuを CPU の組み合わせ(例:1,2,3)あるいは CPU の範囲(例:0-3)で指定できます。

    単一の CPU にピンニングするためには、CPU の個数との区別をつけるために、範囲を指定する文法(例:1-1)を使う必要があります。

  • CPU の個数を指定した場合(例:4)、Incus は特定の CPU にピンニングされていないすべてのインスタンスをダイナミックに負荷分散し、マシン上の負荷を分散しようとします。 インスタンスが起動したり停止するたびに、またシステムに CPU が追加されるたびに、インスタンスはリバランスされます。

仮想マシンのCPUリミット

注釈

Incus はlimits.cpuオプションのライブアップデートをサポートします。 しかし、仮想マシンの場合は、対応する CPU がホットプラグされるだけです。 ゲストのオペレーティングシステムによって、新しい CPU をオンラインにするためには、インスタンスを再起動するか、なんらかの手動の操作を実行する必要があります。

Incus の仮想マシンはデフォルトでは 1 つの vCPU だけを割り当てられ、ホストの CPU のベンダーとタイプとマッチした CPU として現れますが、シングルコアでスレッドなしになります。

limits.cpuを単一の整数に設定する場合、Incus は複数の vCPU を割り当ててゲストにはフルなコアとして公開します。 これらの vCPU はホスト上の特定の物理コアにはピンニングされません。 vCPU の個数は VM の稼働中に変更できます。

limits.cpuを CPU ID(incus info --resources で表示されます)の範囲またはカンマ区切りリストの組に設定する場合、vCPU は物理コアにピンニングされます。 このシナリオでは、Incus は CPU 設定が現実のハードウェアトポロジーとぴったり合うかチェックし、合う場合はそのトポロジーをゲスト内に複製します。 CPU ピンニングを行う場合、VM の稼働中に設定を変更することはできません。

たとえば、ピンニング設定が 8 個のスレッド、同じコアのスレッドの各ペアと 2 個の CPU に散在する偶数のコアを持つ場合、ゲストは 2 個の CPU、各 CPU に 2 個のコア、各コアに 2 個のスレッドを持ちます。 NUMA レイアウトは同様に複製され、このシナリオでは、ゲストではほとんどの場合、2 個の NUMA ノード、各 CPU ソケットに 1 個のノードを持つことになるでしょう。

複数の NUMA ノードを持つような環境では、メモリーは同様に NUMA ノードで分割され、ホスト上で適切にピンニングされ、その後ゲストに公開されます。

これらすべてにより、ゲストスケジューラはソケット、コア、スレッドを適切に判断し、メモリーを共有したり NUMA ノード間でプロセスを移動する際に NUMA トポロジーを考慮できるので、ゲスト内で非常に高パフォーマンスな操作を可能にします。

割り当てと優先度(コンテナのみ)

limits.cpu.allowanceは、時間の制限を与えたときは CFS スケジューラのクォータを、パーセント指定をした場合は全体的な CPU シェアの仕組みを使います:

  • 時間制限(たとえば、20ms/50ms)はハードリミットです。 たとえば、コンテナが最大で 1 つの CPU を使用することを許可する場合は、limits.cpu.allowance100ms/100msのような値に設定します。この値は 1 つの CPU に相当する時間に対する相対値なので、2 つの CPU の時間を制限するには、100ms/50msあるいは200ms/100msのような値を使用します。

  • パーセント指定を使う場合は、制限は負荷状態にある場合のみに適用されるソフトリミットです。 設定は、同じ CPU(もしくは CPU の組)を使う他のインスタンスとの比較で、インスタンスに対するスケジューラの優先度を計算するのに使われます。 たとえば、負荷時のコンテナの CPU 使用率を 1 つの CPU に制限するためには、limits.cpu.allowance100%に設定します。

limits.cpu.priority は、CPU の組を共有する複数のインスタンスに割り当てられた CPU の割合が同じ場合に、スケジューラの優先度スコアを計算するために使われる別の因子です。

huge page の制限

Incus では limits.hugepage.[size] キーを使ってコンテナが利用できる huge page の数を制限できます。

アーキテクチャはしばしば huge page のサイズを公開しています。 利用可能な huge page サイズはアーキテクチャによって異なります。

huge page の制限は非特権コンテナ内でhugetlbfsファイルシステムのmountシステムコールをインターセプトするように Incus を設定しているときには特に有用です。 Incus がhugetlbfs mountシステムコールをインターセプトすると Incus は正しいuidgidの値をmountオプションに指定してhugetblfsファイルシステムをコンテナにマウントします。 これにより非特権コンテナからも huge page が利用可能となります。 しかし、ホストで利用可能な huge page をコンテナが使い切ってしまうのを防ぐため、limits.hugepages.[size]を使ってコンテナが利用可能な huge page の数を制限することを推奨します。

huge page の制限はhugetlb cgroup コントローラーによって実行されます。これはこれらの制限を適用するために、ホストシステムがhugetlbコントローラーをレガシーあるいは cgroup の単一階層構造(訳注:cgroup v2)に公開する必要があることを意味します。

カーネルリソース制限

Incus は、インスタンスのリソース制限を設定するのに使用できる一般の名前空間キーlimits.kernel.*を公開しています。

limits.kernel.*接頭辞に続いて指定されるリソースについて Incus が全く検証を行わないという意味でこれは汎用です。 Incus は対象のカーネルがサポートするすべての利用可能なリソースについて知ることはできません。 代わりに、Incus はlimits.kernel.*接頭辞の後の対応するリソースキーとその値をカーネルに単に渡します。 カーネルが適切な検証を行います。 これによりユーザーはシステム上でサポートされる任意の制限を指定できます。

よくある制限のいくつかは以下のとおりです:

キー

リソース

説明

limits.kernel.as

RLIMIT_AS

プロセスの仮想メモリーの最大サイズ

limits.kernel.core

RLIMIT_CORE

プロセスのコアダンプファイルの最大サイズ

limits.kernel.cpu

RLIMIT_CPU

プロセスが使えるCPU時間の秒単位の制限

limits.kernel.data

RLIMIT_DATA

プロセスのデータセグメントの最大サイズ

limits.kernel.fsize

RLIMIT_FSIZE

プロセスが作成できるファイルの最大サイズ

limits.kernel.locks

RLIMIT_LOCKS

プロセスが確立できるファイルロック数の制限

limits.kernel.memlock

RLIMIT_MEMLOCK

プロセスがRAM上でロックできるメモリーのバイト数の制限

limits.kernel.nice

RLIMIT_NICE

引き上げることができるプロセスのnice値の最大値

limits.kernel.nofile

RLIMIT_NOFILE

プロセスがオープンできるファイルの最大値

limits.kernel.nproc

RLIMIT_NPROC

呼び出し元プロセスのユーザーが作れるプロセスの最大数

limits.kernel.rtprio

RLIMIT_RTPRIO

プロセスに対して設定できるリアルタイム優先度の最大値

limits.kernel.sigpending

RLIMIT_SIGPENDING

呼び出し元プロセスのユーザーがキューに入れられるシグナルの最大数

指定できる制限の完全なリストは getrlimit(2)/setrlimit(2)システムコールの man ページで確認できます。

limits.kernel.*名前空間内で制限を指定するには、RLIMIT_を付けずに、リソース名を小文字で指定します。 たとえば、RLIMIT_NOFILEnofileと指定します。

制限は、コロン区切りのふたつの数字もしくはunlimitedという文字列で指定します(たとえば、limits.kernel.nofile=1000:2000)。 単一の値を使って、ソフトリミットとハードリミットを同じ値に設定できます(たとえば、limits.kernel.nofile=3000)。

明示的に設定されないリソースは、インスタンスを起動したプロセスから継承されます。 この継承は Incus でなく、カーネルによって強制されることに注意してください。

マイグレーションオプション

以下のインスタンスオプションはインスタンスがあるLXDサーバーから別のサーバーに移動される場合の挙動を制御します:

migration.incremental.memory

Whether to use incremental memory transfer

Key: migration.incremental.memory
Type:

bool

Default:

false

Live update:

yes

Condition:

container

Using incremental memory transfer of the instance's memory can reduce downtime.

migration.incremental.memory.goal

Percentage of memory to have in sync before stopping the instance

Key: migration.incremental.memory.goal
Type:

integer

Default:

70

Live update:

yes

Condition:

container

migration.incremental.memory.iterations

Maximum number of transfer operations to go through before stopping the instance

Key: migration.incremental.memory.iterations
Type:

integer

Default:

10

Live update:

yes

Condition:

container

migration.stateful

Whether to allow for stateful stop/start and snapshots

Key: migration.stateful
Type:

bool

Default:

false

Live update:

no

Condition:

virtual machine

Enabling this option prevents the use of some features that are incompatible with it.

NVIDIAとCUDAの設定

以下のインスタンスオプションはインスタンスの NVIDIA と CUDA の設定を指定します:

nvidia.driver.capabilities

What driver capabilities the instance needs

Key: nvidia.driver.capabilities
Type:

string

Default:

compute,utility

Live update:

no

Condition:

container

The specified driver capabilities are used to set libnvidia-container NVIDIA_DRIVER_CAPABILITIES.

nvidia.require.cuda

Required CUDA version

Key: nvidia.require.cuda
Type:

string

Live update:

no

Condition:

container

The specified version expression is used to set libnvidia-container NVIDIA_REQUIRE_CUDA.

nvidia.require.driver

Required driver version

Key: nvidia.require.driver
Type:

string

Live update:

no

Condition:

container

The specified version expression is used to set libnvidia-container NVIDIA_REQUIRE_DRIVER.

nvidia.runtime

Whether to pass the host NVIDIA and CUDA runtime libraries into the instance

Key: nvidia.runtime
Type:

bool

Default:

false

Live update:

no

Condition:

container

rawインスタンス設定のオーバーライド

以下のインスタンスオプションは Incus 自身が使用するバックエンド機能に直接制御できるようにします:

raw.apparmor

AppArmor profile entries

Key: raw.apparmor
Type:

blob

Live update:

yes

The specified entries are appended to the generated profile.

raw.idmap

Raw idmap configuration

Key: raw.idmap
Type:

blob

Live update:

no

Condition:

unprivileged container

For example: both 1000 1000

raw.lxc

Raw LXC configuration to be appended to the generated one

Key: raw.lxc
Type:

blob

Live update:

no

Condition:

container

raw.qemu

Raw QEMU configuration to be appended to the generated command line

Key: raw.qemu
Type:

blob

Live update:

no

Condition:

virtual machine

raw.qemu.conf

Addition/override to the generated qemu.conf file

Key: raw.qemu.conf
Type:

blob

Live update:

no

Condition:

virtual machine

See QEMU設定のオーバーライド for more information.

raw.seccomp

Raw Seccomp configuration

Key: raw.seccomp
Type:

blob

Live update:

no

Condition:

container

重要

これらのraw.*キーを設定すると Incus を予期せぬ形で壊してしまうかもしれません。 このため、これらのキーを設定するのは避けるほうが良いです。

QEMU設定のオーバーライド

VM インスタンスに対しては、Incus は-readconfigコマンドラインオプションで QEMU に渡す設定ファイルを使って QEMU を設定します。 この設定ファイルは各インスタンスの起動前に生成されます。 設定ファイルは/run/incus/<instance_name>/qemu.confに作られます。

デフォルトの設定はほとんどの典型的な利用ケース、VirtIO デバイスを持つモダンな UEFI ゲスト、では正常に動作します。 しかし、いくつかの状況では、生成された設定をオーバーライドする必要があります。 たとえば以下のような場合です。

  • UEFI をサポートしない古いゲスト OS を実行する。

  • VirtIO がゲスト OS でサポートされない場合にカスタムな仮想デバイスを指定する。

  • マシンの起動前に Incus でサポートされないデバイスを追加する。

  • ゲスト OS と衝突するデバイスを削除する。

設定をオーバーライドするには、raw.qemu.confオプションを設定します。 これはqemu.confと似たような形式ですが、いくつか拡張した形式をサポートします。 これは複数行の設定オプションですので、複数のセクションやキーを変更するのに使えます。

  • 生成された設定ファイルのセクションやキーを置き換えるには、別の値を持つセクションを追加します。

    たとえば、デフォルトのvirtio-gpu-pci GPU ドライバーをオーバーライドするには以下のセクションを使います:

    raw.qemu.conf: |-
        [device "qemu_gpu"]
        driver = "qxl-vga"
    
  • セクションを削除するには、キー無しのセクションを指定します。 たとえば:

    raw.qemu.conf: |-
        [device "qemu_gpu"]
    
  • キーを削除するには、空の文字列を値として指定します。 たとえば:

    raw.qemu.conf: |-
        [device "qemu_gpu"]
        driver = ""
    
  • 新規のセクションを追加するには、設定ファイル内に存在しないセクション名を指定します。

QEMU で使用される設定ファイル形式は同じ名前の複数のセクションを許可します。 以下は Incus で生成される設定の抜粋です。

[global]
driver = "ICH9-LPC"
property = "disable_s3"
value = "1"

[global]
driver = "ICH9-LPC"
property = "disable_s4"
value = "1"

オーバーライドするセクションを指定するには、インデクスを指定します。 たとえば:

raw.qemu.conf: |-
    [global][1]
    value = "0"

セクションのインデクスは 0(指定しない場合のデフォルト値)から始まりますので、上の例は以下の設定を生成します:

[global]
driver = "ICH9-LPC"
property = "disable_s3"
value = "1"

[global]
driver = "ICH9-LPC"
property = "disable_s4"
value = "0"

セキュリティーポリシー

以下のインスタンスオプションはインスタンスのSecurityポリシーを制御します:

security.agent.metrics

Whether the incus-agent is queried for state information and metrics

Key: security.agent.metrics
Type:

bool

Default:

true

Live update:

no

Condition:

virtual machine

security.csm

Whether to use a firmware that supports UEFI-incompatible operating systems

Key: security.csm
Type:

bool

Default:

false

Live update:

no

Condition:

virtual machine

When enabling this option, set security.secureboot to false.

security.guestapi

Whether /dev/incus is present in the instance

Key: security.guestapi
Type:

bool

Default:

true

Live update:

no

See インスタンス〜ホスト間の通信 for more information.

security.guestapi.images

Controls the availability of the /1.0/images API over guestapi

Key: security.guestapi.images
Type:

bool

Default:

false

Live update:

no

Condition:

container

security.idmap.base

The base host ID to use for the allocation

Key: security.idmap.base
Type:

integer

Live update:

no

Condition:

unprivileged container

Setting this option overrides auto-detection.

security.idmap.isolated

Whether to use a unique idmap for this instance

Key: security.idmap.isolated
Type:

bool

Default:

false

Live update:

no

Condition:

unprivileged container

If specified, the idmap used for this instance is unique among instances that have this option set.

security.idmap.size

The size of the idmap to use

Key: security.idmap.size
Type:

integer

Live update:

no

Condition:

unprivileged container

security.nesting

Whether to support running Incus (nested) inside the instance

Key: security.nesting
Type:

bool

Default:

false

Live update:

yes

Condition:

container

security.privileged

Whether to run the instance in privileged mode

Key: security.privileged
Type:

bool

Default:

false

Live update:

no

Condition:

container

security.protection.delete

Prevents the instance from being deleted

Key: security.protection.delete
Type:

bool

Default:

false

Live update:

yes

security.protection.shift

Whether to protect the file system from being UID/GID shifted

Key: security.protection.shift
Type:

bool

Default:

false

Live update:

yes

Condition:

container

Set this option to true to prevent the instance's file system from being UID/GID shifted on startup.

security.secureboot

Whether UEFI secure boot is enabled with the default Microsoft keys

Key: security.secureboot
Type:

bool

Default:

true

Live update:

no

Condition:

virtual machine

When disabling this option, consider enabling security.csm.

security.sev

Whether AMD SEV (Secure Encrypted Virtualization) is enabled for this VM

Key: security.sev
Type:

bool

Default:

false

Live update:

no

Condition:

virtual machine

security.sev.policy.es

Whether AMD SEV-ES (SEV Encrypted State) is enabled for this VM

Key: security.sev.policy.es
Type:

bool

Default:

false

Live update:

no

Condition:

virtual machine

security.sev.session.data

The guest owner's base64-encoded session blob

Key: security.sev.session.data
Type:

string

Default:

true

Live update:

no

Condition:

virtual machine

security.sev.session.dh

The guest owner's base64-encoded Diffie-Hellman key

Key: security.sev.session.dh
Type:

string

Default:

true

Live update:

no

Condition:

virtual machine

security.syscalls.allow

List of syscalls to allow

Key: security.syscalls.allow
Type:

string

Live update:

no

Condition:

container

A \n-separated list of syscalls to allow. This list must be mutually exclusive with security.syscalls.deny*.

security.syscalls.deny

List of syscalls to deny

Key: security.syscalls.deny
Type:

string

Live update:

no

Condition:

container

A \n-separated list of syscalls to deny. This list must be mutually exclusive with security.syscalls.allow.

security.syscalls.deny_compat

Whether to block compat_* syscalls (x86_64 only)

Key: security.syscalls.deny_compat
Type:

bool

Default:

false

Live update:

no

Condition:

container

On x86_64, this option controls whether to block compat_* syscalls. On other architectures, the option is ignored.

security.syscalls.deny_default

Whether to enable the default syscall deny

Key: security.syscalls.deny_default
Type:

bool

Default:

true

Live update:

no

Condition:

container

security.syscalls.intercept.bpf

Whether to handle the bpf() system call

Key: security.syscalls.intercept.bpf
Type:

bool

Default:

false

Live update:

no

Condition:

container

security.syscalls.intercept.bpf.devices

Whether to allow BPF programs

Key: security.syscalls.intercept.bpf.devices
Type:

bool

Default:

false

Live update:

no

Condition:

container

This option controls whether to allow BPF programs for the devices cgroup in the unified hierarchy to be loaded.

security.syscalls.intercept.mknod

Whether to handle the mknod and mknodat system calls

Key: security.syscalls.intercept.mknod
Type:

bool

Default:

false

Live update:

no

Condition:

container

These system calls allow creation of a limited subset of char/block devices.

security.syscalls.intercept.mount

Whether to handle the mount system call

Key: security.syscalls.intercept.mount
Type:

bool

Default:

false

Live update:

no

Condition:

container

security.syscalls.intercept.mount.allowed

File systems that can be mounted

Key: security.syscalls.intercept.mount.allowed
Type:

string

Live update:

yes

Condition:

container

Specify a comma-separated list of file systems that are safe to mount for processes inside the instance.

security.syscalls.intercept.mount.fuse

File system that should be redirected to FUSE implementation

Key: security.syscalls.intercept.mount.fuse
Type:

string

Live update:

yes

Condition:

container

Specify the mounts of a given file system that should be redirected to their FUSE implementation (for example, ext4=fuse2fs).

security.syscalls.intercept.mount.shift

Whether to use idmapped mounts for syscall interception

Key: security.syscalls.intercept.mount.shift
Type:

bool

Default:

false

Live update:

yes

Condition:

container

security.syscalls.intercept.sched_setcheduler

Whether to handle the sched_setscheduler system call

Key: security.syscalls.intercept.sched_setcheduler
Type:

bool

Default:

false

Live update:

no

Condition:

container

This system call allows increasing process priority.

security.syscalls.intercept.setxattr

Whether to handle the setxattr system call

Key: security.syscalls.intercept.setxattr
Type:

bool

Default:

false

Live update:

no

Condition:

container

This system call allows setting a limited subset of restricted extended attributes.

security.syscalls.intercept.sysinfo

Whether to handle the sysinfo system call

Key: security.syscalls.intercept.sysinfo
Type:

bool

Default:

false

Live update:

no

Condition:

container

This system call can be used to get cgroup-based resource usage information.

スナップショットのスケジュールと設定

以下のインスタンスオプションはインスタンススナップショットの作成と削除を制御します:

snapshots.expiry

When snapshots are to be deleted

Key: snapshots.expiry
Type:

string

Live update:

no

Specify an expression like 1M 2H 3d 4w 5m 6y.

snapshots.pattern

Template for the snapshot name

Key: snapshots.pattern
Type:

string

Default:

snap%d

Live update:

no

Specify a Pongo2 template string that represents the snapshot name. This template is used for scheduled snapshots and for unnamed snapshots.

See スナップショットの自動命名 for more information.

snapshots.schedule

Schedule for automatic instance snapshots

Key: snapshots.schedule
Type:

string

Default:

empty

Live update:

no

Specify either a cron expression (<minute> <hour> <dom> <month> <dow>), a comma-separated list of schedule aliases (@hourly, @daily, @midnight, @weekly, @monthly, @annually, @yearly), or leave empty to disable automatic snapshots.

snapshots.schedule.stopped

Whether to automatically snapshot stopped instances

Key: snapshots.schedule.stopped
Type:

bool

Default:

false

Live update:

no

スナップショットの自動命名

snapshots.pattern オプションはスナップショット名をフォーマットする Pongo2 テンプレート文字列です。

スナップショット名にタイムスタンプを追加するには、Pongo2 コンテキスト変数 creation_date を使用します。 スナップショット名に使用できない文字を含まないようにテンプレート文字列をフォーマットするようにしてください。 例えば、 snapshots.pattern{{ creation_date|date:'2006-01-02_15-04-05' }} に設定し、作成日時を秒の制度まで落として、スナップショットを命名するようにします。

名前の衝突を防ぐ別の方法はパターン内に %d プレースホルダを使うことです。 最初のスナップショットでは、プレースホルダは 0 に置換されます。 後続のスナップショットでは、既存のスナップショットが考慮され、プレースホルダの位置の最大の数を見つけます。 この数が 1 増加されて新しい名前に使用されます。

揮発性の内部データ

以下の揮発性のキーはインスタンスに固有な内部データを保管するため Incus で現在内部的に使用されています:

volatile.<name>.apply_quota

Disk quota

Key: volatile.<name>.apply_quota
Type:

string

The disk quota is applied the next time the instance starts.

volatile.<name>.ceph_rbd

RBD device path for Ceph disk devices

Key: volatile.<name>.ceph_rbd
Type:

string

volatile.<name>.host_name

Network device name on the host

Key: volatile.<name>.host_name
Type:

string

volatile.<name>.hwaddr

Network device MAC address

Key: volatile.<name>.hwaddr
Type:

string

The network device MAC address is used when no hwaddr property is set on the device itself.

volatile.<name>.last_state.created

Whether the network device physical device was created

Key: volatile.<name>.last_state.created
Type:

string

Possible values are true or false.

volatile.<name>.last_state.hwaddr

Network device original MAC

Key: volatile.<name>.last_state.hwaddr
Type:

string

The original MAC that was used when moving a physical device into an instance.

volatile.<name>.last_state.ip_addresses

Last used IP addresses

Key: volatile.<name>.last_state.ip_addresses
Type:

string

Comma-separated list of the last used IP addresses of the network device.

volatile.<name>.last_state.mtu

Network device original MTU

Key: volatile.<name>.last_state.mtu
Type:

string

The original MTU that was used when moving a physical device into an instance.

volatile.<name>.last_state.pci.driver

PCI original host driver

Key: volatile.<name>.last_state.pci.driver
Type:

string

The original host driver for the PCI device.

volatile.<name>.last_state.pci.parent

PCI parent host device

Key: volatile.<name>.last_state.pci.parent
Type:

string

The parent host device used when allocating a PCI device to an instance.

volatile.<name>.last_state.pci.slot.name

PCI parent slot name

Key: volatile.<name>.last_state.pci.slot.name
Type:

string

The parent host device PCI slot name.

volatile.<name>.last_state.usb.bus

USB bus address

Key: volatile.<name>.last_state.usb.bus
Type:

string

The original USB bus address.

volatile.<name>.last_state.usb.device

USB device identifier

Key: volatile.<name>.last_state.usb.device
Type:

string

The original USB device identifier.

volatile.<name>.last_state.vdpa.name

VDPA device name

Key: volatile.<name>.last_state.vdpa.name
Type:

string

The VDPA device name used when moving a VDPA device file descriptor into an instance.

volatile.<name>.last_state.vf.hwaddr

SR-IOV virtual function original MAC

Key: volatile.<name>.last_state.vf.hwaddr
Type:

string

The original MAC used when moving a VF into an instance.

volatile.<name>.last_state.vf.id

SR-IOV virtual function ID

Key: volatile.<name>.last_state.vf.id
Type:

string

The ID used when moving a VF into an instance.

volatile.<name>.last_state.vf.parent

SR-IOV parent host device

Key: volatile.<name>.last_state.vf.parent
Type:

string

The parent host device used when allocating a VF into an instance.

volatile.<name>.last_state.vf.spoofcheck

SR-IOV virtual function original spoof check setting

Key: volatile.<name>.last_state.vf.spoofcheck
Type:

string

The original spoof check setting used when moving a VF into an instance.

volatile.<name>.last_state.vf.vlan

SR-IOV virtual function original VLAN

Key: volatile.<name>.last_state.vf.vlan
Type:

string

The original VLAN used when moving a VF into an instance.

volatile.<name>.mig.uuid

MIG instance UUID

Key: volatile.<name>.mig.uuid
Type:

string

The NVIDIA MIG instance UUID.

volatile.<name>.name

Network interface name inside of the instance

Key: volatile.<name>.name
Type:

string

The network interface name inside of the instance when no name property is set on the device itself.

volatile.<name>.vgpu.uuid

virtual GPU instance UUID

Key: volatile.<name>.vgpu.uuid
Type:

string

The NVIDIA virtual GPU instance UUID.

volatile.apply_nvram

Whether to regenerate VM NVRAM the next time the instance starts

Key: volatile.apply_nvram
Type:

bool

volatile.apply_template

Template hook

Key: volatile.apply_template
Type:

string

The template with the given name is triggered upon next startup.

volatile.base_image

Hash of the base image

Key: volatile.base_image
Type:

string

The hash of the image that the instance was created from (empty if the instance was not created from an image).

volatile.cloud_init.instance-id

instance-id (UUID) exposed to cloud-init

Key: volatile.cloud_init.instance-id
Type:

string

volatile.cluster.group

The original cluster group for the instance

Key: volatile.cluster.group
Type:

string

The cluster group(s) that the instance was restricted to at creation time. This is used during re-scheduling events like an evacuation to keep the instance within the requested set.

volatile.cpu.nodes

Instance NUMA node

Key: volatile.cpu.nodes
Type:

string

The NUMA node that was selected for the instance.

volatile.evacuate.origin

The origin of the evacuated instance

Key: volatile.evacuate.origin
Type:

string

The cluster member that the instance lived on before evacuation.

volatile.idmap.base

The first ID in the instance's primary idmap range

Key: volatile.idmap.base
Type:

integer

volatile.idmap.current

The idmap currently in use by the instance

Key: volatile.idmap.current
Type:

string

volatile.idmap.next

The idmap to use the next time the instance starts

Key: volatile.idmap.next
Type:

string

volatile.last_state.idmap

Serialized instance UID/GID map

Key: volatile.last_state.idmap
Type:

string

volatile.last_state.power

Instance state as of last host shutdown

Key: volatile.last_state.power
Type:

string

volatile.last_state.ready

Instance marked itself as ready

Key: volatile.last_state.ready
Type:

string

volatile.uuid

Instance UUID

Key: volatile.uuid
Type:

string

The instance UUID is globally unique across all servers and projects.

volatile.uuid.generation

Instance generation UUID

Key: volatile.uuid.generation
Type:

string

The instance generation UUID changes whenever the instance's place in time moves backwards. It is globally unique across all servers and projects.

volatile.vsock_id

Instance vsock ID used as of last start

Key: volatile.vsock_id
Type:

string

注釈

揮発性のキーはユーザは設定できません。