Skip to content
Snippets Groups Projects
Commit 5bad0f30 authored by Anael Beutot's avatar Anael Beutot
Browse files

Fix open_console method for VirtualMachine

parent 0e5ef132
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment