From b3c127091ddd1b69adb79fc86458f88f61f7e92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 9 Nov 2013 23:48:49 +0100 Subject: [PATCH] hvm: check for HVM capability on host when failed to start the VM --- core-modules/01QubesHVm.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core-modules/01QubesHVm.py b/core-modules/01QubesHVm.py index ea1b3634..8d69b596 100644 --- a/core-modules/01QubesHVm.py +++ b/core-modules/01QubesHVm.py @@ -251,6 +251,15 @@ class QubesHVm(QubesVm): else: return -1 + def start(self, *args, **kwargs): + try: + super(QubesHVm, self).start(*args, **kwargs) + except QubesException as e: + if xc.physinfo()['virt_caps'].count('hvm') == 0: + raise QubesException("Cannot start HVM without VT-x/AMD-v enabled") + else: + raise + def start_guid(self, verbose = True, notify_function = None): # If user force the guiagent, start_guid will mimic a standard QubesVM if self.guiagent_installed: