We previously replaced use of --blacklist with -b since the former was deleted in QEMU 9.1. We want to avoid use of the 'black list' term downstream too though. In future we're also expecting further command line args to be added to the guest agent which are desirable to set. Rather than hardcode the use of -b in the unit file, define a more general QEMU_GA_ARGS variable that enables the sysconfig file to set arbitrary extra command line arguments. A pre-start script is used to rewrite existing sysconfig files that users may have present to ensure upgradability. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
22 lines
696 B
Desktop File
22 lines
696 B
Desktop File
[Unit]
|
|
Description=QEMU Guest Agent
|
|
BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
|
|
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
|
|
IgnoreOnIsolate=True
|
|
|
|
[Service]
|
|
UMask=0077
|
|
EnvironmentFile=/etc/sysconfig/qemu-ga
|
|
# Support upgrades from QEMU < 9.1
|
|
ExecStartPre=/bin/sh -c "if grep '^BLACKLIST_RPC' /etc/sysconfig/qemu-ga >/dev/null ; then sed -i 's/^BLACKLIST_RPC=/QEMU_GA_ARGS=--block-rpcs=/' /etc/sysconfig/qemu-ga ; fi"
|
|
ExecStart=/usr/bin/qemu-ga \
|
|
--method=virtio-serial \
|
|
--path=/dev/virtio-ports/org.qemu.guest_agent.0 \
|
|
-F${FSFREEZE_HOOK_PATHNAME} \
|
|
$QEMU_GA_ARGS
|
|
Restart=always
|
|
RestartSec=0
|
|
|
|
[Install]
|
|
WantedBy=dev-virtio\x2dports-org.qemu.guest_agent.0.device
|