Skip to contentSkip to conversation

libxl: allow to run non-HVM guest without any device model being available

PATCH In review Juergen Gross 2 participants 2 messages Jul 11, 2025 – Jul 24, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: allow to run non-HVM guest without any device model being available

When removing qemu-trad support, libxl__domain_build_info_setdefault() was modified to only allow qemu-xen as a device model. This change resulted in an error at domain creation when qemu-xen isn't there.

As this is a perfectly fine situation for PV and PVH guests without any qemu based backends, handle this case gracefully.

Fixes 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional")
---
 tools/libs/light/libxl_create.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libs/light/libxl_create.c +2 -2
index 8a85fba1cf..dad7ad0fda 100644
@@ -105,8 +105,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
         dm = libxl__domain_device_model(gc, b_info);
         rc = access(dm, X_OK);
         if (rc < 0) {
-            LOGE(ERROR, "qemu-xen access error");
-            return ERROR_FAIL;
+            LOGE(INFO, "qemu-xen is unavailable");
+            b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_UNKNOWN;
         }
     }
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Juergen Gross

When removing qemu-trad support, libxl__domain_build_info_setdefault() was modified to only allow qemu-xen as a device model. This change resulted in an error at domain creation when qemu-xen isn't there.

As this is a perfectly fine situation for PV and PVH guests without any qemu based backends, handle this case gracefully.

Fixes 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional")

Thanks,

Signature · 1 line
Anthony PERARD