Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit b17faec

Browse files
committed
caps: Don't report lack of hw virt if xen has hvm guests
1 parent 96c4915 commit b17faec

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

virtinst/CapabilitiesParser.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,12 @@ def hw_virt_supported(self):
522522
sufficiently provided, so we will return True in cases that we
523523
aren't sure.
524524
"""
525+
has_hvm_guests = False
526+
for g in self.guests:
527+
if g.os_type == "hvm":
528+
has_hvm_guests = True
529+
break
530+
525531
# Obvious case of feature being specified
526532
if (self.host.features["vmx"] == FEATURE_ON or
527533
self.host.features["svm"] == FEATURE_ON):
@@ -534,7 +540,10 @@ def hw_virt_supported(self):
534540

535541
# Xen caps have always shown this info, so if we didn't find any
536542
# features, the host really doesn't have the necc support
537-
if self._is_xen():
543+
#
544+
# Although new xen seems to block the vmx/svm feature bits from
545+
# cpuinfo? so make sure no hvm guests are listed
546+
if self._is_xen() and not has_hvm_guests:
538547
return False
539548

540549
# Otherwise, we can't be sure, because there was a period for along

0 commit comments

Comments
 (0)