[ovirt-users] SPICE/VNC shared consoles

Markus Stockhausen stockhausen at collogia.de
Mon Nov 9 07:17:22 UTC 2015


> Von: users-bounces at ovirt.org [users-bounces at ovirt.org]" im Auftrag von "Budur Nagaraju [nbudoor at gmail.com]
> Gesendet: Montag, 9. November 2015 05:53
> An: users
> Betreff: [ovirt-users] Multiple console access
> 
> HI ,
> 
> AM using SPICE console to access the vm console ,how to enable multi user console access.
> 
> Thanks,
> 
> Nagaraju

Not yet possible via webadmin configuration. But you can do a small "hack" to achieve this. The
following 2 steps will allow shared VNC and SPICE consoles.

1) create a new start hook e.g. /usr/libexec/vdsm/hooks/before_vm_start/spice_mc.py

#!/usr/bin/python

import os
import sys
import hooking
import traceback

domxml = hooking.read_domxml()

# Add header tag to allow command line manipulation

d = domxml.getElementsByTagName('domain')[0]
d.setAttribute('xmlns:qemu','http://libvirt.org/schemas/domain/qemu/1.0')

# Add environment variable to allow shared SPICE consoles

c = domxml.createElement('qemu:commandline')
p = domxml.createElement('qemu:env')
p.setAttribute('name','SPICE_DEBUG_ALLOW_MC')
p.setAttribute('value','1')
c.appendChild(p)

# Add environment variables to domain

# Modify graphics tag to allow shared VNC consoles

g = domxml.getElementsByTagName('graphics')[0]
g.setAttribute('connected','keep')
g.setAttribute('sharePolicy','ignore')

d.appendChild(c)

# Writeback domain

hooking.write_domxml(domxml)

# Script end

2) Modify /usr/share/vdsm/rpc/BindingXMLRPC.py

Old: return vm.setTicket(password, ttl, existingConnAction, params)
New: return vm.setTicket(password, ttl, 'keep', params)

Markus
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: InterScan_Disclaimer.txt
URL: <http://lists.ovirt.org/pipermail/users/attachments/20151109/021e67e4/attachment-0001.txt>


More information about the Users mailing list