summaryrefslogtreecommitdiff
path: root/qemu@.service.in
diff options
context:
space:
mode:
Diffstat (limited to 'qemu@.service.in')
-rw-r--r--qemu@.service.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/qemu@.service.in b/qemu@.service.in
new file mode 100644
index 0000000..000419e
--- /dev/null
+++ b/qemu@.service.in
@@ -0,0 +1,16 @@
+[Unit]
+Description=Virtual Machine %I
+Documentation=man:qemu(1)
+PartOf=machines.target
+Before=machines.target
+
+[Service]
+Type=notify
+NotifyAccess=all
+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