Vmware Vmrc

This morning I received an error I haven’t seen before when trying to open the console of a VM in our ESXi 5.5 environment…. “The VMRC console has disconnected…attempting to reconnect.

Vmware Vmrc Exit

There are two ways to fix this. The easy way is to reboot your computer 🙂 If you would want to avoid a reboot you can do the following:

Vmware vmrc copy paste

In the VMware Host Client, select any virtual machine and select Console Download VMRC. Decompress the file to a temporary directory and run the installation wizard. Click Next to begin installation. VMware® Remote Console™ provides client device connection and console access to virtual machines on a remote host. After downloading and installing VMware Remote Console on your local computer, you can launch the external VMware Remote Console application directly from the VMware vSphere® or vRealize® Automation™ web client.

Close out all of your VMware vSphere Clients and open Task Manager. You will want to make sure all processes named “vmware-vmrc.exe“, “vmware-remotemks.exe“, and “vpxclient.exe” are not running. If they are go ahead and end all those processes.

Now open up the vSphere Client, console should now work:

Comment below and let me know what worked for you!

With the 5.5 R1 release PowerCLI got even better. With the introduction of the new Open-VMConsoleWindow cmdlet you can access the virtual machine console of both vCenter Server and vCloud Director virtual machines. To open a virtual machine console window, simply pass a powered-on virtual machine to the Open-VMConsoleWindow cmdlet:

Get-VM “Win2k3” | Open-VMConsoleWindow

As a result, the cmdlet opens a Web page containing the virtual machine remote console:

Vmware

You can even open the console in full screen mode – either by specifying the corresponding cmdlet parameter or by clicking the Full Screenbutton on the Web page:

Open-VMConsoleWindow –VM “Win2k3” –FullScreen

Vmware

Unless configured otherwise, the cmdlet opens the virtual machine console in the default Web browser on your machine. If you want to use a different browser, you can do so by specifying it in the PowerCLI configuration. You will need to specify the full path to the browser’s executable file:

Vmware Vmrc Link

Set-PowerCLIConfiguration –VMConsoleWindowBrowser “C:Program Files (x86)Mozilla Firefoxfirefox.exe”

To switch back to using the default browser, simply specify “$null” for the “VMConsoleWindowBrowser” setting.

How does this work under the covers?

In order to display the virtual machine console, PowerCLI uses the VMRCbrowser plug-in embedded in a Web page. This plug-in is installed during the installation of PowerCLI. It supports 32-bit Internet Explorer, Mozilla Firefox, and Google Chrome browsers. The Web page is located at “<PowerCLI install dir>/VMConsoleWindow/” – have a look at it if you want to get the full details or make modifications.

Opening the virtual machine console requires authentication in the form of a token. For vSphere virtual machines this token is acquired through the “AcquireCloneTicket()” method of the SessionManager API object, and for vCloud Director – through the “AcquireTicket()” method of the VirtualMachine API object. In both cases the token is valid for 30 secondsfor single use. The token, virtual machine ID, and the host it’s running on (along with other parameters) are passed as URL parameters to the above-mentioned Web page. If you want to get hold of just this URL (for example, if you want to run Firefox with a specific profile) – you can do so by specifying the “UrlOnly” parameter:

$url = Open-VMConsoleWindow –VM “Win2k3” –UrlOnly

.”C:Program Files (x86)Mozilla Firefoxfirefox.exe” -P Work $url

With this new cmdlet you now have one less reason to use the vSphere Web Client and can switch entirely to PowerCLI as a single tool for managing your entire virtual infrastructure! How cool is that!

Getting more from the Open-VMConsoleWindow

Another way in which this cmdlet can be used is to solve a common use case in virtual environments. Often VM owners will want access to their console to troubleshoot an OS or to have the ability to enter the BIOS, this often leads to vSphere Administrators giving people access to the vSphere Web Client or vSphere Client.

As we know there are more actions than opening a console in the full clients and therefore these VM owners often get new ideas about features they would like to use but do not have permissions to do so. With this cmdlet and other free tools we can easily give the users access to a console window to open their VM without them knowing about the full vSphere Clients.

Vmware Vmrc

An example of this is in the below video where we create a scripted application which we can send to our users in just 5 lines of code! Check it out…

Vmware Vmrc Mac

This post was created by Dimitar Barfonchovski.Dimitar joined VMware and the PowerCLI team in 2007. He is member of the development part of the team and his main responsibilities are the functional design and implementation of features for the vSphere and vCloud PowerCLI components.

As with all members of the team, he is working to deliver a good and valuable product. He is also working to improve all processes and tools involved in the product development and validation.