1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-09 01:18:00 +03:00

domain: add disk informations to virDomainGetGuestInfo

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Han Han <hhan@redhat.com>
This commit is contained in:
Marc-André Lureau 2020-11-20 22:09:46 +04:00 committed by Michal Privoznik
parent 8401a586a2
commit 05a75ca2ce
2 changed files with 18 additions and 0 deletions

View File

@ -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,

View File

@ -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: