From 35369edf28ef560ca71da00f574561b08175cbde Mon Sep 17 00:00:00 2001 From: Anatoliy Guskov Date: Fri, 27 Nov 2015 09:38:04 +0200 Subject: [PATCH] Fixed Checking KVM --- vrtManager/util.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vrtManager/util.py b/vrtManager/util.py index b152e92..939e5b7 100644 --- a/vrtManager/util.py +++ b/vrtManager/util.py @@ -1,12 +1,11 @@ -import re import random import libxml2 import libvirt def is_kvm_available(xml): - capabilites = re.search('kvm', xml) - if capabilites: + kvm_domains = get_xml_path(xml, "//domain/@type='kvm'") + if kvm_domains > 0: return True else: return False