WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

How to generate a pre-authenticated HTML5 VM console link in vSphere 5.5 that works on all OSes!

09.23.2013 by William Lam // 79 Comments

One of the coolest feature that I have been personally looking forward to is the ability to access a virtual machine's remote console on a Mac OS X system which is now available as part of the vSphere 5.5 release. When you launch the VM's remote console using the vSphere Web Client on a Mac OS X system, instead of using the regular VMRC, it launches an HTML5 based console for your VM.

One thing that you might have noticed when performing this same action on a Windows desktop using the vSphere Web Client is that VMRC is used instead of the HTML5 console (notice the generated URLs are different). My understanding is that the VMRC is currently more performant than the HTML5 console and hence it is preferred when possible. I have been using the HTML5 based console for quite sometime now and I have not had any issues with it. I really hope to see us use the HTML5 console as the default console in the future!

Having said all this, there is a way for all users can benefit from this new HTML5 based VM console which is to automatically generate the URL which can then be loaded into any HTML5 supported web browser on either a Mac OS X, Windows or even Linux system. I used a similar method in generating the VM Remote Console for the vSphere Web Client which is VMRC specific.

UPDATE (07/26/17): I have just published a PowerCLI script called GenerateVMConsoleURL.ps1 which runs against a vSphere 6.5 environment and supports generating the HTML5 VM Console, Standalone VMRC and WebMKS URLs. As noted by several folks in the comments below, the pre-auth mechanism no longer works post-6.0, so you will need to have logged already for the console to automatically load OR you will be prompted to login before being re-directed. For those that wish to generate VM Console URLs for older vSphere versions, you can modify the script to handle those other scenarios.

The really cool part about this solution is that you can provide a one time pre-authenticated HTML5 based VM console URL that can then be given to your end users to access their VM. This of course can be automatically generated through a custom portal without needing to provide direct access to the vSphere Web Client.

Here is an example of what the HTML5 VM console URL looks like in vSphere 5.5:

http://reflex.primp-industries.com:7331/console/?vmId=vm-23&vmName=VCSA&host=reflex.primp-industries.com&sessionTicket=cst-VCT-5254c455-4340-2185-e149-01ce44b146e1--tp-4A-88-17-7C-F5-D0-79-E6-9D-A1-E3-83-97-52-97-EA-E5-D3-D8-07&thumbprint=4A:88:17:7C:F5:D0:79:E6:9D:A1:E3:83:97:52:97:EA:E5:D3:D8:07

In vSphere 5.5 Update 2, the HTML5 VM Console now defaults to a secure connection and the two components of the URL that needs to be modified is from HTTP to HTTPS and from port 7331 to port 7343. The script has been updated to support a new command-line option called isvSphere55u2 which by default is set to false but can be set to true to generate an updated URL if you are running vSphere 5.5 Update 2

There are basically seven important components to the URL:

  • Hostname of the vCenter Server - reflex.primp-industries.com
  • The HTML5 console port, default is 7331 but can automatically change depending on available ports on the system (for vSphere 5.5 Update 2 the port has changed to 7343 for a secure connection)
  • The MoRef ID of the virtual machine - vm-23
  • The virtual machine name - VCSA
  • The vCenter Server advanced setting "VirtualCenter.FQDN" - reflex.primp-industries.com
  • The session ticket generated from vCenter Server - cst-VCT-5254c455-4340-2185-e149-01ce44b146e1--tp-4A-88-17-7C-F5-D0-79-E6-9D-A1-E3-83-97-52-97-EA-E5-D3-D8-07
  • The vCenter Server SHA1 SSL Thumbprint - 4A:88:17:7C:F5:D0:79:E6:9D:A1:E3:83:97:52:97:EA:E5:D3:D8:07

Disclaimer: The HTML5 VM console URL format/behavior is not guaranteed and may change in the future. The only officially supported method of accessing the console is by launching it through the vSphere Web Client.

Here is a vSphere SDK for Perl script called generateHTML5VMConsole.pl that given a VM name as input, will automatically generate a one-time pre-authetnicated HTML5 VM console URL that can be loaded into any supported web browser.

