On 2/19/26 10:31 PM, Jonathon Jongsma via Devel wrote:
This adds initial support for virDomainGetBlockInfo() for the hyperv driver. It currently supports: - physical disk drives that are assigned to a vm - virtual disk drives backed by a .VHD file that are local to the host - other drives backed by local files (e.g. cdrom with a .iso)
It will fail to get allocation and physical values for any drives backed by files that are not local to the host (e.g. on network shares)
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- src/hyperv/hyperv_driver.c | 205 ++++++++++++++++++++++++++ src/hyperv/hyperv_wmi.c | 41 ++++++ src/hyperv/hyperv_wmi.h | 7 + src/hyperv/hyperv_wmi_generator.input | 109 ++++++++++++++ 4 files changed, 362 insertions(+)
Squash this in: diff --git i/src/hyperv/hyperv_driver.c w/src/hyperv/hyperv_driver.c index e332b8a860..a363c58a3c 100644 --- i/src/hyperv/hyperv_driver.c +++ w/src/hyperv/hyperv_driver.c @@ -26,8 +26,6 @@ #include "internal.h" #include "datatypes.h" -#include "libvirt/libvirt.h" -#include "libvirt/virterror.h" #include "virbuffer.h" #include "virdomainobjlist.h" #include "virauth.h" @@ -3917,7 +3915,9 @@ hypervGetVirtualDiskBlockInfo(hypervPrivate *priv, /* if both queries were unsuccessful, just return an error */ if (rcapacity < 0 && rallocation < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Unable to get info for disk '%s'"), diskpath); + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unable to get info for disk '%1$s'"), + diskpath); return -1; } diff --git i/src/hyperv/hyperv_wmi.c w/src/hyperv/hyperv_wmi.c index 90bbc42b6d..4611833142 100644 --- i/src/hyperv/hyperv_wmi.c +++ w/src/hyperv/hyperv_wmi.c @@ -31,7 +31,6 @@ #include <u/syslog.h> #include "internal.h" -#include "libvirt/virterror.h" #include "virerror.h" #include "datatypes.h" #include "viralloc.h" Michal