WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fix SDL option for HVM domains.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix SDL option for HVM domains.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Feb 2007 13:35:17 -0800
Delivery-date: Thu, 01 Feb 2007 13:36:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1170344640 0
# Node ID f84ba62ca615e67f297820455c76f4a061e32490
# Parent  1fb0302683d34317d363f5e7b627fb432f1ac19e
Fix SDL option for HVM domains.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/image.py |   70 +++++++++++++++++++++--------------------
 1 files changed, 36 insertions(+), 34 deletions(-)

diff -r 1fb0302683d3 -r f84ba62ca615 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Thu Feb 01 15:32:16 2007 +0000
+++ b/tools/python/xen/xend/image.py    Thu Feb 01 15:44:00 2007 +0000
@@ -449,48 +449,50 @@ class HVMImageHandler(ImageHandler):
             return ret
 
         vnc_config = {}
-        has_vfb = False
         has_vnc = int(vmConfig['image'].get('vnc', 0)) != 0
+        has_sdl = int(vmConfig['image'].get('sdl', 0)) != 0
         for dev_uuid in vmConfig['console_refs']:
             dev_type, dev_info = vmConfig['devices'][dev_uuid]
             if dev_type == 'vfb':
                 vnc_config = dev_info.get('other_config', {})
-                has_vfb = True
+                has_vnc = True
                 break
 
-        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:
+        if has_vnc:
+            if not vnc_config:
+                for key in ('vncunused', 'vnclisten', 'vncdisplay',
+                            'vncpasswd'):
+                    if key in vmConfig['image']:
+                        vnc_config[key] = vmConfig['image'][key]
+
+            if not vnc_config.get('vncunused', 0) and \
+                   vnc_config.get('vncdisplay', 0):
+                ret.append('-vnc')
+                ret.append(str(vncdisplay))
+            else:
+                ret.append('-vncunused')
+
+            vnclisten = vnc_config.get('vnclisten',
+                                       xenopts().get_vnclisten_address())
+            ret.append('-vnclisten')
+            ret.append(str(vnclisten))
+
+            # Store vncpassword in xenstore
+            vncpasswd = vnc_config.get('vncpasswd')
+            if not vncpasswd:
+                vncpasswd = xenopts().get_vncpasswd_default()
+
+            if vncpasswd is None:
+                raise VmError('vncpasswd is not setup in vmconfig or '
+                              'xend-config.sxp')
+
+            if vncpasswd != '':
+                self.vm.storeVm('vncpasswd', vncpasswd)
+        elif has_sdl:
+            # SDL is default in QEMU.
+            pass
+        else:
             ret.append('-nographic')
-            return ret
-
-                    
-        if not vnc_config.get('vncunused', 0) and \
-               vnc_config.get('vncdisplay', 0):
-            ret.append('-vnc')
-            ret.append(str(vncdisplay))
-        else:
-            ret.append('-vncunused')
-
-        vnclisten = vnc_config.get('vnclisten',
-                                   xenopts().get_vnclisten_address())
-        ret.append('-vnclisten')
-        ret.append(str(vnclisten))
-        
-        # Store vncpassword in xenstore
-        vncpasswd = vnc_config.get('vncpasswd')
-        if not vncpasswd:
-            vncpasswd = xenopts().get_vncpasswd_default()
-                    
-        if vncpasswd is None:
-            raise VmError('vncpasswd is not setup in vmconfig or '
-                          'xend-config.sxp')
-
-        if vncpasswd != '':
-            self.vm.storeVm('vncpasswd', vncpasswd)
 
         return ret
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix SDL option for HVM domains., Xen patchbot-unstable <=