]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libvirt: pass a directory path into drivers for embedded usage
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 17 May 2019 11:30:45 +0000 (12:30 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 27 Jan 2020 11:02:16 +0000 (11:02 +0000)
commit207709a03149e910323be2c8d1305313b30cdeaa
tree05af37f3b49c17769dfb23c50bd8ed29f502bf66
parentfd2a9dda8758e4273d503f66d8f04c67c20a85f1
libvirt: pass a directory path into drivers for embedded usage

The intent here is to allow the virt drivers to be run directly embedded
in an arbitrary process without interfering with libvirtd. To achieve
this they need to store all their configuration & state in a separate
directory tree from the main system or session libvirtd instances.

This can be useful for doing testing of the virt drivers in "make check"
without interfering with the user's own libvirtd instances.

It can also be used for applications using KVM/QEMU as a piece of
infrastructure to build an service, rather than for general purpose
OS hosting. A long standing example is libguestfs, which would prefer
if its temporary VMs did show up in the main libvirtd VM list, because
this confuses apps such as OpenStack Nova. A more recent example would
be Kata which is using KVM as a technology to build containers.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
17 files changed:
src/driver-state.h
src/interface/interface_backend_netcf.c
src/interface/interface_backend_udev.c
src/libvirt.c
src/libvirt_internal.h
src/libxl/libxl_driver.c
src/lxc/lxc_driver.c
src/network/bridge_driver.c
src/node_device/node_device_hal.c
src/node_device/node_device_udev.c
src/nwfilter/nwfilter_driver.c
src/qemu/qemu_driver.c
src/remote/remote_daemon.c
src/remote/remote_driver.c
src/secret/secret_driver.c
src/storage/storage_driver.c
src/vz/vz_driver.c