From da0f3d61c4ac026f7b86b8c91bbfad9b861864a9 Mon Sep 17 00:00:00 2001 From: qihao_yewu Date: Fri, 21 Nov 2025 01:35:57 -0500 Subject: [PATCH] qga: ignore channel_init() fail if 'retry_path' is set cheery-pick from b44c8a6d837ed4e082dd03d79095a4e9141eff5b On Windows, we run QGA with `-d --retry-path` options by default, and expect that QGA will start even without the vioserial driver and will wait for communication forever. Reviewed-by: Yan Vugenfirer Reviewed-by: Michal Privoznik Link: https://lore.kernel.org/qemu-devel/20250825140549.146617-3-kkostiuk@redhat.com Signed-off-by: Kostiantyn Kostiuk Signed-off-by: qihao_yewu --- qga/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index 8d341ffdf1..b7acdd01eb 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1480,8 +1480,12 @@ static GAState *initialize_agent(GAConfig *config, int socket_activation) if (!channel_init(s, s->config->method, s->config->channel_path, s->socket_activation ? FIRST_SOCKET_ACTIVATION_FD : -1)) { - g_critical("failed to initialize guest agent channel"); - return NULL; + if (s->config->retry_path) { + g_info("failed to initialize guest agent channel, will retry"); + } else { + g_critical("failed to initialize guest agent channel"); + return NULL; + } } if (config->daemonize) { -- Gitee