VMware Cloud Community
Cromathaar
Contributor
Contributor

HTML 5 Console SDK not working in vSphere 6.5

Greetings guys!

I'm successfully using HTML 5 Console SDK with vSphere 5.5. However when I try to connect to vCenter 6.5 I keep getting errors. I'm aware of the following ways to connect - Showing Web Console of a VM via vSphere HTML Console SDK - Samples - VMware {code} I'm interested in either 1 or 3 (I don't want to connect to a VM directly using its IP). So I tried the following uris:

(Getting 500 error)  wss://vcenter_ip:9443/vsphere-client/webconsole/authd?vmId=vm-808&vmName=staging01&serverGuid=ef6a5492-165c-4d0a-813e-10f79a5cfdd0&host=vcenter_ip:443&sessionTicket=cst-VCT-52e79734-6f0d-69bb-10a2-eb92f9939beb--tp-D6-7A-CB-EC-ED-43-35-AD-0D-FB-B3-21-F9-F0-24-88-F6-FB-77-51

(Getting 500 error) wss://vcenter_ip:9443/vsphere-client/webconsole/authd?mksTicket=52c10d92-1867-4a0e-4c2e-d97df164a817&host=vcenter_ip&port=902&cfgFile=%2Fvmfs%2Fvolumes%2F56600453-39658cc7-9ec6-002219644073%2FNode1%2FNode1.vmx&sslThumbprint=9F:C5:E9:6C:97:ED:CE:0B:BD:86:9F:5F:E7:AB:1C:E2:CA:46:E2:C2

I've also noticed that if I go directly to https://vcenter_ip/vsphere-client/webconsole/authd it opens a page and prompts for several mandatory query string parameters like host, port, cfgFile, ticket and thumbprint. As far as I get, it's the same parameters that are required in MKS ticket approach, but for some reason mksTicket and sslThumbrint parameters are renamed to ticket and thumbprint. Anyways, if I rename them it still doesn't work returning 403 error.

Getting 403 (Forbidden) instead of 500 (Internal Server Error) is a better result, however I still don't see what I am missing here. Has something changed in 6.5 compared to 6.0? Do you guys have any ideas?

P.S. The user I'm connecting under has console interaction permission enabled.

0 Kudos
29 Replies
hellWork
Enthusiast
Enthusiast

1527068342(1).pngIs that right? 

  • I've added a reference.

0 Kudos
belesev
Enthusiast
Enthusiast

hellWork​,

let's better not offtopic here.

You need to install VMWare vSphere PowerCLI and add reference to library VMWare.Vim.dll (somewhere here c:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\VMware.Vim.dll)

0 Kudos
Cromathaar
Contributor
Contributor

Nope, not using Nginx at all. I run the code either from Visual Studio or IIS.

0 Kudos
hellWork
Enthusiast
Enthusiast

  • I have successfully obtained the ticket.
  • However, there is a small problem: the VMware web page is distrusted, it will be directly wrong, and it must be trusted before it can be connected to the console.
  • Did you have this problem?How it was solved.Thank you very much!!!
0 Kudos
Cromathaar
Contributor
Contributor

Install vCenter certificate as trusted root certificate on machine that you use to open console connection.

hellWork
Enthusiast
Enthusiast

Thank you for your help. I know if there is a better solution in this way.

0 Kudos
hellWork
Enthusiast
Enthusiast

var vimClient = new  VMware.Vim.VimClient();

There is something wrong with this code. It should be written like this:

var vimClient = new  VMware.Vim.VimClientImpl();

I think you should know this problem. The purpose of my reply to this message is to let other users see it. Please don't mind.thank you.

0 Kudos
Cromathaar
Contributor
Contributor

belesev​ Have you managed to make it work in the end?

0 Kudos
belesev
Enthusiast
Enthusiast

Cromathaar​, no :smileyconfused:

Postponed it.

0 Kudos
harpreetsingh13
Contributor
Contributor

Same issue I am getting. To fix this issue I download ESXi certificate and download on my computer after that hit ESXi host URL to accept not secure waring in browser and then hit console view file after that its worked fine.

After that I installed valid SSL on my ESXi host and then its working fine and handshake error gone.

So, I think it is SSL certificate issue. By default with ESXi there is not SSL installed.

If you have another way without installing SSL on ESXi then please let me know.

 

Harpreet Singh Bedi
0 Kudos