From 5bad0f30d9cbb601f673270d749e1618eb536ba4 Mon Sep 17 00:00:00 2001
From: Anael Beutot <anael.beutot@smartjog.com>
Date: Tue, 6 Nov 2012 15:59:03 +0100
Subject: [PATCH] Fix open_console method for VirtualMachine

---
 cloudcontrol/node/hypervisor/domains/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cloudcontrol/node/hypervisor/domains/__init__.py b/cloudcontrol/node/hypervisor/domains/__init__.py
index feef9e0..e7cc327 100644
--- a/cloudcontrol/node/hypervisor/domains/__init__.py
+++ b/cloudcontrol/node/hypervisor/domains/__init__.py
@@ -194,7 +194,9 @@ class VirtualMachine(object):
         if self.stream is not None:
             raise ConsoleAlreadyOpened('Console for this VM is already'
                                        ' opened')
-        if self.hypervisor.handler.tag_db['libvirtver'].value.startswith('8'):
+        if str(
+            self.hypervisor.handler.tag_db['__main__']['libvirtver'].value,
+        ).startswith('8'):
             raise ConsoleError(
                 'Cannot open console, not compatible with this version of libvirt')
         logger.info('Opening console stream on VM %s', self.name)
-- 
GitLab