]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: Fix domxml-to-native conversion
authorJim Fehlig <jfehlig@suse.com>
Mon, 29 Apr 2024 20:50:07 +0000 (14:50 -0600)
committerJim Fehlig <jfehlig@suse.com>
Thu, 2 May 2024 21:57:29 +0000 (15:57 -0600)
commit3146305fd3a610573963fe4858cc12ec1c4cf5c7
treee47f09fefabb7072b86d9f5f2ca655c5c1d1cd68
parentfa5459517848f333743c771e90eb01faeced3dae
libxl: Fix domxml-to-native conversion

Similar to commit 57d084febe, another case of the libxl driver not
adapting to modular daemons. When converting configuration that
contains a type='network' interface, the converter calls
virNetworkLookupByName, passing the hypervisor connection object
instead of a connection to virtnetworkd. E.g.

> cat dom.xml
...
    <interface type='network'>
      <source network='default'/>
    </interface>
...
> virsh net-info default
Name:           default
UUID:           25a5b089-1e71-4956-99aa-df2213bbb407
Active:         yes
Persistent:     no
Autostart:      no
Bridge:         virbr0
> virsh domxml-to-native xen-xl dom.xml
error: Network not found: default

Acquire a connection to virtnetworkd and use it when calling
virNetwork* APIs.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libxl/libxl_driver.c
src/libxl/xen_common.c
src/libxl/xen_common.h
src/libxl/xen_xl.c
src/libxl/xen_xl.h
src/libxl/xen_xm.c
src/libxl/xen_xm.h
tests/xlconfigtest.c
tests/xmconfigtest.c