mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-5705: fixed the thumbnail not wrking for hyperv
This commit is contained in:
parent
b2de225f54
commit
513f1dba36
@ -369,7 +369,16 @@ public class ConsoleProxyServlet extends HttpServlet {
|
||||
|
||||
String sid = vm.getVncPassword();
|
||||
String tag = vm.getUuid();
|
||||
String ticket = genAccessTicket(host, String.valueOf(portInfo.second()), sid, tag);
|
||||
|
||||
int port = -1;
|
||||
if (portInfo.second() == -9) {
|
||||
//for hyperv
|
||||
port = Integer.parseInt(_ms.findDetail(hostVo.getId(), "rdp.server.port").getValue());
|
||||
} else {
|
||||
port = portInfo.second();
|
||||
}
|
||||
|
||||
String ticket = genAccessTicket(parsedHostInfo.first(), String.valueOf(port), sid, tag);
|
||||
|
||||
ConsoleProxyPasswordBasedEncryptor encryptor = new ConsoleProxyPasswordBasedEncryptor(getEncryptorPassword());
|
||||
ConsoleProxyClientParam param = new ConsoleProxyClientParam();
|
||||
@ -378,6 +387,12 @@ public class ConsoleProxyServlet extends HttpServlet {
|
||||
param.setClientHostPassword(sid);
|
||||
param.setClientTag(tag);
|
||||
param.setTicket(ticket);
|
||||
if (portInfo.second() == -9) {
|
||||
//For Hyperv Clinet Host Address will send Instance id
|
||||
param.setHypervHost(host);
|
||||
param.setUsername(_ms.findDetail(hostVo.getId(), "username").getValue());
|
||||
param.setPassword(_ms.findDetail(hostVo.getId(), "password").getValue());
|
||||
}
|
||||
if (parsedHostInfo.second() != null && parsedHostInfo.third() != null) {
|
||||
param.setClientTunnelUrl(parsedHostInfo.second());
|
||||
param.setClientTunnelSession(parsedHostInfo.third());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user