Check for /dev/kvm instead of kvm-ok

Fix #411
This commit is contained in:
Julien Duponchelle committed 2016-01-26 13:58:29 +01:00
1 parent 425a05ecd8
commit ee2104ba35
2 files changed
+14 -16

No files matched your search

+9 -13
View File
@@ -49,21 +49,17 @@ class Qemu(BaseManager):
"""
kvm = []
try:
process = yield from asyncio.create_subprocess_exec("kvm-ok")
yield from process.wait()
except OSError:
if not os.path.exists("/dev/kvm"):
return kvm
if process.returncode == 0:
arch = platform.machine()
if arch == "x86_64":
kvm.append("x86_64")
kvm.append("i386")
elif arch == "i386":
kvm.append("i386")
else:
kvm.append(platform.machine())
arch = platform.machine()
if arch == "x86_64":
kvm.append("x86_64")
kvm.append("i386")
elif arch == "i386":
kvm.append("i386")
else:
kvm.append(platform.machine())
return kvm
@staticmethod