Note: To ensure the URL is valid, you will need to make sure your application is setup to run like a daemon or agent. To simulate this in my sample script, I just sleep for 60 seconds before disconnecting the session. I also used the openssl utility to extract the SHA1 thumbprint, so you will need a system that has that installed along with the vSphere SDK for Perl if you wish to use the script. The quickest way is to leverage vMA.

To load the HTML5 VM console, take the URL that is generated and point it to a browser:

Since this is an HTML5 based VM console, I can even load this into my iPad!

Hopefully this article will give you new ideas on how you can leverage and integrate the new HTML5 VM Console within your environment and hopefully this will be the defacto console in the future!

Here is an example of what the URL looks like for vSphere 5.1 & 5.5:

https://reflex.primp-industries.com:9443/vsphere-clien/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:vm-1506:EE26E7F6-591B-4256-BD7A-402E5AC9E0A8

There are basicallythree important components to the URL:

  • Hostname of the vCenter Server - reflex.primp-industries.com
  • The vCenter instanceUUID which used to uniquely identify a vCenter Server - EE26E7F6-591B-4256-BD7A-402E5AC9E0A8
  • The MoRef ID of the virtual machine - vm-1506

Categories // Automation, VMRC, vSphere 5.5, vSphere 6.5, vSphere Web Client Tags // HTML5, remote console, vSphere 5.5, webmks

My top 5 favorite enhancements to the new vSphere Web Client 5.5

09.11.2013 by William Lam // 10 Comments

I have been using the vSphere Web Client more and more lately and though transitioning away from the familiar legacy vSphere C# Client is not the easiest thing to do or always possible for every single operation, there are definitely some nice benefits when using the vSphere Web Client. With the upcoming vSphere 5.5 release, there is even more cool new features in the vSphere Web Client!

Here are my top 5 favorite enhancements in the new vSphere Web Client 5.5 in no particular order. For a complete list of new features in the vSphere Web Client, I recommend you take a look at the What's New in vSphere 5.5 whitepaper.

Mac OS X Support for vSphere Web Client

Being a web application, the vSphere Web Client has always worked on a Mac OS X system, however you may have noticed a couple of things did not work such as OVA/OVF upload, remote device management such as mounting an ISO/Floppy and the biggest one of all is virtual machine console access! This has been one of the most requested feature that I can think of and I am personally excited to see this finally come to fruition. In addition to to the native VM console support (HTML5/WebSockets), there is also now a vSphere Client Integration package for Mac OS X that provides both OVA/OVF upload and remote device management support. This alone is enough for me to upgrade my vCenter Server to 5.5 to get these new feature!

Recently Visited & Created Objects

The recently visited objects is a pretty handy feature that came in vSphere 5.1 which allows you to see what objects you have been recently working with. However, this feature may not have been very well known due to its tiny icon. I am glad to see this feature get its own icon and is now located at the top of the vSphere Inventory Navigator between the navigator and pin icon. In addition to this change, it also now includes a list of the recently created vSphere objects which can come in handy when you are doing something new for the first time and would like a quick way to view the sequence of objects created.

vSphere Inventory Navigator History + Back/Forward Navigation

I am pretty sure our vSphere UE engineers have a more elegant name for this awesome feature, but  you can now view the history as you traverse through the vSphere Inventory Navigator and navigate both backwards as well as forward (which is new in vSphere 5.5). To view your current history, you simply just right click on the navigator bar at the top and you will get a drop down list of your history. You can go move forwards or backwards through your history which is a great if you are still getting familiar with the vSphere Web Client and forgot how you got to a particular object.

Deploy vCenter Operations from vSphere Web Client

I thought this was a pretty cool enhancement by allowing you to deploy vCenter Operations Management from within the vSphere Web Client. You will notice a new vC Ops icon on the main dashboard and on the Getting Started page, there is a link at the bottom that will allow you to deploy the vC Ops appliance by first logging into your MyVMware account. I wonder if we will are going to start doing this for other VMware solutions and just making it easier to deploy the latest version without having to first download it onto your local system.

Configure Auto-Refresh & Disable Inventory Navigator Animation

