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-devel

Re: [Xen-devel] r13745 break sdl support

To: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Subject: Re: [Xen-devel] r13745 break sdl support
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Thu, 1 Feb 2007 15:44:59 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 01 Feb 2007 07:44:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45C17D80.5030507@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <45C17D80.5030507@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Thu, Feb 01, 2007 at 01:41:20PM +0800, Zhai, Edwin wrote:

> 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 <edwin.zhai@xxxxxxxxx>
> 
> 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
> 

> diff -r 142d79732c66 tools/python/xen/xend/image.py
> --- a/tools/python/xen/xend/image.py  Fri Sep 15 17:05:38 2006 +0800
> +++ b/tools/python/xen/xend/image.py  Thu Feb 01 13:28:10 2007 +0800
> @@ -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):

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.


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

<Prev in Thread] Current Thread [Next in Thread>