Failed to configure VR to VC with custom ports.
search cancel

Failed to configure VR to VC with custom ports.

book

Article ID: 340869

calendar_today

Updated On:

Products

VMware Live Recovery VMware vCenter Server

Issue/Introduction

Appliance configuration workflow is unable to autodiscover VC http port.

VC ports values can be taken:
1. Using VC MOB browser: https://<vc-ip>/mob/?moid=ProxyService&vmodl=1
2. ssh to VC and get value from /etc/vmware-rhttpproxy/config.xml file:

    cat /etc/vmware-rhttpproxy/config.xml | grep Port

This command will show both http and https ports.

Symptoms:
In case if VC is configured with custom http port (different from 80), The vSphere Replication Management Server configuration from VRMS Appliance Management UI will fail with error "Failed to register VRMS".

Environment

VMware vCenter Server 7.0.x
VMware vCenter Server 6.7.x

Resolution

Recommend to follow workaround

Workaround:

ssh to HMS Appliance and execute the following command as a root:

python /opt/vmware/share/htdocs/service/hms/cgi/hms-dr.py --cmd saveembeddedconf --ls https://<vc-or-psc-hostname>:<https-port>/lookupservice/sdk --lsthumbprint <ls-thumbprint> --ssoadmin <sso-admin> --ssopassword <sso-password> --vcip <vc-ip-or-hostname> --vcport <vc-http-port> --vcthumbprint <vc-thumbprint> --servername <server-name> --hmshost <hms-hostname> --hmsport <hms-server-port> --self-moid <hms-vm-mo-id> --adminmail <admin-email> --secmail <admin-email> --strict-certs <certs-mode>



Where:

<ls-thumbprint> and <vc-thumbprint> - can be obtained with the following methods:

1. echo QUIT | openssl s_client -connect <psc/vc-ip>:<psc/vc-ssl-port> 2>/dev/null | openssl x509 -noout -fingerprint -sha256


2. While following HMS Appliance configuration steps wizard in VMware VRMS Appliance Management thumbprint can be taken when thumbprint confirmation prompt appears.

<hms-server-port> - the value is 8043

<vc-http-port> - custom VC http port. Please check "Description" section for instructions on how to get VC ports values.

<hms-vm-mo-id> - HMS Appliance VM managed object reference id.
There are 2 ways to get appliance id.
 

Method 1:

Open /opt/vmware/etc/vami/ovfEnv.xml file and take the value of "Environment" tag attribute "ve:vCenterId". For example with "Environment" tag value of:

<Environment xmlns="http://schemas.dmtf.org/ovf/environment/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oe="http://schemas.dmtf.org/ovf/environment/1" xmlns:ve="http://www.vmware.com/schema/ovfenv" oe:id="" ve:vCenterId="vm-28">


The vmMoId would be "vm-28".
 

Method 2:

vmMoId can be taken from VC MOB browser:
1. Go to https://<vc-ip>/mob
2. Select ("PropertyType.PropertyName") "ServiceContent.content" > "ManagedObjectReference:Folder.rootFolder" > "ManagedObjectReference:ManagedEntity[].childEntity <datacenter-name>" > "ManagedObjectReference:Folder.vmFolder" > "ManagedObjectReference:ManagedEntity[].childEntity"
3. Find HMS Appliance by VM name and take it's vmMoId.

<certs-mode> - refers to "hms-trust-mode" in hms-configuration.xml