mirror of https://github.com/apache/cloudstack.git
bug 12328: XenServer 6.0 changes vnc-port path in xenstore
status 12328: resolved fixed Conflicts: core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
This commit is contained in:
parent
d910b7f85d
commit
67463e8c43
|
|
@ -2564,7 +2564,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||
hvm = "false";
|
||||
}
|
||||
|
||||
String vncport = callHostPlugin(conn, "vmops", "getvncport", "domID", record.domid.toString(), "hvm", hvm);
|
||||
String vncport = callHostPlugin(conn, "vmops", "getvncport", "domID", record.domid.toString(), "hvm", hvm, "version", _host.product_version);
|
||||
if (vncport == null || vncport.isEmpty()) {
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -3769,6 +3769,9 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||
_host.speed = hc.getSpeed(conn).intValue();
|
||||
break;
|
||||
}
|
||||
Host.Record hr = myself.getRecord(conn);
|
||||
_host.product_version = hr.softwareVersion.get("product_version").trim();
|
||||
|
||||
XsLocalNetwork privateNic = getManagementNetwork(conn);
|
||||
_privateNetworkName = privateNic.getNetworkRecord(conn).nameLabel;
|
||||
_host.privatePif = privateNic.getPifRecord(conn).uuid;
|
||||
|
|
@ -6448,7 +6451,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||
public String pool;
|
||||
public int speed;
|
||||
public int cpus;
|
||||
|
||||
public String product_version;
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringBuilder("XS[").append(uuid).append("-").append(ip).append("]").toString();
|
||||
|
|
|
|||
|
|
@ -47,12 +47,17 @@ def setup_iscsi(session, args):
|
|||
def getvncport(session, args):
|
||||
domid = args['domID']
|
||||
hvm = args['hvm']
|
||||
version = args['version']
|
||||
if hvm == 'true':
|
||||
path1 = "/local/domain/" + domid + "/qemu-pid"
|
||||
path2 = "/local/domain/" + domid + "/console/vnc-port"
|
||||
else:
|
||||
path1 = "/local/domain/" + domid + "/serial/0/vncterm-pid"
|
||||
path2 = "/local/domain/" + domid + "/serial/0/vnc-port"
|
||||
if version == '6.0.0':
|
||||
path1 = "/local/domain/" + domid + "/vncterm-pid"
|
||||
path2 = "/local/domain/" + domid + "/console/vnc-port"
|
||||
else:
|
||||
path1 = "/local/domain/" + domid + "/serial/0/vncterm-pid"
|
||||
path2 = "/local/domain/" + domid + "/serial/0/vnc-port"
|
||||
try:
|
||||
cmd = ["xenstore-read", path1]
|
||||
pid = util.pread2(cmd)
|
||||
|
|
|
|||
Loading…
Reference in New Issue