r13745 break sdl support
all,
qemu with sdl always end up with "-nographic" since r13745 (Merge VFB support for PV and HVM guests.)
attached patch can fix it.
but vnc hvm guest still fail restore with
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/XendDomainInfo.py", line 1261, in _createDevices
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/XendDomainInfo.py", line 1237, in _createDevice
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/server/vfbif.py", line 48, in createDevice
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/server/DevController.py", line 111, in createDevice
VmError: Device 0 (vfb) is already connected.
thanks,
edwin
tools/python/xen/xend/image.py +8 -5
@@ -451,6 +451,11 @@ class HVMImageHandler(ImageHandler): vnc_config = {} has_vfb = False has_vnc = int(vmConfig['image'].get('vnc', 0)) != 0 + has_sdl = int(vmConfig['image'].get('sdl', 0)) != 0 + if not has_vfb and not has_vnc and not has_sdl: + ret.append('-nographic') + return ret + for dev_uuid in vmConfig['console_refs']: dev_type, dev_info = vmConfig['devices'][dev_uuid] if dev_type == 'vfb':
@@ -458,15 +463,13 @@ class HVMImageHandler(ImageHandler): has_vfb = True break + if not has_vnc: + return ret + if not vnc_config: for key in ('vncunused', 'vnclisten', 'vncdisplay', 'vncpasswd'): if key in vmConfig['image']: vnc_config[key] = vmConfig['image'][key] - - if not has_vfb and not has_vnc: - ret.append('-nographic') - return ret - if not vnc_config.get('vncunused', 0) and \ vnc_config.get('vncdisplay', 0):
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Edwin
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/server/DevController.py", line 111, in createDevice
VmError: Device 0 (vfb) is already connected.
This will hopefully be fixed soon -- in the meantime this patch allows me to restore domains again:
tools/python/xen/xend/XendConfig.py +3 -0
@@ -671,6 +671,9 @@ class XendConfig(dict): if self['devices'][console_uuid][1].get('protocol') == 'rfb': has_rfb = True break + if self['devices'][console_uuid][0] == 'vfb': + has_rfb = True + break if not has_rfb: dev_config = ['vfb']
Ewan Mellor
AppliedQuoted 13 lines · Tim Deegan
Quoted 4 lines · Edwin
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/server/DevController.py", line 111, in createDevice
VmError: Device 0 (vfb) is already connected.This will hopefully be fixed soon -- in the meantime this patch allows me to restore domains again:
diff -r
5d09e6098f93tools/python/xen/xend/XendConfig.py
tools/python/xen/xend/XendConfig.py class XendConfig(dict): · line 679
Quoted 9 lines
tools/python/xen/xend/XendConfig.py +3
-0@@ -671,6 +671,9 @@ class XendConfig(dict): if self['devices'][console_uuid][1].get('protocol') == 'rfb': has_rfb = True break + if self['devices'][console_uuid][0] == 'vfb': + has_rfb = True + break if not has_rfb: dev_config = ['vfb']
Applied.
Ewan.
Quoted 52 lines · Edwin
all,
qemu with sdl always end up with "-nographic" since r13745 (Merge VFB support for PV and HVM guests.)attached patch can fix it.
Signed-off-by Zhai Edwin <[email protected]>but vnc hvm guest still fail restore with
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/XendDomainInfo.py", line 1261, in_createDevices
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/XendDomainInfo.py", line 1237, in_createDevice
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/server/vfbif.py", line 48, in createDevice
File
"/home/gzhai/srcs/hg/tip/dist/install/usr/lib/python/xen/xend/server/DevController.py", line 111, in createDevice
VmError: Device 0 (vfb) is already connected.thanks,
edwindiff -r
142d79732c66tools/python/xen/xend/image.pytools/python/xen/xend/image.py +8
-0@@ -451,6 +451,11 @@ class HVMImageHandler(ImageHandler): vnc_config = {} has_vfb = False has_vnc = int(vmConfig['image'].get('vnc', 0)) != 0 + has_sdl = int(vmConfig['image'].get('sdl', 0)) != 0 + if not has_vfb and not has_vnc and not has_sdl: + ret.append('-nographic') + return ret + for dev_uuid in vmConfig['console_refs']: dev_type, dev_info = vmConfig['devices'][dev_uuid] if dev_type == 'vfb':@@ -458,15 +463,13 @@ class HVMImageHandler(ImageHandler): has_vfb = True break + if not has_vnc: + return ret + if not vnc_config: for key in ('vncunused', 'vnclisten', 'vncdisplay', 'vncpasswd'):
tools/python/xen/xend/image.py class HVMImageHandler(ImageHandler): · line 475
Quoted 10 lines
tools/python/xen/xend/image.py +0
-5if key in vmConfig['image']: vnc_config[key] = vmConfig['image'][key] - - if not has_vfb and not has_vnc: - ret.append('-nographic') - return ret - if not vnc_config.get('vncunused', 0) and \ vnc_config.get('vncdisplay', 0):
I've fixed this. Your patch conflicted with what Ali was doing to import the new console support in the Xen-API, so I've done something a little different, but hopefully it fixes the problem for you.
Thanks,
Ewan.