F14 doesn't have inspect_get_product_variant (F15 does). The only thing it's
needed for is differentiating Win7 from Win2k8r2 when writing to RHEV, so work
round it if it's not there.
---
lib/Sys/VirtConvert/Connection/RHEVTarget.pm | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/lib/Sys/VirtConvert/Connection/RHEVTarget.pm
b/lib/Sys/VirtConvert/Connection/RHEVTarget.pm
index 5f0fe47..687f745 100644
--- a/lib/Sys/VirtConvert/Connection/RHEVTarget.pm
+++ b/lib/Sys/VirtConvert/Connection/RHEVTarget.pm
@@ -848,7 +848,11 @@ sub _get_os_type_windows
}
if ($major == 6 && $minor == 1) {
- if ($g->inspect_get_product_variant($root) eq 'Client') {
+ # This API is new in libguestfs 1.10
+ # If it's not present, we can't differentiate between Win7 and Win2k8r2
+ if ($g->can('inspect_get_product_variant') &&
+ $g->inspect_get_product_variant($root) eq 'Client')
+ {
return "Windows7".$arch_suffix;
}
--
1.7.4.4