When an ESXi host is removed from vCenter, and later re-added, such as might occur with a host OS reinstallation, its managed object reference (moref) in the vCenter database changes. In the event that an administrator needed to recreate a VPG by importing a VPG configuration XML file via the Zerto Diagnostics utility, when the XML file was generated prior to the host removal, the import will fail. The failure is due to the fact that the XML file references the host’s old moref as a target for replication. This article explains how to workaround such a situation.
Note: If a host is removed from vCenter, and later re-added, with its moref changing in the vCenter database, other associated morefs, such as those of VMs, datastores, and networks local to the host, will change as well. This article pertains to host moref changes only, however unless these local resources are in use as targets for replication, such ancillary moref changes will have no effect on Zerto Virtual Replication.
In order to locate the moref of the removed host, when importing a VPG configuration XML file via the Zerto Diagnostics utility, if the import fails, the dialog will reference the cause for the failure, indicating the host specific moref. Let’s call this host-a.
- Navigate to https://vcenterIP/mob.
- Login with administrator credentials.
- Click the "Content" link under the value for the "content" property.
- Click the "group" link under the value for the "rootFolder" property.
- Click the relevant "datacenter" link under the value for the "childEntity" property.
- Click the relevant "group" link under the value for the "hostFolder" property.
- Click the "domain" link for the relevant cluster (or standalone host) under the value for the "childEntity" property.
- Check the values for the "host" property - the relevant hosts will be listed along with their morefs - let’s call the relevant one host-b.
Now that the old and new morefs are available, proceed as follows:
- On the source or target ZVM, navigate to the ZVR directory’s ExportedSettings folder, which contains ZVR VPG configuration XML files: C:\Program Files (x86)\Zerto\Zerto Virtual Replication\ExportedSettings.
- Make a copy of one of the files, with a timestamp when the VPGs were configured as desired, and place it on the ZVM’s desktop.
- In a text editor such as Notepad++, open the XML file on the desktop.
- Search the file to locate all instances of “host-a”.
- Replace those instances with “host-b”.
- Save a copy of the file.
- Open the Zerto Diagnostics utility.
- Choose “Import Protection Group Settings”.
- Browse to locate the edited XML file, and follow the prompts to import it.