With the updated vSphere 5 Web Client, there is not an option to generate the remote console URL but there is a link that you could manually copy and provide to your users. This of course is not ideal but after a tinkering, I was able to figure out how to generate the remote console URL for any virtual machine in the new vSphere 5 Web Client.
I also created a vSphere SDK for Perl script awhile back called generateVMRemoteConsoleURL.pl which helps users automate the URL generation for vSphere 4.x environments, it has now been updated to support vSphere 5.
Here is an example of what a URL could look like:
https://reflex.primp-industries.com:9443/vsphere-client/vmrc/vmrc.jsp?vm=EE26E7F6-591B-4256-BD7A-402E5AC9E0A8:VirtualMachine:vm-1506
There are basically three 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
Here is an example execution of the script:
Now you can take the URL output from the script and enter it into a supported web browser. You will then be asked to authenticate before it allows you to access the remote console of a particular virtual machine.
You can now provide links to specific virtual machines


Hi William, thanks for that. Do you know how these URLs can be pre-authenticated or how user credentials can be passed as parameters to the URLs (so that we can integrate single sign on with external systems)?
ReplyDelete@Ashley,
ReplyDeleteI took a quick look but haven't been able to find a way. Using firebut, I noticed the following URL - https://reflex.primp-industries.com:9443/vsphere-client/vmrc/ticket.jsp?nonce=25e206b6-ef45-49e3-a5a0-84d9f2fc8117&_=1318485964250
where 25e206b6-ef45-49e3-a5a0-84d9f2fc8117 is the mks ticket acquired for a particular VM and 1318485964250 is some type of counter
You may want to file an SR to VMware to see if it's possible to per-authenticate using mks ticket
@Ashley,
ReplyDeleteI spoke with engineering and it looks like it is not possible today to pre-auth VMRC. I've provided your feedback and this is something they can look into.
@William, thanks a lot for that. Our developers have been able to get around the issue by programatically creating a clone session and using this clone session (with some trickery) to generate an Ajax call to the console page. From the POC code I've seen, it should be OK for now until this functionality is officially supported. It gives us the benefit of stopping the users navigating off the console web page, and allowing us to integrate our single signon technologies (using a proxied vCentre logon for console access).
ReplyDelete@Ashley can you guide me how it can be achieve without authentication. I can manage Ajax call but could not find the way for authentication.
Delete@Ashley, I have a doubt & I need to get in touch with you regarding that. Can I have your email id or twitter handle or FB vanity URL? My twitter & FB id is pprakash.
ReplyDeleteThanks,
Prakash
William, do you know if there's an alternate URL syntax that allows the VM to be referenced by the VM name rather that the MOID?
ReplyDeleteYours optimistically ... Jason
@Jason,
ReplyDeleteNo I'm afraid not. A VM display name is not always unique & standardizing on something such as a MoRef ID guarantees uniqueness + readability.
Hello,
ReplyDeleteI'm trying to get your script running but I keep getting the following error about a missing perl lib :
Can't locate VMware/VILib.pm in @INC
I did a search on CPAN and I couldn't find it
According to vmware documentation, that lib is supposed to be included into the : vsphere sdk perl, I installed it but still getting the same error?
also perl -e 'use VMware::VILib;' gives the same error, could you point me please where to get that lib ?
//using Linux Ubuntu Desktop.
@m0ntassar, You need to install vSphere SDK for Perl or vCLI, it'll handle all the dependencies for you.
ReplyDeleteIs there any update on @Ashley's query on pre-authenticated VMRC.
ReplyDeleteIt would really helpful if you can help us on that.
Thanks ,
Anand
@Anand,
ReplyDeleteAs mentioned to @Ashley in Oct 26 reply, this is not possible today.
@William,
ReplyDeleteThanks for your prompt reply..Just like to know whether there are any api exposed to know whether web client server is running inside vcenter ?
@Anand,
ReplyDeleteI'm not aware of any since it's separate service but you can always perform an HTTP query to https://[vc-hostname]:9443/vsphere-client and if it responds, then it's running the vSphere Web Client.
William, is there a way to provide end user access to the local resources using only the console window (like we could with the old Web Client), such as the CD/DVD-ROM, the floppy and now USB devices?
ReplyDeleteThe below shorcut works to provide the old console like from 4.x for me on 5. This should give you local resource access.
Delete"C:\Program Files (x86)\Common Files\VMware\VMware VMRC Plug-in\Internet Explorer\vmware-vmrc.exe" -h vsphere5:443 -M vm-400
BryanMcC, on a clean install without a previous version of the older Web client with vmware-vmrc.exe, how would you do it? Is there somewhere you are downloading a V5 verison of that plug-in? I did test it on an older 32-bit machine I've been using with versions of VMware ESX as far back as 2.5 and it works there, but not on a clean x64 Windows machine that has never downloaded the old plugin... any thoughts?
DeleteHello William,
ReplyDeleteI generated URL for the VM. On trying to connect to the VM using the URL(on both Firefox and IE) it is getting redirected to vSphere Web Client. Could you please help me to login to VM console. Also, I have installed client intergation tool (vmware-vmrc-win32-x86.exe)
Thanks
Nice info...thanks.
ReplyDeleteHi William,
ReplyDeletethe script is working fine for me. Is there a posibillity to call this script from webbrowser and give the arguments like:
http://localhost/generateVMRemoteConsoleURL.pl?vmname=VM001&vc-server=vCenter... ?
Thank you!
You could either run it like a CGI script, some modifications would definitely be needed or frontend the script with a custom UI. Definitely possible
DeleteHi William,
Deletecan you please help me with this script? I am working on it for 2 weeks now, but I am not so good in perl and I don´t get it working. Thanks in advance.
Hi William. Do you you know if it's possible to generate a URL for the summaryView of a VM, without showing the vCenter/environnment navigation pane on the left?
ReplyDeleteThanks