you can set the environment with the `env` parameter and a PVE hookscript with the `hookscript` one (both are root only IIRC). arbitrary low level options are intentionally not exposed on the API.































you can set the environment with the `env` parameter and a PVE hookscript with the `hookscript` one (both are root only IIRC). arbitrary low level options are intentionally not exposed on the API.
I also need lxc.hook.mount. Is this one somehow exposed?
Not via the API. The available phases in a hookscript are pre-start, post-start, pre-stop, and post-stop.
Does the env parameter really work for this? The documentation I found states that it sets the lxc.environment.runtime option and not lxc.environment
Depends on what your goal is. The env parameter sets the environment variables inside the container. They do not apply to hook scripts.
If you really have to create a container with lxc.* parameters via the API and your use case cannot be solved via the exposed parameters, then yes, cloning a prepared template is the only option I can think of.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。