qemu-ga: skip starting on bare metal device
authorAndy Chiang <redacted>
Mon, 18 May 2026 16:56:53 +0000 (23:56 +0700)
committerHannu Nyman <redacted>
Sat, 23 May 2026 10:23:48 +0000 (13:23 +0300)
The same firmware image may be deployed on either bare metal device or
virtualized platforms (e.g., Proxmox VE).

On bare metal device, `qemu-ga` may still be started even though no
virtio-serial channel is available, resulting in repeated attempts to
access /dev/virtio-ports/org.qemu.guest_agent.0.

This causes continuous service respawning by procd and unnecessary log
spam.

This commit adds a pre-check for /dev/virtio-ports to avoid starting
`qemu-ga` when virtio-serial support is not present.

Signed-off-by: Andy Chiang <redacted>
utils/qemu/Makefile
utils/qemu/files/qemu-ga.init

index a14d29c0567181c90bed3b8ed76ba669a1cb8ec2..22a7a90bbaf2958c0b8d49ead654f8041d79659f 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
 PKG_VERSION:=10.1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://download.qemu.org/
 PKG_HASH:=fbaa7a0d7a9a1deb5695b125916746ec28fe0de6275d4454f3e3bbaf8b339b53
index 86c2b7ea77f4ac86d8446504cf41c2d88a1257c2..a70d84b3ff92d1f90c80c64c0a2fb1d25135f15f 100755 (executable)
@@ -7,6 +7,10 @@ USE_PROCD=1
 BIN=/usr/bin/qemu-ga
 
 start_service() {
+       if [ ! -d /dev/virtio-ports ];then
+               logger -t qemu-ga -p daemon.notice "/dev/virtio-ports not found. Skipping qemu-ga (this is normal on bare metal device)."
+               return 0
+       fi
        procd_open_instance
        procd_set_param command $BIN
        procd_set_param respawn
git clone https://git.99rst.org/PROJECT