From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
---
include/libvirt/libvirt-domain.h | 1 +
src/libvirt-domain.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index d81157ccaf..60fa8c6719 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -5070,6 +5070,7 @@ typedef enum {
VIR_DOMAIN_GUEST_INFO_TIMEZONE = (1 << 2), /* return timezone information */
VIR_DOMAIN_GUEST_INFO_HOSTNAME = (1 << 3), /* return hostname information */
VIR_DOMAIN_GUEST_INFO_FILESYSTEM = (1 << 4), /* return filesystem information
*/
+ VIR_DOMAIN_GUEST_INFO_DISKS = (1 << 5), /* return disks information */
} virDomainGuestInfoTypes;
int virDomainGetGuestInfo(virDomainPtr domain,
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 63d4954e68..c837ecbcc3 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -12341,6 +12341,23 @@ virDomainSetVcpu(virDomainPtr domain,
* "fs.<num>.disk.<num>.serial" - the serial number of the
disk
* "fs.<num>.disk.<num>.device" - the device node of the disk
*
+ * VIR_DOMAIN_GUEST_INFO_DISKS:
+ * Returns information about the disks within the domain. The typed
+ * parameter keys are in this format:
+ *
+ * "disks.count" - the number of disks defined on this domain
+ * as an unsigned int
+ * "disks.<num>.name" - device node (Linux) or device UNC (Windows)
+ * "disks.<num>.partition" - whether this is a partition or disk
+ * "disks.<num>.dependencies.count" - the number of device
dependencies
+ * e.g. for LVs of the LVM this will
+ * hold the list of PVs, for LUKS encrypted volume this will
+ * contain the disk where the volume is placed. (Linux)
+ * "disks.<num>.dependencies.<num>.name" - a dependency
+ * "disks.<num>.alias" - the device alias of the disk (e.g. sda)
+ * "disks.<num>.guest_alias" - optional alias assigned to the disk,
on Linux
+ * this is a name assigned by device mapper
+ *
* VIR_DOMAIN_GUEST_INFO_HOSTNAME:
* Returns information about the hostname of the domain. The typed
* parameter keys are in this format:
--
2.29.0