Checking and restoring the OVF context of the vSphere Replication Appliance
search cancel

Checking and restoring the OVF context of the vSphere Replication Appliance

book

Article ID: 324631

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

Missing OVF context can cause multiple problems when using vSphere Replication. These problems include, but are not limited to the following:

  • Upgrading vSphere Replication might fail.
  • After an upgrade, the vSphere Replication appliance is corrupted.
  • After an upgrade, the vSphere Replication appliance appears as a vSphere Replication server.
  • Registering an upgraded vSphere Replication instance with vCenter Single Sign-On fails with error
    Bad exit code: 1.

The OVF context of the vSphere Replication appliance might be lost or corrupted due to some of the following circumstances:

  • You restarted the vSphere Replication appliance by using the vSphere Web Client while the Client was connected to an ESXi host instead of a vCenter Server.
  • You removed the vSphere Replication appliance from the inventory and added it back in.


Resolution

Check if the vSphere Replication appliance has an OVF context

  1. In the vSphere Replication appliance console, log in as the root user.
  2. Open the /opt/vmware/etc/vami/ovfEnv.xml file. The file should contain the following properties:

    evs:GuestApi/evs:URL
    evs:GuestApi/evs:Token
    evs:GuestApi/evs:X509Thumbprint

    evs:VCenterApi/evs:IP
    evs:VCenterApi/evs:X509Thumbprint
    evs:VCenterApi/evs:HttpPort
    evs:VCenterApi/evs:HttpsPort
    evs:VCenterApi/evs:SelfMoRef
    evs:VCenterApi/evs:Address

Restore the OVF context of the vSphere Replication appliance

If the /opt/vmware/etc/vami/ovfEnv.xml file is empty or does not contain some of the properties listed above or the vSphere Replication appliance is missing an OVF context.

Please follow these steps 

    1. cd /opt/vmware/etc/vami
    2. mv ovfEnv.xml ovfEnv.xml.bkp
    3. touch ovfEnv.xml; chmod 644 ovfEnv.xml
    4. ls -l

          -rw-r--r-- 1 root root    0 Aug 27 20:28 ovfEnv.xml
    5. In vSphere Client UI

      power off and on the vSphere Replication Appliance
    6. Login to the vSphere Replication Appliance

      cd /opt/vmware/etc/vami

      ls -l

        -rw-r--r-- 1 root root 2843 Aug 27 20:33 ovfEnv.xml
  1. Use the vSphere Web Client to connect to the vCenter Server to which the vSphere Replication appliance is registered.
  2. Right-click the vSphere Replication Management server VM (HMS VM) and power it off and on.

The OVF environment is restored and you can upgrade the vSphere Replication appliance.

Additional Information

Live Site Recovery 9.0.2 release notes about upgrade from 8.8 

Upgrading vSphere Replication
Important: Before you initiate an upgrade, verify that the vSphere Replication appliance has an OVF environment, or context.



 In vSphere Replication /opt/vmware/etc/vami/ovfEnv.xml  file between   </ve:EthernetAdapterSection> and </Environment> the following will update

<ve:vServiceEnvironmentSection xmlns:ve="http://www.vmware.com/schema/ovfenv" xm                                                                                                                                                lns:evs="http://www.vmware.com/schema/vservice/ExtensionVService" ve:bound="true" ve:id="installation" ve:type="com.vmware.vservice.extension">
    <evs:GuestApi>
        <evs:URL>https://vc_name.doamin.tld/vsm/extensionService</evs:URL>
        <evs:Token>3bxxx72xxx37xxx47xxx11xxx41xxxdcxxx73xxx</evs:Token>
        <evs:X509Thumbprint>xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:ff:xx:xx:xx:xx:xx:xx</evs:X509Thumbprint>
    </evs:GuestApi>
    <evs:VCenterApi>
        <evs:IP>x.x.x.x</evs:IP>
        <evs:X509Thumbprint>xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:ff:xx:xx:xx:xx:xx:xx</evs:X509Thumbprint>
        <evs:HttpPort>80</evs:HttpPort>
        <evs:HttpsPort>443</evs:HttpsPort>
        <evs:SelfMoRef>VirtualMachine:vm-##</evs:SelfMoRef>
        <evs:Address>vc_name.doamin.tld</evs:Address>
    </evs:VCenterApi>
</ve:vServiceEnvironmentSection>

<ve:vServiceEnvironmentSection xmlns:ve="http://www.vmware.com/schema/ovfenv" xm                                                                                                                                                lns:evs="http://www.vmware.com/schema/vservice/ExtensionVService" ve:bound="true" ve:id="installation" ve:type="com.vmware.vservice.extension">
    <evs:GuestApi>
        <evs:URL>https://vc_name.doamin.tld/vsm/extensionService</evs:URL>
        <evs:Token>3bxxx72xxx37xxx47xxx11xxx41xxxdcxxx73xxx</evs:Token>
        <evs:X509Thumbprint>xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:ff:xx:xx:xx:xx:xx:xx</evs:X509Thumbprint>
    </evs:GuestApi>
    <evs:VCenterApi>
        <evs:IP>xxxx:xxx:xxxx:xxxxx:x:x:xxxx:xxx</evs:IP>
        <evs:X509Thumbprint>xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:ff:xx:xx:xx:xx:xx:xx</evs:X509Thumbprint>
        <evs:HttpPort>80</evs:HttpPort>
        <evs:HttpsPort>443</evs:HttpsPort>
        <evs:SelfMoRef>VirtualMachine:vm-##</evs:SelfMoRef>
        <evs:Address>vc_name.doamin.tld</evs:Address>
    </evs:VCenterApi>
</ve:vServiceEnvironmentSection>