I've been working with systemd-nspawn and have a couple of containers that I'd like to automatically start at system start.
I'm using arch linux and according to the archwiki entry, the following code should do the trick
# systemctl enable [email protected]
# systemctl start [email protected]
Assuming the container MyContainer
is in /var/lib/machines and was created with something like:
# pacstrap -i -c -d /var/lib/machines/MyContainer base
I can start the container with:
# sudo systemd-nspawn -b -D /var/lib/machines/MyContainer
and
# systemctl start [email protected]
as well as
# machinectl start MyContainer
but I just can't get the container to start at boot and running sudo systemctl status [email protected]
right after boot doesn't show any errors. Does anyone know what I need to do? Does there maybe need to be another service running?