Skip to content

Commit 2ba60ec

Browse files
committed
contrib: add systemd unit files
This lets distros standardize on how QEMU should install systemd services for qemu-ga and qemu-pr-helper. The qemu-ga unit file comes from Fedora, but I checked that Debian is using the same path for the virtio-serisal port. I would like to include this in 2.11, so that the qemu-pr-helper socket can be standardized across distros. Note however that the files are not installed. We can add a configure option in 2.12 perhaps, but it's too late now; documenting the files in the release notes should do. Suggested-by: Daniel P. Berrange <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent a4a9b6e commit 2ba60ec

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=QEMU Guest Agent
3+
BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
4+
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
5+
6+
[Service]
7+
ExecStart=-/usr/bin/qemu-ga
8+
Restart=always
9+
RestartSec=0
10+
11+
[Install]
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[Unit]
2+
Description=Persistent Reservation Daemon for QEMU
3+
4+
[Service]
5+
WorkingDirectory=/tmp
6+
Type=simple
7+
ExecStart=/usr/bin/qemu-pr-helper
8+
PrivateTmp=yes
9+
ProtectSystem=strict
10+
ReadWritePaths=/var/run
11+
RestrictAddressFamilies=AF_UNIX
12+
Restart=always
13+
RestartSec=0
14+
15+
[Install]

contrib/systemd/qemu-pr-helper.socket

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Unit]
2+
Description=Persistent Reservation Daemon for QEMU
3+
4+
[Socket]
5+
ListenStream=/run/qemu-pr-helper.sock
6+
SocketMode=0600
7+
8+
[Install]
9+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)