[PATCH 01/11] virConnectDomainXMLToNative: Add note about dynamically configured features

Peter Krempa pkrempa at redhat.com
Mon May 16 15:12:31 UTC 2022


In the qemu driver certain configs such as disk throttling or CPU
hotplug is configured by interacting with the monitor at the startup
phase of the hypervisor and thus is not part of the "native config" as
returned by 'virConnectDomainXMLToNative'.

Similarly at least the commandline for qemu contains resources passed
via file descriptors which are obviously not part of the returned
"native config".

Add a paragraph into the documentation outlining that the native
configuration might not be completely usable.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/libvirt-domain.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index a32630a6e9..e3ced700b8 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -2909,6 +2909,13 @@ virConnectDomainXMLFromNative(virConnectPtr conn,
  * a native configuration file describing the domain.
  * The format of the native data is hypervisor dependent.
  *
+ * Note that certain hypervisor drivers such as the QEMU driver configure many
+ * aspects of the domain dynamically via hypervisor APIs and that may not be
+ * part of the returned native configuration format. Similarly certain resources
+ * are passed to the hypervisor via file descriptors, which are not part of the
+ * native configuration returned by this API. Such configuration is thus not
+ * trivially usable outside of libvirt.
+ *
  * Returns a 0 terminated UTF-8 encoded native config datafile, or
  * NULL in case of error. The caller must free() the returned value.
  *
-- 
2.35.3



More information about the libvir-list mailing list