
Configurando VMware vSphere Replication 6.5
Continuing with the VMware vSphere series of posts 6.5, Today we will look at something quite important, Replicating virtual machines to our virtual infrastructure, How to protect ourselves against a disaster in our datacenter. We will initially configure the requirements and then we will see how to replicate a virtual machine and how to make a recovery or failover if necessary!
Configuring vSphere Replication
We will need at least two vSphere Replication virtual appliances, one at each Site, Thanks to them we will be able to replicate any machine in any direction and allow us a scheduled failover or avoid disasters!
We must deploy the first vSphere Replication appliance on our infrastructure, for this, over an ESXi host or right-click cluster > "Implement ovf template..."
Select local file and search for it from "Browse",
We select the 5 necessary files that we will have downloaded, "Open",
Select the folder or datacenter where we will locate the first appliance, "Next";
We select a destination host where it will run, "Next",
We see that we are going to roll out the version 6.5, "Next",
We accept the license and continue,
We indicate the number of vCPUs for the appliance, 2vCPU or 4vCPU, "Next",
We must select a destination dastore and a disk format, "Next",
We select the network of virtual machines where we will deploy this appliance,
And we specify the network configuration, both your IP address, mask, Gateway, NTP server, DNS servers, root user password...
We confirm the installation of the extension in vCenter, "Next",
And click on "Finish" to finally start deploying the appliance,
We will have to wait a few minutes while our first appliance is deployed!
Turn it on and when we see that the console has started, We!
If we go to "Home" > "vSphere Replication" > "Home", we will have to verify and if necessary "Configure" this first appliance, by selecting it from the vCenter where it is deployed,
Be careful, if we do not see this information, it will be advisable to log out and reopen the vSphere Web Client,
The vSphere Replication Appliance management website will open, We validate ourselves as root,
From here we can manage any appliance system configuration as well as updates,
From the "Configuration" tab, we must verify that we have the IP address or FQDN of the PSC correctly configured in 'LookupService Address', click on "Save and Restart Service",
We rely on the "Accept" certificate,
Once we see that it started the services it will show us that the config was perfectly recorded.
We return to the vSphere Web Client and if we refresh it we will have it well configured! Now let's deploy the other Replication appliance on the other site, select it and click on "Implement",
We start again the wizard of dedeploying the vSphere Replication appliance, This time it will be a second appliance, we select the Datacenter & "Next";
Select the destination host, "Next";
Select the target datastore and vDisk format,
We must also configure all the network parameters,
We check the Replication extension again, "Next";
And if everything is correct, click on "Finish"!
Deployment of the second replication appliance will begin, We waited a few minutes...
Once the appliance has booted, we'll go back to the vSphere Web Client and refresh! It will detect a problem in the configuration, select it and click on "Configure",
Again, in this new appliance we will have to correct the IP address of our PSC, Record and restart services!
We trust the certificate, "Accept",
After a few minutes we will have the configuration recorded!
We refresh our vSphere Web Client again and after a few seconds we should see all the configuration perfectly done in our 2 Sites!
Synchronizing machines
We'll make an example of replicating a VM with an RTO of 15 minutes, that is, every 15 minutes will replicate the blocks that have changed from the VM to another VM in another DataCenter!
GOOD, on the virtual machine we want to protect and replicate to another data center, Right-click > "All vSphere Replication Actions" > "Configure replication..."
Select "Replicate to a vCenter Server" as the target, "Next",
We must select the remote site, If we don't have it on the list, it's a good time to add it, "Next",
We leave by default & "Next",
We must click on "Edit" to locate the VM in a specific datastore,
We select the datastore that interests us and we accept,
We can now continue with the wizard,
If the replication traffic will use the WAN we will need to compress it, otherwise, We can continue,
We select RTO that we wish to meet, In this example we will replicate the machine every 15 minutes,
If everything is correct, we confirm and with "Finish" the replica of this VM will be configured, The replication process runs automatically,
If we go to the vCenter, "Supervision" tab, "vSphere Replication" tab: we will be able to see outgoing/incoming replicas, reports and configure against the cloud. We will see the progress and the machines we have configured,
Recovering a VM
If we want to make a failover or directly lift a VM that has failed in the source data center, We'll follow these simple steps!
About the target vCenter, "Supervision" tab, "vSphere Replication" subtab, in "Incoming replications" we can select the affected VM and right-click select "Recovery..."
We will select if we want to synchronize changes in case the source VM is fine and we want to make a failover. Or use existing data as the source VM does not exist or is corrupted, "Next"
Select the folder where we will leave the VM, "Next",
We select the host where your resources will run, "Next",
We confirm if it is correct with "Finish",
… and we will wait as long as necessary while you synchronize or directly lift the replicated machine...
And nothing, we will be able to see how the VM rose and the state recognizes it as Recovered!
If we're going to leave this MV there, it will be advisable to disable and stop the replication of said VM, in the home data center, "Supervision" > "vSphere Replication" > "Outbound replications" > we select the VM in question and click on "Stop replication",
We accept and ready!