mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 02:51:16 +00:00
Don't hardcode port=5900+domid for new xend
This commit is contained in:
parent
35f911c815
commit
02a271f220
@ -1,3 +1,10 @@
|
||||
Tue Feb 27 10:20:43 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xend_internal.c: Only hardcode port = 5900+domid if
|
||||
running against old XenD < 3.0.3, because in newer XenD
|
||||
port is guarenteed to be available in XenStore if the VNC
|
||||
server is running.
|
||||
|
||||
Mon Feb 26 15:33:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||
|
||||
* qemud/conf.c, qemud/uuid.[ch]: move qemudParseUUID()
|
||||
|
@ -1571,8 +1571,6 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
|
||||
} else if (tmp && !strcmp(tmp, "vnc")) {
|
||||
int port = xenStoreDomainGetVNCPort(conn, domid);
|
||||
const char *listenAddr = sexpr_node(node, "device/vfb/vnclisten");
|
||||
if (port == -1)
|
||||
port = 5900 + domid;
|
||||
if (listenAddr) {
|
||||
virBufferVSprintf(&buf, " <graphics type='vnc' port='%d' listen='%s'/>\n", port, listenAddr);
|
||||
} else {
|
||||
@ -1618,7 +1616,13 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
|
||||
if (tmp[0] == '1') {
|
||||
int port = xenStoreDomainGetVNCPort(conn, domid);
|
||||
const char *listenAddr = sexpr_fmt_node(root, "domain/image/%s/vnclisten", hvm ? "hvm" : "linux");
|
||||
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, " <graphics type='vnc' port='%d' listen='%s'/>\n", port, listenAddr);
|
||||
|
Loading…
Reference in New Issue
Block a user