VMware {code} Community
mdusman
Contributor
Contributor
Jump to solution

Need Help with VMware VNC Console Access via HTML Console SDK

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:

  1. 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.

  2. 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.

  1. 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?

Labels (1)
1 Solution

Accepted Solutions
mdusman
Contributor
Contributor
Jump to solution

902 port is not required.
Also, the issue is resolved now. The issue was related to ticket that was created by following line in my Python Script
ticket = vm.AcquireMksTicket()

I replaced above line with the following line.

 ticket = vm.AcquireTicket(ticketType='webmks')

View solution in original post

0 Kudos
1 Reply
mdusman
Contributor
Contributor
Jump to solution

902 port is not required.
Also, the issue is resolved now. The issue was related to ticket that was created by following line in my Python Script
ticket = vm.AcquireMksTicket()

I replaced above line with the following line.

 ticket = vm.AcquireTicket(ticketType='webmks')
0 Kudos