canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.32k stars 925 forks source link

Cannot set config key security.privileged=true for multipass LXD-based instaces #10028

Closed giulianopz closed 2 years ago

giulianopz commented 2 years ago

Required information

Cannot set multipass LXD-based instances as privileged containers. I've created two instaces of multipass using LXD as local driver:

sudo snap install multipass
sudo multipass set local.driver=lxd
sudo snap install lxd
snap connect multipass:lxd lxd

multipass launch --network enp3s0 --name master -m 3G
multipass launch --network enp3s0 --name worker -m 3G

:~# lxc list --project multipass
+--------+---------+----------------------------+------------------------------------------------+-----------------+-----------+
|  NAME  |  STATE  |            IPV4            |                      IPV6                      |      TYPE       | SNAPSHOTS |
+--------+---------+----------------------------+------------------------------------------------+-----------------+-----------+
| master | RUNNING | 192.168.1.221 (enp5s0)     | fd42:84eb:c2cd:ff6e:5054:ff:feb9:446b (enp5s0) | VIRTUAL-MACHINE | 0         |
|        |         | 192.168.1.22 (enp6s0)      |                                                |                 |           |
|        |         | 10.71.14.81 (enp5s0)       |                                                |                 |           |
|        |         | 10.1.219.64 (vxlan.calico) |                                                |                 |           |
+--------+---------+----------------------------+------------------------------------------------+-----------------+-----------+
| worker | RUNNING | 192.168.1.23 (enp6s0)      | fd42:84eb:c2cd:ff6e:5054:ff:feb4:b3a3 (enp5s0) | VIRTUAL-MACHINE | 0         |
|        |         | 192.168.1.222 (enp5s0)     |                                                |                 |           |
|        |         | 10.71.14.71 (enp5s0)       |                                                |                 |           |
|        |         | 10.1.171.64 (vxlan.calico) |                                                |                 |           |
+--------+---------+----------------------------+------------------------------------------------+-----------------+-----------+

I would need to make them privileged containers so that NFS server and client can be installed in the master and in the worker respectively, but it fails as follows:

:~# lxc config --project multipass set master security.privileged false
Error: Invalid config: Unknown configuration key: security.privileged
stgraber commented 2 years ago

That would be because those are virtual machines, not containers.