From 499e4daf728ed5be772693d182a4d1f105e69d74 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 19 Jan 2026 12:00:50 +0000 Subject: [PATCH] lib/qemu.c: Don't start the guest when checking QMP properties When checking for QMP properties, we run a qemu command and interact with the QMP console. However we also start the guest running (there is no actual guest in this situation). This occasionally causes this line to be printed: libguestfs: generic_qmp_test: 3: {"timestamp": {"seconds": 1768823946, "microseconds": 898287}, "event": "GUEST_PANICKED", "data": {"action": "poweroff", "info": {"core": 0, "psw-addr": 0, "reason": "disabled-wait", "psw-mask": 562956395872256, "type": "s390"}}}\r\n which confuses our parser. As there is no reason to start the non-existent guest, add the -S option which causes qemu to start up in a paused state. For some reason this only happens on s390x but I think it could happen on all architectures, so it may be a timing issue or something particular about s390x firmware. (cherry picked from commit 5da8102f5f59b9781075440dc68c8d08f9c8691e) --- lib/qemu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/qemu.c b/lib/qemu.c index d74907573..19b5aa336 100644 --- a/lib/qemu.c +++ b/lib/qemu.c @@ -89,6 +89,7 @@ generic_qmp_test (guestfs_h *g, const char *qmp_command, char **outp) #endif "accel=kvm:hvf:tcg"); guestfs_int_cmd_add_string_unquoted (cmd, " -qmp stdio"); + guestfs_int_cmd_add_string_unquoted (cmd, " -S"); guestfs_int_cmd_clear_capture_errors (cmd); fd = guestfs_int_cmd_pipe_run (cmd, "r");