A common piece of feedback that I have heard regarding the vSphere Web Client experience is that it does not automatically refresh the screen. This is a change from the vSphere C# Client where it will automatically refresh the inventory, but of course there is some overhead associated with this refresh as it needs to pull the latest data from the vCenter Server. However, with the latest vSphere Web Client 5.5, you can now enable auto-refresh using an advanced configuration (by default it is disabled). Before you enable this, do note that this can alter the performance of your environment and be aware this will prevent the session from automatically logging out if you have configured an idle session timeout.

UPDATE: (03/11/16) - In vSphere 6.0, the path to webclient.properties has changed to /etc/vmware/vsphere-client/webclient.properties

To enable auto-refresh, you will need to locate the following configuration file /var/lib/vmware/vsphere-client/webclient.properties on the VCSA (there should also be an equivalent on Windows version of vSphere Web Client Server)

By default the auto-refresh is disabled, to enable it, you will need to un-comment the following configuration parameter and set the number of seconds to auto-refresh:

refresh.rate = # of seconds

Another feature that I found interesting that can also be controlled in this configuration file is the sliding animation shown when clicking on the vSphere Inventory Navigator. This I assume is to reduce the amount of resources loading the animation, unless the animation was bothering some folks?

By default this is now disabled in vSphere 5.5 and if you wish to see that animation (default in vSphere 5.1), you can re-enable by un-commenting the following configuration parameter:

navigator.disableAnimation = true or false

There are few other settings that you can control in the webclient.properties, you can take a look at the file for more details.

There are definitely a few more new features in the vSphere Web Client 5.5 that I have not mention, but these were my my top five favorite enhancements. One more thing I would like to also mention is that vSphere Web Client in vSphere 5.5 release definitely feels much snappier than previous releases and this has made for a much better user experience in my opinion. When you get your hands on the new vSphere Web Client, what will be your favorite new feature?

Categories // vSphere 5.5, vSphere 6.0, vSphere Web Client Tags // breadcrumbs, history, HTML5, refresh, vSphere 5.5, vsphere web client

Handy Keyboard Shortcuts for the vSphere Web Client

07.30.2013 by William Lam // 7 Comments

After publishing an article about the vSphere Web Client Recent History Feature, I received question from a reader asking about the keyboard shortcuts that were available as part of the legacy vSphere C# Client. The reader really enjoyed these shortcuts as a way to quickly navigate between the various inventories and was wondering if similar keyboard shortcuts existed for the new vSphere Web Client? I was not able to find anything in our documentation and decided to reach out to our UE (User Experience) folks to see if they could assist.

Though we do not have every single keyboard shortcut that was available from the legacy vSphere C# Client, we actually do have quite a few and this somehow must have gotten missed during documentation (I have filed documentation bug on this). In talking to our UE folks, some of the challenges in adding the keyboard shortcuts was to find shortcuts that have not already been taken by either a web browser (vSphere Web Client is a browser application) or the Operating System used to connect to the vSphere Web Client. It was also very important if new shortcuts were added, that it would be easy to understand. As you can see this was not a trivial task at all.

The screenshot below provides a quick overview of the available keyboard shortcuts for the vSphere Web Client. Take a look at the table below for a more detailed break down of each keyboard shortcut.

Keyboard Shortcuts

Keyboard Combination Action
Ctrl+Alt+s
Quick Search
Ctrl+Alt+Home OR Ctrl+Alt+1
Home Screen
Ctrl+Alt+2
Virtual Infrastructure Inventory
Ctrl+Alt+3
Hosts and Clusters Inventory
Ctrl+Alt+4
VMs and Templates Inventory
Ctrl+Alt+5
Datastores and Datastore Clusters Inventory
Ctrl+Alt+6
Networking Inventory

I was able to verify these shortcuts on both a Mac OS X system as well as a on Windows. This is something I definitely will be bookmark as a useful reference. If there are other keyboard shortcuts that you have grown to rely on in the legacy vSphere C# Client and would like to see in the new vSphere Web Client, feel free to leave a comment and I will make sure it gets to our UE folks.

Categories // vSphere, vSphere Web Client Tags // keyboard, shortcuts, vSphere 5.1, vsphere C# client, vsphere web client

  • « Previous Page
  • 1
  • …
  • 25
  • 26
  • 27
  • 28
  • 29
  • …
  • 32
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025