Trying to start LXC containers through the systemd template file is broken because the template file is invalid: # systemctl enable lxc@containername.service The unit files have no installation config (WantedBy, RequiredBy, Also, Alias settings in the [Install] section, and DefaultInstance for template units). This means they are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). 4) In case of template units, the unit is meant to be enabled with some instance name specified. # ln -sf /lib/systemd/system/lxc@.service /etc/systemd/system/multi-user.target.wants/lxc@containername.service # systemctl start lxc@containername.service Failed to start lxc@containername.service: Unit lxc@containername.service is not loaded properly: Invalid argument. See system logs and 'systemctl status lxc@containername.service' for details. # systemctl status lxc@containername.service ● lxc@containername.service Loaded: error (Reason: Invalid argument) Active: inactive (dead) # lxc-start -n containername -F [container starts up totally fine] The template file worked fine with older versions of systemd, but doesn't with 238-r7 (current stable).
Thanks Soren for the bug report. I don't have a systemd environment around. Would you mind supplying a patch to fix this?
It ended up being a configuration error on my end. My bad.