Commit 2ba60ec1 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

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: default avatarDaniel P. Berrange <berrange@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Message-Id: <20171124164422.3960-1-pbonzini@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a4a9b6ea
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
[Unit]
Description=QEMU Guest Agent
BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device

[Service]
ExecStart=-/usr/bin/qemu-ga
Restart=always
RestartSec=0

[Install]
+15 −0
Original line number Diff line number Diff line
[Unit]
Description=Persistent Reservation Daemon for QEMU

[Service]
WorkingDirectory=/tmp
Type=simple
ExecStart=/usr/bin/qemu-pr-helper
PrivateTmp=yes
ProtectSystem=strict
ReadWritePaths=/var/run
RestrictAddressFamilies=AF_UNIX
Restart=always
RestartSec=0

[Install]
+9 −0
Original line number Diff line number Diff line
[Unit]
Description=Persistent Reservation Daemon for QEMU

[Socket]
ListenStream=/run/qemu-pr-helper.sock
SocketMode=0600

[Install]
WantedBy=multi-user.target