xen/xenapi-console-protocol.patch

20 lines
831 B
Diff
Raw Normal View History

Index: xen-4.1.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -3934,6 +3934,14 @@ class XendDomainInfo:
if not config.has_key('backend'):
config['backend'] = "00000000-0000-0000-0000-000000000000"
+ if dev_class == 'console':
+ if not config.has_key('protocol'):
+ con_type = config.get('type', '')
+ if con_type == 'vnc':
+ config['protocol'] = 'rfb'
+ elif con_type == 'sdl':
+ config['protocol'] = 'rdp'
+
return config
def get_dev_property(self, dev_class, dev_uuid, field):