Commit b52d85c1 authored by Guido Trotter's avatar Guido Trotter
Browse files

KVM: Add function to check the hypervisor version

Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarMichael Hanselmann <>
parent e964cc85
......@@ -212,6 +212,8 @@ class KVMHypervisor(hv_base.BaseHypervisor):
_VERSION_RE = re.compile(r"\b(\d+)\.(\d+)\.(\d+)\b")
......@@ -815,6 +817,21 @@ class KVMHypervisor(hv_base.BaseHypervisor):
return result
def _GetKVMVersion(cls):
"""Return the installed KVM version
@return: (version, v_maj, v_min, v_rev), or None
result = utils.RunCmd([constants.KVM_PATH, "--help"])
if result.failed:
return None
match =[0])
if not match:
return None
return (,,,
def StopInstance(self, instance, force=False, retry=False, name=None):
"""Stop an instance.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment