SITAM
Contributor
Contributor

VMRC Shortcut

Jump to solution

Hello,

How to create a shorcut to a VM in an ESX which opens with VMRC?

Thanks
1 Solution

Accepted Solutions
CQuartetti
Hot Shot
Hot Shot

You don't need the SDK per se--you can get all the information you need to create the URL via the vSphere/ESXi/etc. managed object browser (MOB), ex. https://<your_server>/mob, but you'll have to automate it yourself:

The simplest VMRC URL is just your sever and MOID which on connect you can validate with your username and password, ex. vmrc://<your_server>/?moid=<your_moid>

There is no KB for this now but the VMRC team intends to post one.

---

Update: PowerCLI 6.5, announced on the PowerCLI blog 2016-11-17, installs VMRC and launches it with the Open-VMConsoleWindow command, ex.

Get-VM -Name VM-name | Open-VMConsoleWindow

To display the URL instead of launching VMRC, add the -UrlOnly parameter on the end. This URL includes a single-use expiring clone ticket which will log you in automatically. If you reuse the URL after the ticket has expired, or remove the ticket, VMRC will prompt you for credentials.

View solution in original post

0 Kudos
8 Replies
rcporto
Leadership
Leadership

Check if helps: How to Generate VM Remote Console URL for vSphere 5.x Web Client | virtuallyGhetto

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
0 Kudos
CQuartetti
Hot Shot
Hot Shot

The previous reply links to a 2011 virtuallyGhetto article which describes generating https:// URLs for the plugin VMRC, versions 5.5 and earlier. Standalone VMRC, versions 7 and later, are launched via vmrc:// URLs. These virtuallyGhetto articles reference the new URL scheme (and the comments there have more details):

VMware should have a KB document to describe this.

0 Kudos
SITAM
Contributor
Contributor

Hello,
For virtual ghetto, I understand it takes SDK. Is this possible without ?

Also, you mention a KB . What is his link?

0 Kudos
CQuartetti
Hot Shot
Hot Shot

You don't need the SDK per se--you can get all the information you need to create the URL via the vSphere/ESXi/etc. managed object browser (MOB), ex. https://<your_server>/mob, but you'll have to automate it yourself:

The simplest VMRC URL is just your sever and MOID which on connect you can validate with your username and password, ex. vmrc://<your_server>/?moid=<your_moid>

There is no KB for this now but the VMRC team intends to post one.

---

Update: PowerCLI 6.5, announced on the PowerCLI blog 2016-11-17, installs VMRC and launches it with the Open-VMConsoleWindow command, ex.

Get-VM -Name VM-name | Open-VMConsoleWindow

To display the URL instead of launching VMRC, add the -UrlOnly parameter on the end. This URL includes a single-use expiring clone ticket which will log you in automatically. If you reuse the URL after the ticket has expired, or remove the ticket, VMRC will prompt you for credentials.

View solution in original post

0 Kudos
SITAM
Contributor
Contributor

OK but i don't know <your moid>.

Is it possible with the DataStore Path?

Sddans titre.png

I try that but it doesn't work :

vmrc://vmer68vcenter.intranet.local/?moid=[LOCAL_ESX01_DS1] MP_v7/MP_v7.vmx

I Enter user name and password but after i have the message :

Sans titre.png

0 Kudos
CQuartetti
Hot Shot
Hot Shot

You must have the MOID to connect this way. Some other ways to find MOIDs:

  • ESXi command line - Display all VMs with their MOIDs: vim-cmd vmsvc/getallvms
  • PowerCLI - Find a VM by name and display the MOID: (Get-VM -Name "<vm_name>").ExtensionData.moref.value
    0 Kudos
    CQuartetti
    Hot Shot
    Hot Shot

    Here's a simple example in PowerCLI for connecting to an ESXi-hosted VM by name. Replace the items in bold with your specifics:

    Add-PSSnapin VMware.VimAutomation.Core

    Connect-VIServer <your_server>

    $sessionMgr = Get-View $DefaultViserver.ExtensionData.Client.ServiceContent.SessionManager

    $vm = Get-VM -Name "<vm_name>"

    $url = "vmrc://clone:{0}@{1}/?moid={2}" -f $sessionMgr.AcquireCloneTicket(), $DefaultVIServer.serviceuri.Host, $vm.ExtensionData.moref.value

    Start-Process $url

    0 Kudos
    Clem42
    Contributor
    Contributor

    I created this shortcut and it worked

    "C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe" vmrc://DomainName\UserName@vCenterName/?moid=vm-VmNumber. I found the VM number with the RVTools utility.

    0 Kudos