On Sun, Nov 24, 2019 at 17:19:48 -0300, jcfaracco(a)gmail.com wrote:
From: Julio Faracco <jcfaracco(a)gmail.com>
There is a lots of possibilities to retrieve hostname information from
domain. Libvirt could use lease information from dnsmasq to get current
hostname too. QEMU supports QEMU-agent but it can use lease source. See
'domifaddr' as an example.
This commit still adds lease options for QEMU. It will get the first
hostname available from domain networks.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
include/libvirt/libvirt-domain.h | 10 +++++
src/driver-hypervisor.h | 1 +
src/libvirt-domain.c | 7 +++-
src/openvz/openvz_driver.c | 30 +++++++++-----
src/qemu/qemu_driver.c | 67 +++++++++++++++++++++++++++-----
src/remote/remote_protocol.x | 1 +
src/remote_protocol-structs | 1 +
src/test/test_driver.c | 1 +
tools/virsh-domain.c | 25 +++++++++++-
9 files changed, 120 insertions(+), 23 deletions(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index a2f007568c..cc3d6ed0ca 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -1554,6 +1554,7 @@ int virDomainGetMaxVcpus (virDomainPtr
domain);
int virDomainGetSecurityLabel (virDomainPtr domain,
virSecurityLabelPtr seclabel);
char * virDomainGetHostname (virDomainPtr domain,
+ unsigned int source,
unsigned int flags);
Public API must never be changed.
NACK