Index: src/xend_internal.c =================================================================== RCS file: /data/cvs/libvirt/src/xend_internal.c,v retrieving revision 1.92 diff -u -p -r1.92 xend_internal.c --- src/xend_internal.c 22 Feb 2007 19:09:29 -0000 1.92 +++ src/xend_internal.c 22 Feb 2007 19:51:10 -0000 @@ -1569,7 +1569,13 @@ xend_parse_sexp_desc(virConnectPtr conn, } else if (tmp && !strcmp(tmp, "vnc")) { int port = xenStoreDomainGetVNCPort(conn, domid); const char *listenAddr = sexpr_node(node, "device/vfb/vnclisten"); - if (port == -1) + /* For Xen >= 3.0.3, don't generate a fixed port mapping + * because it will almost certainly be wrong ! Just leave + * it as -1 which lets caller see that the VNC server isn't + * present yet. Subsquent dumps of the XML will eventually + * find the port in XenStore once VNC server has started + */ + if (port == -1 && xendConfigVersion < 2) port = 5900 + domid; if (listenAddr) { virBufferVSprintf(&buf, " \n", port, listenAddr);