summaryrefslogtreecommitdiff
path: root/qemu@.service.in
blob: 23e235e03831e214b07a33522aa9d90a7f509869 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[Unit]
Description=Virtual Machine %I
Documentation=man:qemu(1)
PartOf=machines.target
Before=machines.target

[Service]
Type=notify
NotifyAccess=all
DynamicUser=yes
User=qemu-%I
RuntimeDirectory=qemu-%I
PIDFile=@runstatedir@/qemu-%I/pid
ExecStart=!@BINPROG@ %I
ExecStop=!@SOCAT@ SYSTEM:'echo system_powerdown; sleep infinity' UNIX-CONNECT:@runstatedir@/qemu-%I/monitor.sock

[Install]
WantedBy=machines.target