fix(lxc): enable nesting=1 by default for systemd 255+ compat

Ubuntu 24.04 / Debian 13 ship with systemd >= 255 which requires
features=nesting=1 in unprivileged LXC containers. Without it,
container start emits 'WARN: Systemd 255 detected. You may need
to enable nesting.' Now nesting is enabled by default unless the
caller explicitly passes a 'features' string.
This commit is contained in:
markmorado
2026-05-06 20:03:22 +02:00
parent 5d905361b6
commit daeddbc6c7

View File

@@ -2429,8 +2429,12 @@ class ProxmoxClient:
if description:
params['description'] = description
# Enable nesting by default — required for systemd 255+ (Ubuntu 24.04, Debian 13)
# to avoid "WARN: Systemd 255 detected. You may need to enable nesting." warning
if features:
params['features'] = features
else:
params['features'] = 'nesting=1'
if nameserver:
params['nameserver'] = nameserver