Skip to content

Commit f59339a

Browse files
duskmossclassabbyamp0x5c
committed
lxc.md: add Incus to LXC page
thanks to below for copy edit/review Co-authored-by: classabbyamp <[email protected]> Co-authored-by: 0x5c <[email protected]>
1 parent a41b118 commit f59339a

File tree

1 file changed

+49
-7
lines changed
  • src/config/containers-and-vms

1 file changed

+49
-7
lines changed

src/config/containers-and-vms/lxc.md

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# LXC
22

3-
The [Linux Containers project](https://linuxcontainers.org/) includes three
4-
subprojects: [LXC](https://linuxcontainers.org/lxc/introduction/),
5-
[LXD](https://linuxcontainers.org/lxd/introduction/) and
6-
[LXCFS](https://linuxcontainers.org/lxcfs/introduction/). The project also
7-
included the CGManager project, which has been deprecated in favor of the CGroup
8-
namespace in recent kernels.
3+
The [Linux Containers project](https://linuxcontainers.org/) includes four
4+
subprojects: [Incus](https://linuxcontainers.org/incus/introduction/),
5+
[LXC](https://linuxcontainers.org/lxc/introduction/),
6+
[LXCFS](https://linuxcontainers.org/lxcfs/introduction/) and
7+
[distrobuilder](https://linuxcontainers.org/distrobuilder/introduction/).
8+
9+
The project also formerly included the CGManager and
10+
[LXD](https://canonical.com/lxd) projects. CGManager has been deprecated in
11+
favor of the CGroup namespace in recent kernels. LXD has become a Canonical
12+
project. Incus was forked from LXD to be a community driven alternative, and is
13+
led and maintained by many of the original creators.
914

1015
## Configuring LXC
1116

@@ -114,6 +119,43 @@ access to other containers. To isolate containers from each other, alter the
114119
create each container. Trying to fix permissions on a container created with the
115120
wrong map is possible, but inconvenient.
116121

122+
## Incus
123+
124+
Incus provides an alternative interface to LXC's `lxc-*` utilities. However, it
125+
does not require the configuration described in [the previous section](#lxc).
126+
127+
In `/etc/rc.conf`, set the `CGROUP_MODE` variable to `unified`. Install the
128+
`incus` package, and [enable](../services/index.md#enabling-services) the
129+
`incus` service.
130+
131+
Some parts of Incus require optional dependencies, see
132+
[README.voidlinux](../package-documentation/index.md).
133+
134+
Add users who should have full control over Incus to the `_incus-admin` group.
135+
136+
Optionally, some users can be given limited access to Incus as described
137+
[here](https://linuxcontainers.org/incus/docs/main/howto/projects_confine/#confine-projects-to-specific-incus-users).
138+
Add these users to the `_incus` group, and enable the `incus-user` service.
139+
140+
Note that `incus-user` will initialize the default Incus profile when it is
141+
started. To avoid default configuration initialize Incus for yourself with
142+
`incus admin init` before enabling `incus-user`.
143+
144+
> Warning: `incus-user` will also replace the networking config of the default
145+
> profile if it appears invalid. runit does not have socket activation so this
146+
> happens when when the machine boots instead of when a user calls `incus`. If
147+
> the default profile uses a [bridge
148+
> interface](../network/index.md#bridge-interfaces) `incus-user` may replace it
149+
> on boot.
150+
151+
To migrate existing LXD setups to Incus, use the `lxd-to-incus` tool from the
152+
`incus-tools` package as described
153+
[here](https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/).
154+
155+
To migrate existing LXC containers to Incus, use the `lxc-to-incus` script from
156+
the `incus-tools` package as described
157+
[here](https://linuxcontainers.org/incus/docs/main/howto/migrate_from_lxc/).
158+
117159
## LXD
118160

119161
LXD provides an alternative interface to LXC's `lxc-*` utilities. However, it
@@ -125,4 +167,4 @@ the `lxd` service.
125167
LXD users must belong to the `lxd` group.
126168

127169
Use the `lxc` command to manage instances, as described
128-
[here](https://linuxcontainers.org/lxd/getting-started-cli/#lxd-client).
170+
[here](https://documentation.ubuntu.com/lxd/en/latest/howto/).

0 commit comments

Comments
 (0)