This site will be decommissioned on December 31st 2024. After that date content will be available at techdocs.broadcom.com.
VMware HTML Console SDK 2.2.0 | 14 November 2022 | Zip on developer.vmware.com
For VMware vSphere and vCloud Director 8.0 | Last document update: 16 November 2022
Check back for additions and updates to these release notes.

About the HTML Console SDK

The HTML Console SDK allows developers to add virtual machine console functionality to an existing web user interface running on vSphere. Using applications created by this SDK, end users can interact with a virtual machine console by typing on the keyboard and moving the mouse.

The HTML Console SDK provides APIs with the following functionality:

  • Mouse and keyboard input, including mouse scroll without VMware Tools
  • Send Ctrl + Alt + Delete
  • Full screen mode
  • Client and guest keyboards for Japanese, German, Italian, Spanish, Portuguese (pt_pt), French, Swiss-French, and Swiss-German.

What's New in this Release

This version follows vSphere 8.0 and is the first update since 2019. The programming guide contains new sample code showing how to copy from a remote virtual machine to the local HTML Console client.

The SDK is available in the Download section of the landing page. You might have to sign in using your VMware Customer Connect account. The SDK is delivered as a ZIP file. After you download and unzip the file, you use Javascript and CSS directly.

See compatibility notices below for browser and OS support.

Quick Start

To see how it works, place this HTML code in a folder with the unzipped SDK.

<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Console</title> 
</head> 
<body>
<link rel="stylesheet" type="text/css" href="css/wmks-all.css" /> 
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.8.16/jquery-ui.min.js"></script>
<script type="text/javascript" src="wmks.min.js"></script> 
<div id="wmksContainer" style="position:absolute;width:100%;height:100%"></div> 
<script>
var wmks = WMKS.createWMKS("wmksContainer",{})
 .register(WMKS.CONST.Events.CONNECTION_STATE_CHANGE, function(event,data){
 if(data.state == WMKS.CONST.ConnectionState.CONNECTED){
  console.log("connection state change : connected");}
 });
wmks.connect("wss://ESXi.host.IP.Address:443/ticket/webmksTicket"); 
</script> 
</body>
</html>

Replace ESXi.host.IP.Address with the IP address or fully-qualified hostname of the ESXi host where the virtual machine resides.

To get the webmksTicket, find the vCenter Server that manages the above ESXi host. You can get a ticket using the vSphere API, or with the managed object browser:

  1. In a browser go to https://vCenter.Server.IP.Address/mob
  2. Provide your login credentials for [email protected] or another SSO account
  3. Click content > rootFolder > Datacenter > vmFolder
  4. Click the VM number of the virtual machine you want to connect to
  5. Under Methods, click AcquireTicket
  6. Type webmks in the value field and click Invoke Method
  7. Copy and paste the ticket string to replace webmksTicket
  8. Double-click the above HTML file to open it in your browser.

Once you know the managed object ID (moid) of the virtual machine, you can quickly get another ticket at this URL. Replace NN with the VM number:

https://vCenter.Server.IP.Address/mob/?moid=vm-NN&method=acquireTicket

Compatibility Notices

The HTML Console SDK was tested with recent versions of the following Web browsers on Windows, MacOS, and Linux:

  • Google Chrome
  • Mozilla Firefox
  • Apple Safari (MacOS only)
  • Microsoft Edge
  • Internet Explorer (Windows only)

The test/ folder is new in the 2.2.0 release. Rather than follow steps in the README.md file, because unit test source files are VMware internal, follow these steps for testing:

  1. Install the nodejs tools from http://notejs.org/download.
    This provides the npm command for installing other Javascript packages.
  2. Install grunt-cli globally on your system.
    This adds the grunt command, and only needs to be done once.
  3. Add the grunt install location to your PATH environment.
  4. Download the Node libraries. You can do this in a single step.
    This puts a bunch of node libraries within the node_modules.
    npm install
  5. Run unit test by typing grunt with or without the test argument.
    This runs all the unit tests and reports status on the command line before exiting.
    grunt test
  6. After you run the unit tests, look for the Jasmine HTML report in the wmkssdk/test/karma_html/ folder.

Recently Resolved Issues

The HTML Console 2.1 release resolved the following issues.

  • HTML Console support for vCloud Director.

    Version 9.x of vCloud Director (vCD) supports HTML Console 2.1 and the stand-alone VMware Remote Console (VMRC).

  • More international keyboard support.

    The HTML Console 1.0 release supported only English and Japanese keyboards. Release 2.0 added support for German, Italian, Spanish, and Portuguese keyboards. This release also supports French, Swiss-French, and Swiss-German keyboards.

  • The css and img folders went too deep.

    In the 2.0 release, style sheets in the css/css folder were not able to reference the touch-sprite images in the img/img folder. In this release all css/css style sheets and img/img images are at the correct folder level.

Known Issues and Workarounds

The following issues are found in the HTML Console 2.2 release.

  • Incomplete support for international keyboards.

    In this release no other international keyboards are supported other than Japanese, German, Italian, Spanish, Portuguese (pt_pt), French, Swiss-French, and Swiss-German.

check-circle-line exclamation-circle-line close-line
Scroll to top icon