Hello Everyone,
I'm facing a challenge with accessing the VNC Console through VMware's HTML Console SDK and would really appreciate some guidance. Here's a rundown of what I've done and the issue I'm encountering:
Steps Taken:
Setting Up: I've used the HTML Console SDK from VMware, which involves loading the WebMKS script into an HTML page. This setup requires jQuery, jQueryUI, access to vCenter Server and an ESXi host, a local HTTP server, and the mentioned libraries.
Procedure Followed:
Downloaded and unzipped the HTML Console SDK.
Created an HTML page for the console display.
Managed security certificates for vCenter Server and ESXi host.
Obtained a WebMKS ticket.
Entered the ESXi host IP and the VM's WebMKS ticket in the wmks.connect function.
Used the provided JavaScript sample code for the remote HTML Console.
Ticket Generation: I've used a Python script to connect to the vSphere server, locate the VM, and generate the MKS ticket.
Current Setup and Issue:
The ticket generation and VM console connection code is hosted on a server (IP: xx.xxx.xxx.100).
I'm trying to connect to a VM (IP: xx.xxx.xxx.83), which is on an ESXi host (IP: xx.xxx.xxx.80) and managed by vSphere Client (IP: xx.xxx.xxx.81).
The problem: I'm getting a failed WebSocket connection with the error: 'Web socket connection wss://xx.xxx.xxx.80:902/ticket/tickerID failed.'
Any advice or pointers would be highly appreciated! Also, has anyone else encountered a similar issue?
ticket = vm.AcquireMksTicket()
I replaced above line with the following line.
ticket = vm.AcquireTicket(ticketType='webmks')
ticket = vm.AcquireMksTicket()
I replaced above line with the following line.
ticket = vm.AcquireTicket(ticketType='webmks')