* RE: [PATCH][VT] Fix vnc configure problem for vmx guest
@ 2005-09-23 15:12 Ling, Xiaofeng
2005-09-23 16:00 ` Ewan Mellor
0 siblings, 1 reply; 8+ messages in thread
From: Ling, Xiaofeng @ 2005-09-23 15:12 UTC (permalink / raw)
To: Ewan Mellor, xen-devel
[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]
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@lists.xensource.com
> http://lists.xensource.com/xen-devel
[-- Attachment #2: Type: message/rfc822, Size: 5415 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 2786 bytes --]
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@intel.com> wrote:
>
>>The new image handling structure break the vmx guest loading, this patch
>>fix it.
>>
>>Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
>>
>>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@lists.xensource.com
>>http://lists.xensource.com/xen-devel
>>
>>
>>
>>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: vncconfig.patch --]
[-- Type: text/x-patch; name="vncconfig.patch", Size: 1250 bytes --]
# HG changeset patch
# User Xiaofeng Ling <xiaofeng.ling@intel.com>
# Node ID e8d938a4dcc90108739635489b01c99a33305045
# Parent 53cbced17c98f009c8cf534358979d9115b8657d
fix vnc configuration issue for creating vmx guest
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
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')
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH][VT] Fix vnc configure problem for vmx guest
2005-09-23 15:12 [PATCH][VT] Fix vnc configure problem for vmx guest Ling, Xiaofeng
@ 2005-09-23 16:00 ` Ewan Mellor
2005-09-26 1:51 ` Xiaofeng Ling
0 siblings, 1 reply; 8+ messages in thread
From: Ewan Mellor @ 2005-09-23 16:00 UTC (permalink / raw)
To: xen-devel
On Fri, Sep 23, 2005 at 11:12:26PM +0800, Ling, Xiaofeng wrote:
> 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.
Thanks for that. I've had a look, and I don't see any reason for ImageHandler
to be created before the domain itself, so I've moved the ImageHandler.create
call so that it is after the xc.domain_create call. This means that you have
the domid available inside configVNC, as necessary.
The change will be pushed to the public server in the next few minutes. Let
me know how you get on.
Thanks,
Ewan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH][VT] Fix vnc configure problem for vmx guest
2005-09-23 16:00 ` Ewan Mellor
@ 2005-09-26 1:51 ` Xiaofeng Ling
2005-09-26 8:41 ` Ewan Mellor
0 siblings, 1 reply; 8+ messages in thread
From: Xiaofeng Ling @ 2005-09-26 1:51 UTC (permalink / raw)
To: Ewan Mellor; +Cc: xen-devel
Ewan Mellor wrote:
> On Fri, Sep 23, 2005 at 11:12:26PM +0800, Ling, Xiaofeng wrote:
>
>
>>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.
>
>
> Thanks for that. I've had a look, and I don't see any reason for ImageHandler
> to be created before the domain itself, so I've moved the ImageHandler.create
> call so that it is after the xc.domain_create call. This means that you have
> the domid available inside configVNC, as necessary.
>
> The change will be pushed to the public server in the next few minutes. Let
> me know how you get on.
Yes, moving ImageGandler.create after domain create resolves the
problem. but I guess the original purpose of putting ImageHandler.create
after domain creating maybe if ImageHanler.ceate fails(some
configuration wrong), there'll be no useless domain struct exists.
So I seperates the configVNC and put it after the domain creating.
Maybe better way is have a pre-config and post-config?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH][VT] Fix vnc configure problem for vmx guest
2005-09-26 1:51 ` Xiaofeng Ling
@ 2005-09-26 8:41 ` Ewan Mellor
0 siblings, 0 replies; 8+ messages in thread
From: Ewan Mellor @ 2005-09-26 8:41 UTC (permalink / raw)
To: xen-devel
On Mon, Sep 26, 2005 at 09:51:17AM +0800, Xiaofeng Ling wrote:
> Yes, moving ImageGandler.create after domain create resolves the
> problem. but I guess the original purpose of putting ImageHandler.create
> after domain creating maybe if ImageHanler.ceate fails(some
> configuration wrong), there'll be no useless domain struct exists.
> So I seperates the configVNC and put it after the domain creating.
> Maybe better way is have a pre-config and post-config?
Well, if the post-config fails, we still have to be able to clean up, so
there's no extra effort in cleaning up after ImageHandler.create as well.
That said, there's no problem having an explicit phase of post-configuration
that sees the image- and device-configuration structures, just as you suggest.
If it's working for you now, I'll leave it alone for this week, but I'll
revisit it later and if it looks neater to have a post-config phase, I'll do
that.
Thanks for all your help,
Ewan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH][VT] Fix vnc configure problem for vmx guest
@ 2005-09-26 8:59 Ling, Xiaofeng
0 siblings, 0 replies; 8+ messages in thread
From: Ling, Xiaofeng @ 2005-09-26 8:59 UTC (permalink / raw)
To: Ewan Mellor, xen-devel
Ewan Mellor <> wrote:
> On Mon, Sep 26, 2005 at 09:51:17AM +0800, Xiaofeng Ling wrote:
>
>> Yes, moving ImageGandler.create after domain create resolves the
>> problem. but I guess the original purpose of putting
>> ImageHandler.create after domain creating maybe if ImageHanler.ceate
>> fails(some configuration wrong), there'll be no useless domain
>> struct exists. So I seperates the configVNC and put it after the
>> domain creating.
>> Maybe better way is have a pre-config and post-config?
>
> Well, if the post-config fails, we still have to be able to clean up,
> so there's no extra effort in cleaning up after ImageHandler.create
> as well.
> That said, there's no problem having an explicit phase of
> post-configuration that sees the image- and device-configuration
> structures, just as you suggest.
>
> If it's working for you now, I'll leave it alone for this week, but
> I'll revisit it later and if it looks neater to have a post-config
> phase, I'll do that.
ok.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH][VT] Fix vnc configure problem for vmx guest
@ 2005-09-23 9:29 Li, Xin B
0 siblings, 0 replies; 8+ messages in thread
From: Li, Xin B @ 2005-09-23 9:29 UTC (permalink / raw)
To: Ewan Mellor, xen-devel
>> 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.
>
Hi Ewan,
configVNC will use domid plus a constant as listening port number to
VNCserver, however at the time it is called, the domain has not been
created yet...
-Xin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH][VT] Fix vnc configure problem for vmx guest
@ 2005-09-23 0:31 Ling, Xiaofeng
2005-09-23 9:23 ` Ewan Mellor
0 siblings, 1 reply; 8+ messages in thread
From: Ling, Xiaofeng @ 2005-09-23 0:31 UTC (permalink / raw)
To: xen-devel List
Fix vnc configure problem for vmx guest induced in 6984,
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
diff -r 10759a44ce3b tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Thu Sep 22 15:12:14 2005
+++ b/tools/python/xen/xend/image.py Fri Sep 23 00:33:50 2005
@@ -283,14 +283,12 @@
self.pid = 0
self.memmap_value = []
- self.dmargs += self.configVNC(imageConfig)
-
-
def createImage(self):
"""Create a VM for the VMX environment.
"""
self.parseMemmap()
self.createDomain()
+ self.dmargs += self.configVNC(self.vm.info['device'])
def buildDomain(self):
# Create an event channel
-------------------
Ling Xiaofeng(Daniel)
Open Source Technology Center
Intel China Software Center
iNet: 8-752-1243
8621-52574545-1243(O)
xfling@users.sourceforge.net
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH][VT] Fix vnc configure problem for vmx guest
2005-09-23 0:31 Ling, Xiaofeng
@ 2005-09-23 9:23 ` Ewan Mellor
0 siblings, 0 replies; 8+ messages in thread
From: Ewan Mellor @ 2005-09-23 9:23 UTC (permalink / raw)
To: xen-devel
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-09-26 8:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-23 15:12 [PATCH][VT] Fix vnc configure problem for vmx guest Ling, Xiaofeng
2005-09-23 16:00 ` Ewan Mellor
2005-09-26 1:51 ` Xiaofeng Ling
2005-09-26 8:41 ` Ewan Mellor
-- strict thread matches above, loose matches on Subject: below --
2005-09-26 8:59 Ling, Xiaofeng
2005-09-23 9:29 Li, Xin B
2005-09-23 0:31 Ling, Xiaofeng
2005-09-23 9:23 ` Ewan Mellor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.