When trying to query VMs to configure replication on vSphere replication, it fails with 503 Service unavailable.
search cancel

When trying to query VMs to configure replication on vSphere replication, it fails with 503 Service unavailable.

book

Article ID: 377383

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

When trying to query VMs

Invoke-VrGetLocalVms -pairingId {pairing UUID} -vcenterId {vCenter UUID}

 

to configure replication on vSphere replication, it fails with 503 Service unavailable.

Environment

vSphere Replication 9.x

Cause

The issue is that the request to retrieve all VMs objects from vCenter is taking too long, probably due to the total number of  VMs objects.
In order to optimize the query,  use suitable_for_replication=true in the query parameter (It will filter only VMs which are suitable for replication and are not already replicated). Details in 'Get Local Vms' in VMware vSphere Replication Rest API Gateway Developer Portal

Resolution

Apply the following steps to increase the timeouts of the REST API.

     1. In /opt/vmware/dr-rest/lib/dr-rest-api.properties increase the response timeout to 10 minutes (600 000 ms):

        responseTimeout=600000

     2. Restart dr-rest service

       systemctl restart dr-rest.service