From: Jim Fehlig Date: Fri, 22 Sep 2023 18:20:35 +0000 (-0600) Subject: libxl: Fix connection to modular network daemon X-Git-Tag: v9.8.0-rc1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57d084febe7aeebd6e3b13f6276cb3fd2fc28c36;p=thirdparty%2Flibvirt.git libxl: Fix connection to modular network daemon In a modular daemon configuration, virtxend does not support the virNetwork* APIs. It should open a connection to virtnetworkd when using those APIs, but currently always opens a connection to "xen:///system". Switch to using virGetConnectNetwork to obtain a valid connection instead of using the hardcoded URI. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrangé --- diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 4582126d19..62e1be6672 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1372,7 +1372,7 @@ libxlMakeNic(virDomainDef *def, break; case VIR_DOMAIN_NET_TYPE_NETWORK: { - if (!(conn = virConnectOpen("xen:///system"))) + if (!(conn = virGetConnectNetwork())) goto cleanup; if (!(network =