if not self.virtual:
return None
- # If the script already returned a hypervisor, we return the name.
- if self.__info["hypervisor"]:
+ # Some of the hypervisors can be detected in a right way.
+ # We can return them at this place.
+ if self.__info["hypervisor"] in ("Xen", "VMWare", "KVM"):
return self.__info["hypervisor"]
- # XXX fill in some code to detect hypervisors, that do
+ # Citrix Xen says it is Microsoft Hv.
+ if self.__info["hypervisor"] == "Microsoft" and \
+ self.system.bios_vendor == "Xen":
+ return "Xen"
+
+ # XXX fill in some code to detect more hypervisors, that do
# not say their name.
return "unknown"