VMware recently released a Virtual Machine Remote Console (VMRC) application for OS X users. This application is designed to complement the browser-based console for vSphere users by providing a native application for launching a remote console session with a vSphere-hosted virtual machine.
A nice bonus is that the VMRC application can also connect to an ESXi server which is using VMware’s free license for ESXi. This provides a way for users of free ESXi to access ESXi-hosted VMs via a remote console session without needing to run either the Windows vSphere client or VMware Fusion Professional. For more details, see below the jump.
To use the VMRC without the vSphere Web Client, you will need to construct the VMRC URI which looks like the following:
vmrc://@[HOST]:[PORT]/?moid=[VM-MOREF]
- HOST = the hostname or IP address of the ESXi server
- PORT = the HTTPS port of the ESXi server, which is usually 443
Finding the MoREF for the VM can be accomplished by one of two methods:
1. Running this script developed by William Lam of virtuallyGhetto
2. If you have SSH enabled on your ESXi server, connecting via SSH and running the following command:
vim-cmd vmsvc/getallvms
William Lam’s script is well-documented, so I’m going to look at using SSH to get the MoRef identifier.
Pre-requisites:
Enabling SSH on your ESXi server
Installing the VMRC application
1. Make sure you have SSH enabled on your ESXi server.
2. SSH in and run the following command:
vim-cmd vmsvc/getallvms
In my case, I’m choosing to run this as a remote command via SSH, as that will display back just the information I’m interested in. That should produce something that looks like this:
3. Use the appropriate entry under Vmid for the MoRef value which the VMRC connection string is looking for.
Once you have the Vmid entry for your VM identified, use the following address in a web browser:
vmrc://@server_name_here:port_number_here/?moid=vmid_number_here
5. Enter the ESXi server’s login and password when prompted.
6. Accept the certificate if needed.
7. The remote console session will open.
In addition to opening via a web browser, you can also open the VMRC using the following process:
1. Open Terminal
2. Run the following command:
open 'vmrc://@server_name_here:port_number_here/?moid=vmid_number_here'
You’ll be prompted for the ESXi server’s login and password, as well as the certificate if needed, then the remote console session will open.