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] [PATCH][VT] Fix vnc configure problem for vmx guest

To: "Ewan Mellor" <ewan@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH][VT] Fix vnc configure problem for vmx guest
From: "Ling, Xiaofeng" <xiaofeng.ling@xxxxxxxxx>
Date: Fri, 23 Sep 2005 23:12:26 +0800
Delivery-date: Fri, 23 Sep 2005 15:10:14 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXAIIjFWAoKLEAUTVOZhEa/2at/UQAL47qA
Thread-topic: [Xen-devel] [PATCH][VT] Fix vnc configure problem for vmx guest
see attach mail. That is why configVNC is seperated.
I know this fix is not seems so ideal, 
I'd like to know if you have good idea for the problem.

Ewan Mellor <> wrote:
> On Fri, Sep 23, 2005 at 08:31:39AM +0800, Ling, Xiaofeng wrote:
> 
>> Fix vnc configure problem for vmx guest induced in 6984,
> 
> Hi Xiofeng,
> 
> Sorry for breaking your code yesterday, but could you please explain
> to me how it broke?  I don't understand what was wrong, because as
> far as I can see, configVNC only depends on the config it receives,
> so moving it shouldn't have made any difference.  Obviously it did,
> so could you explain it to me please?    
> 
> I specifically don't want to apply your patch because I want remove
> the dependency from image.py to self.info, and your patch puts that
> dependency back.  
> 
> Thanks,
> 
> Ewan.
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
--- Begin Message ---
To: <Christian.Limpach@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] fix the control panel problem for latest tree
From: "Ling, Xiaofeng" <xiaofeng.ling@xxxxxxxxx>
Date: Tue, 20 Sep 2005 12:53:54 +0800
Cc: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Attach is patch to fix the problem when using vnc instead of SDL.
Because new image handling structure move configurtion to image
handle creating, at that time, the domain struct is not created yet,
so vnc code can not get domid.
In this patch, I split the image configuration into two parts.
maybe not so ideal, but just simple.

Christian Limpach wrote:
> Thanks!
> 
> On 9/16/05, Ling, Xiaofeng <xiaofeng.ling@xxxxxxxxx> wrote:
> 
>>The new image handling structure break the vmx guest loading, this patch
>>fix it.
>>
>>Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
>>
>>diff -r fe916b4a7d74 -r 089ec1b6817c tools/python/xen/xend/image.py
>>--- a/tools/python/xen/xend/image.py    Fri Sep 16 02:53:39 2005
>>+++ b/tools/python/xen/xend/image.py    Fri Sep 16 06:30:21 2005
>>@@ -271,9 +271,10 @@
>>    def configure(self, config):
>>        ImageHandler.configure(self, config)
>>        if not config:
>>-            self.memmap, self.dmargs, self.device_model, self.display = 
>>self.vm.gatherVm(
>>+            self.memmap, dmargs, self.device_model, self.display = 
>>self.vm.gatherVm(
>>                ("image/memmap"), ("image/dmargs"), ("image/device-model"),
>>                ("image/display"))
>>+            self.dmargs = dmargs.split(' ')
>>            return
>>
>>        self.memmap = sxp.child_value(config, 'memmap')
>>@@ -283,10 +284,10 @@
>>            raise VmError("vmx: missing device model")
>>        self.display = sxp.child_value(config, 'display')
>>
>>-        self.storeVm(("image/memmap", self.memmap),
>>-                     ("image/dmargs", self.dmargs),
>>-                     ("image/device-model", self.device_model),
>>-                     ("image/display", self.display))
>>+        self.vm.storeVm(("image/memmap", self.memmap),
>>+                        ("image/dmargs", " ".join(self.dmargs)),
>>+                        ("image/device-model", self.device_model),
>>+                        ("image/display", self.display))
>>
>>    def createImage(self):
>>        """Create a VM for the VMX environment.
>>@@ -346,7 +347,7 @@
>>                ret.append("%s" % v)
>>
>>        # Handle disk/network related options
>>-        devices = sxp.children(config, 'device')
>>+        devices = sxp.children(self.vm.config, 'device')
>>        for device in devices:
>>            name = sxp.name(sxp.child0(device))
>>            if name == 'vbd':
>>
>>
>>_______________________________________________
>>Xen-devel mailing list
>>Xen-devel@xxxxxxxxxxxxxxxxxxx
>>http://lists.xensource.com/xen-devel
>>
>>
>>
>>
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

# HG changeset patch
# User Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
# Node ID e8d938a4dcc90108739635489b01c99a33305045
# Parent  53cbced17c98f009c8cf534358979d9115b8657d
fix vnc configuration issue for creating vmx guest

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>

diff -r 53cbced17c98 -r e8d938a4dcc9 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Fri Sep 16 06:41:40 2005
+++ b/tools/python/xen/xend/image.py    Mon Sep 19 02:35:32 2005
@@ -294,6 +294,7 @@
         """
         self.parseMemmap()
         self.createDomain()
+        self.dmargs  += self.configVNC(sxp.child_value(self.vm.config, 
'image'))
 
     def buildDomain(self):
         # Create an event channel
@@ -377,10 +378,13 @@
                instance = sxp.child_value(vtpminfo, 'instance')
                ret.append("-instance")
                ret.append("%s" % instance)
-
+        return ret
+
+    def configVNC(self, config):
         # Handle graphics library related options
         vnc = sxp.child_value(config, 'vnc')
         sdl = sxp.child_value(config, 'sdl')
+        ret = []
         nographic = sxp.child_value(config, 'nographic')
         if nographic:
             ret.append('-nographic')

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