How to set "lxc.mount.auto" in LXD

I came with a strange problem with LXD, and I partially solved it.

However, I need to know how to set "lxc.mount.auto" in LXD. In other words, where does the lxc.mount.auto value in /var/log/lxd/container-name/lxc.conf value come from? and how to set it permanently?

ОБНОВИТЬ

Согласно документации:

... Sometimes, however, it may be necessary to talk to the underlying lxc driver itself. Это можно сделать, указав элементы конфигурации LXC в ключе конфигурации LXD "raw.lxc". These must be valid items as documented in the lxc.container.conf(5) manual page.

However I haven't found a way to modify or include that raw.lxc

ОБНОВЛЕНИЕ 2

As far as I understood, this is how you set it:

lxc config set container-name raw.lxc "lxc.mount.auto=sys"

Это на самом деле работает, как я вижу это добавляется в: /var/log/lxd/container-name/lxc.conf, например:

lxc.cap.drop = mac_admin mac_override sys_time sys_module sys_rawio
lxc.mount.auto = proc:rw sys:rw cgroup:mixed
lxc.autodev = 1
...
lxc.mount.auto=sys

Однако, похоже, что оно не переписывает предыдущее правило.

0 ответов

Другие вопросы по тегам