VMware Cloud Community
RickMcKeon
Contributor
Contributor

vSphere Replication within one site

I have been looking into vSphere Replication recently and I have been thinking of using it in a one site environment, meaning I only have 1 vCenter with just 2 hosts but I want to utilize vSphere Replication as part of my backup plan. I found lots of material online on setting it up for multiple sites (i.e. more than one vCenter site), but nothing on one-site replication.

I tried to do it myself in my test lab but it didn't work well, for example I couldn't see the replica VM on the target host even though it was present in the target datastore, the Recover option wasn't showing up (so I couldn't actually test recovery), and even when I outright deleted the original VM for testing I couldn't recover it back.

0 Kudos
8 Replies
a_p_
Leadership
Leadership

I set this up for a customer some time ago with vSphere 5.1 and it's working well. For the setup I simply followed the original documentation (VMware vSphere Replication Documentation) which contains a section for "Replicating a Virtual Machine in a Single vCenter Server Instance".

André

0 Kudos
bayupw
Leadership
Leadership

Yes you can replicate a VM with VR (vSphere Replication) in 1 site with 1 vCenter as André a.p. has mentioned previously.

It is documented in the vSphere Replication Administration Document here: vSphere 5.5 Documentation Center - Replicating a Virtual Machine in a Single vCenter Server Instance

You can use vSphere Replication to replicate a virtual machine in a single vCenter Server even if the vCenter Serverinstance has only one host in its inventory.

When you configure replication in a single vCenter Server instance, you can select the source site as the target site for replication. You then configure replication in the same way as for an infrastructure with a source and a target site. For example, you can replicate a virtual machine to a different datastore attached to the same host or another host. vSphere Replication prevents you from using the source or replicated virtual machine's vmdk files as the target of the replication.

The virtual machine name must be unique in the same folder in the vCenter Server inventory. In the recovery wizard, vSphere Replication does not allow you to select a folder if there is already a virtual machine with the same name registered to it. During recovery if there is a virtual machine with the same name, you might see an error message. See Error Recovering Virtual Machine in a Single vCenter Server Instance for more information.

You can also replicate between sites from or to remote office as below sample architectureVR1.jpg

VR2.jpg

If you are looking for backup & recovery solution / data protection that comes with vSphere you can consider using VDP (vSphere Data Protection) too.

VMware vSphere Data Protection

VMware KB: vSphere Data Protection (VDP) FAQ

VMware vSphere with Operations Management: Data Protection | United States

Data Protection & Data Recovery with VMware vSphere | United States

Bayu Wibowo | VCIX6-DCV/NV
Author of VMware NSX Cookbook http://bit.ly/NSXCookbook
https://github.com/bayupw/PowerNSX-Scripts
https://nz.linkedin.com/in/bayupw | twitter @bayupw
0 Kudos
vmroyale
Immortal
Immortal

Another good resource: http://www.yellow-bricks.com/2012/09/17/back-to-basics-install-configure-and-use-vsphere-replication...

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
RickMcKeon
Contributor
Contributor

Like I said in OP I already tried implementing it...but it didn't work well. For example, when I deleted the source VM from Host A (to test), it also deleted the target vmdk files from Host B.

So if I'm understanding correctly, VMware is saying that all I need for my scenario is one vCenter server and one VR Appliance, and it should work?

0 Kudos
a_p_
Leadership
Leadership

>>> when I deleted the source VM from Host A (to test), it also deleted the target vmdk files from Host B.

Works as designed! With the replication context still being in place that's the expected behavior.

In case the primary VM crashes, the first thing you do is to recover the VM from the replica. After the successful recovery of the VM, you may delete the source VM.

André

0 Kudos
RickMcKeon
Contributor
Contributor

That's all well and good Andre, but the problem is that even the Recover option isn't even showing when I right-click on the replication task...it only shows up when I delete the source VM from disk. Also, on the target side, is a VM replica supposed to appear?

0 Kudos
a_p_
Leadership
Leadership

So what you are saying is that you don't see the recover option in the "Incoming Replications" tab for the VM?

You should be able to recover the replica from the "Incoming Replications" after powering off the source VM. With a single site environment, you will then have to select a location (e.g. a newly created folder, i.e. different from the source VM's location) to which you want to restore the VM.

André

0 Kudos
RickMcKeon
Contributor
Contributor

Seems to be sorted now...I could see it after multiple restarts of the vSphere Replication Appliance and a restart of the vCenter Server Appliance.

Also had to log out and in the vSphere Web Client countless times when setting up the actual replication, so it could be that I wasn't seeing the option due to a web interface bug. Why does VMware create such great software but then have such a buggy web interface?

0 Kudos