vSphere 5.1 replication issue and workaround
Yesterday I tried to enable vSphere replication for my vCenter server and I couldn’t make it work. Always in replication status I got an error message
replication error: There is a storage issue with datastore path
Even if you configure replication again and again, it does not help. After deep dive into logs I found that path to target datastore was not reachable, that was weird cause target and source datastores were on the same host, both local. From vSphere 5.1 Replication documentation first point states
vSphere Replication cannot access datastores through hosts with multiple management virtual NICs and postsDatastoreInaccessibleEvent in vCenter Server: vSphere Replication cannot access datastore.
If a host is configured with multiple virtual NICs and you select more than one NIC for management traffic, vSphere Replication registers only the first NIC and uses it to access target datastores. If the vSphere Replication server address is not on the first management network of the host, vSphere Replication does not communicate with the host.
Workaround: Use a host with a single virtual NIC selected for management traffic for datastores at the secondary site. You can also reconfigure the host networking so that the address of the first management virtual NIC is from a network that vSphere Replication can access.
Indeed, I had two vmkernel ports configured for management traffic, both to different subnets. When I disabled mgmt traffic on second vmkernel portgroup vSphere replication works like a charm. One can enable it back mgmt traffic on vmkernel portgroup after initial replication is done.
NOTE: to successfully enable replication on VM, mgmt traffic has to be disabled on secondary vmkernel portgroup before initial replication.