From 393bb0047100661a0048ab79129b3c3e3b36f697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 9 Feb 2015 03:46:53 +0100 Subject: [PATCH] core: update reporting for missing VT-x --- core-modules/01QubesHVm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core-modules/01QubesHVm.py b/core-modules/01QubesHVm.py index 1e45fbef..a1ac36a5 100644 --- a/core-modules/01QubesHVm.py +++ b/core-modules/01QubesHVm.py @@ -31,6 +31,7 @@ import sys import re import shutil import stat +from xml.etree import ElementTree from qubes.qubes import QubesVm,register_qubes_vm_class,vmm,dry_run from qubes.qubes import system_path,defaults @@ -371,7 +372,10 @@ class QubesHVm(QubesVm): kwargs['mem_required'] = (self.memory + 32) * 1024 * 1024 return super(QubesHVm, self).start(*args, **kwargs) except QubesException as e: - if xc.physinfo()['virt_caps'].count('hvm') == 0: + capabilities = vmm.libvirt_conn.getCapabilities() + tree = ElementTree.fromstring(capabilities) + os_types = tree.findall('./guest/os_type') + if 'hvm' not in map(lambda x: x.text, os_types): raise QubesException("Cannot start HVM without VT-x/AMD-v enabled") else: raise