Console connect requirements for imported VMs

This document helps you with the requirements for connecting a VM using console connect for the VMs imported from VCenter to Hybr.

Hybr lets you connect to a VM using console connect. To make use of this feature, a set of pre-requisites needs to be followed. One of the main requirements is to assign ports to the VM properties. This is done automatically by Hybr for VMs created from the admin portal. In case, if you have imported one or more VMs, the ports have to assigned manually.

For VMs not created from Hybr and imported using connection sync, please follow the steps below.

There are 2 ways to assign the console ports to the imported VM’s.

Single or a few VMs

  1. Ports can be manually assigned for VMs one by one using Hybr Admin portal.

  2. VM needs to be stopped and started s VCenter requires this process to

Bulk port assignments

  1. PowerShell script can be used to bulk assign the ports for multiple VMs.

  2. VM needs to be stopped and stopped (This is a requirement from VCenter to make this port available for console connect).

VM needs to be stopped and started. (This is a requirement from VCenter to make this port available for console connect).

Option 1: Assign ports using Hybr portal

  • Login to Hybr Admin portal ➡️VConnect ➡️ Connections ➡️ VCenter

  • Drill down into the respective Connection

  • Navigate to the Virtual Machines tab.

  • Click on the Edit button and provide available the Port number (port range between 1000-9999 and 50000 – 50999)

  • Restart the VM and try to connect using console connect option.

Option 2: PowerShell script to assign the ports for multiple VM's:

To get all the available console ports, run the below command in PowerShell window (in admin mode) where the VConnect Tools is present. AvailabeConsoleConnect.csv will be generated in the same directory.

VCONNECT.EXE DownloadAvailableConsolePorts <connectionId:Int32> [/VConnectApiEndpoint:<String>] 
[/VConnectApiUserName:<String>] [/VConnectApiPassword:<String>]  

Example:

  • Open the shared AllocateVCenterRemoteConsoleConnectPorts-Updated.ps1 PowerShell script in notepad++ and give the required parameters as below.

$HostServerName = '-Vcenter server name-' 
$HostServerPort = 443 
$username = '- Vcenter Username-' 
$password = '- Vcenter password-' 
$Cluster = '-CLUSTERNAME-' 
$Datacenter = '-DATACENTERNAME-' 
$csvFile = '- Path to AvailabeConsoleConnect.csv generated in previous step-' 
$outputcsvfile = 'Path to save the allocated ports for the VM in an output file'  
  • Save the script and execute in PowerShell from the machine which has access to the VCenter.

  • Restart the VMs.

  • Once restarted, perform 'Sync console ports' button in Hybr admin portal --> VConnect --> Connections --> Choose a connection --> Console Ports tab.

VM needs to be stopped and started. This is a requirement from VCenter to make this port available for console connect.

Last updated