Skip to content

Instantly share code, notes, and snippets.

@gspivey
Created July 27, 2020 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gspivey/b4e9b84f098ac2ff28da04e7b74dc061 to your computer and use it in GitHub Desktop.
Save gspivey/b4e9b84f098ac2ff28da04e7b74dc061 to your computer and use it in GitHub Desktop.
[Unit]
Description=Container FreeIPA
Documentation=man:systemd-nspawn(1)
PartOf=machines.target
Before=machines.target
After=network.target
[Service]
ExecStart=/usr/bin/systemd-nspawn \
--quiet \
--keep-unit \
--boot \
--link-journal=try-guest \
--machine=freeIpa \
--directory /home/chroot/freeIpa
PIDFile=/home/chroot/freeIpa.pid
KillMode=mixed
Type=notify
RestartForceExitStatus=133
SuccessExitStatus=133
Slice=machine.slice
Delegate=yes
TasksMax=16384
[Install]
WantedBy=machines.target
@gspivey
Copy link
Author

gspivey commented Jul 27, 2020

Sample systemd unit for using systemd-nspawn. I should post a similar one on how to manage network mounts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment