[Internal] Proxy configuration using the VMRC URI
search cancel

[Internal] Proxy configuration using the VMRC URI

book

Article ID: 333532

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Proxy configuration directly within VMRC is a new feature, to add the proxy configuration information within the VMRC URI configuration.

Cause

VMRC versions prior to 12.0 support connection to vSphere and ESXi servers using a http proxy server, however there is only one preference configuration option in the VMRC GUI, so you need to change the VMRC preference proxy configuration each time you want to to connect to different vSphere/ESXi servers. 

The goal of this advanced feature is to to add such proxy information within VMRC, so the URI generated connects to different vSphere and ESXi servers instead of requiring a change using the global preference configuration. 

This update removes the need to change the VMRC global preference proxy configuration frequently.

Resolution

This advanced customized behavior is available in VMware Remote Console release 12.0 and later,

The setting determines which proxy is used when connecting to one of the indicated vSphere servers, so the VMware Remote Console does not need to launch through the "vmrc://" URI in the vSphere Center Web Client but can be a manually composed "vmrc://" URI in the VMware Remote Console client environment and directly launches the VMware Remote Console.
 

1.Prerequisites

Add the proxy information in the  vmrc:// URI configuration, the format is:

vmrc://[<user>@]<host>[:<port>]/?moid=<VM-id>[&httpproxy=<proxy server>[:<proxy port>]][&proxyuser=<proxy username>][&proxypasswd=<proxy auth password>]]

Notes:
  • Currently only HTTP proxy type is supported, and for non-authentication proxy environments, you need to provide the details for the "httpproxy" field:
    • the <proxy server> means the proxy server location(host name or IP address)
    • the <proxy port> means proxy port, the default port is 80
  • For password authentication enabled proxy environment, you need to provide the username and password through the fields: "proxyuser" and "proxypasswd"
  • The '&' character in <proxy username> or <proxy auth password> should be encoded as '%26' or it will be considered as separator flag in the URI.

Examples:
vmrc://192.168.1.10/?moid=vm-42&httpproxy=192.168.1.24:3128
vmrc://192.168.1.10/?moid=vm-42&httpproxy=192.168.1.24:3128&proxyuser=vmrc&proxypasswd=vmrc

 

2.Procedure


The generated "vmrc://" proxy URI can now be used in the VMware Remote Console client environment's command line or as a webpage link.

See below for command line examples for Linux, Windows and macOS.

For Linux

  1. Open a terminal program and run this command:
vmrc 'vmrc://[<user>@]<host>[:<port>]/?moid=<VM-id>[&httpproxy=<proxy server>[:<proxy port>]][&proxyuser=<proxy username>][&proxypasswd=<proxy auth password>]]'
 

For Windows

  1. Open a command shell or power-shell window
  2. Change the current directory into the VMware Remote Console installation directory: C:\Program Files (x86)\VMware\VMware Remote Console
  3. Open VMware Remote Console using this command:
vmrc.exe "vmrc://[<user>@]<host>[:<port>]/?moid=<VM-id>[&httpproxy=<proxy server>[:<proxy port>]][&proxyuser=<proxy username>][&proxypasswd=<proxy auth password>]]"
 

For macOS

  1. Open a terminal and run the following command:
open -a "/Applications/VMware Remote Console.app"  'vmrc://[<user>@]<host>[:<port>]/?moid=<VM-id>[&httpproxy=<proxy server>[:<proxy port>]][&proxyuser=<proxy username>][&proxypasswd=<proxy auth password>]]'
 
Note: For the command line, since '&' will be considered as one "background process" flag, the vmrc://URI should be embraced with character ' for Linux/MacOS and " for Windows platform.
 

3. Result

VMware Remote Console connects to the specified virtual machine on vSphere through the indicated proxy environment.

Note:
The URI proxy take priority for proxy configuration configured in VMware Remote Console's preference, and should only be used in customized environment where you need one VMware Remote Console that can connect to different vSphere sites through different proxy environment at the same time.


Workaround:
If you are unable to upgrade, you will need to change the preference proxy configuation each time you connect to different vSphere/ESXi servers through different proxy servers.