Current libvirt checks xenstore for a xen guests
fixed vnc port on xend > 3.0.3. At least on f8
though, hvm guests don't store the vnc port in
xenstore, it is stored in the sexpr.
Patch fixes the logic to look in the sexpr if
the xenstore lookup appears to fail. This fixes
setting static vnc ports for f8 xen hvm guests.
Thanks,
Cole
diff --git a/src/xend_internal.c b/src/xend_internal.c
index 2a687c3..0b62dd0 100644
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -2121,6 +2121,10 @@ xenDaemonParseSxprGraphicsNew(virConnectPtr conn,
goto no_memory;
} else {
int port = xenStoreDomainGetVNCPort(conn, def->id);
+ if (port == -1) {
+ // Didn't find port entry in xenstore
+ port = sexpr_int(node, "device/vfb/vncdisplay");
+ }
const char *listenAddr = sexpr_node(node,
"device/vfb/vnclisten");
const char *vncPasswd = sexpr_node(node,
"device/vfb/vncpasswd");;
const char *keymap = sexpr_node(node, "device/vfb/keymap");