mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
1 parent
425a05ecd8
commit
ee2104ba35
2 files changed
+14
-16
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user