1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

check if host supports kvm, if it is, use kvm else qemu

This commit is contained in:
catborise 2019-12-25 14:34:55 +03:00
parent 9d58e56d16
commit e87d7463fe

View file

@ -351,7 +351,7 @@ class wvmConnect(object):
def get_dom_cap_xml(self, arch, machine): def get_dom_cap_xml(self, arch, machine):
""" Return domain capabilities xml""" """ Return domain capabilities xml"""
emulatorbin = self.get_emulator(arch) emulatorbin = self.get_emulator(arch)
virttype = self.get_hypervisors_domain_types()[arch][0] virttype = 'kvm' if 'kvm' in self.get_hypervisors_domain_types()[arch] else 'qemu'
machine_types = self.get_machine_types(arch) machine_types = self.get_machine_types(arch)
if not machine or machine not in machine_types: if not machine or machine not in machine_types: