On Mon, Aug 07, 2006 at 12:11:17PM -0400, Daniel Veillard wrote: > On Mon, Aug 07, 2006 at 11:55:00AM -0400, Jeremy Katz wrote: > > On Mon, 2006-08-07 at 11:34 -0400, Daniel Veillard wrote: > > > Okay, I nearly did that patch a couple of weeks ago, and then started > > > wondering if the port could not be extracted from some informations provided > > > by xend, but failed to finc anything in the xm --long output or on the > > > xenstore data, and didn't made the change. I really think xend should > > > provide the information, but agreed that's a first step toward sanity at > > > the application level, feel free to commit (unless someone knows how to > > > extract the port from xend !) > > > > It should be in xenstore now[1]... I saw the patch float by the end of > > last week. But we'll probably still want to fall back to this for > > versions of xend that didn't do so. > > > > Jeremy > > > > [1] Looks like under domainpath/console/vnc-port, commit is > > http://xenbits.xensource.com/xen-unstable.hg?cs=155385a02d0b > > Ha ha :-) > > that look way saner to me, except nobody but root can really get the > information (IIRC by default the xenstore _ro socket is not accessible). This actually raises an interesting question. The current code for constructing the XML for a domain is done in the XenD backend - xend_internal.c Extracting the port, however, would require talking to XenStore. All the XenStore related code, however, is in a different driver backend xs_internal.c So how should we go about implementing this ? Can we have code in xend_internal.c that talks to XenStore to extract the VNC port ? Or should we have XML generation code in xs_internal.c too & somehow merge the 2 XML docs (yuk). This is the same problem we so far prevented me adding the path to the serial console Psuedo-TTY to the XML for a domain. I'd rather like to have this in 0.1.4 release of libvirt too, so any suggestions on how to approach implementation when some of the data for the XML needs to come from XS ? Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|