Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1152,11 +1152,24 @@ This setting can be enabled on at most one cluster per incus host.
**default value**: true

By default, the LXC containers created by Magic Castle are privileged. It is possible for security reasons
to turn this off by provider `privileged = false` to the Incus module. However, due to kernel restrictions
to turn this off by provider `privileged = false` to the Incus module. However, due to kernel restrictions
designed to prevent unprivileged users from performing privileged operations like initiating mounts,
the following features have to be disabled when running with `privileged = false`:
- NFS server and mounts (`profile::nfs`)

Also make sure that the line `root:1000000:1000000000` exists in both
`/etc/subuid` and `/etc/subgid` when running with `privileged = false`.

**Post build modification effect**: rebuild of all instances at next `terraform apply`.

### nesting (optional)

**default value**: true

By default, the LXC containers created by Magic Castle have nesting enabled.
This allows containers to run workloads that require features such as docker or systemd inside the container.
It is possible, for security or isolation reasons, to disable this by setting `nesting = false` in the Incus module.

**Post build modification effect**: rebuild of all instances at next `terraform apply`.

### shared_filesystems (optional)
Expand Down
5 changes: 5 additions & 0 deletions incus/incus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ variable "privileged" {
default = true
}

variable "nesting" {
description = "When using container, set the config security.nesting to this value"
default = true
}

variable "shared_filesystems" {
description = "Name of filesystems that need to be created and mounted in every instance"
default = []
Expand Down
2 changes: 1 addition & 1 deletion incus/infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ resource "incus_instance" "instances" {
config = {
"cloud-init.user-data" = module.configuration.user_data[each.key]
"security.privileged" = var.privileged
"security.nesting" = var.privileged
"security.nesting" = var.nesting
}

device {
Expand Down
Loading