Pages

Showing posts with label vSphere Replication Appliance. Show all posts
Showing posts with label vSphere Replication Appliance. Show all posts

Thursday, October 25, 2018

Deploying vSphere Replication Appliance 8.1 as an OVF via a vCenter 6.5 Content Library

It has been a while since I’ve deployed a vSphere Replication Appliance and since I had the opportunity to do so this week, I took the time to screenshot the process so I can write this blog post demonstrated how to use the Content Library for the deployment.

Begin by downloading the vSphere Replication appliance from the VMware portal:

VMWare-vSphere_Replication-8.1.0-9466424.iso

As the supplied download is an ISO file, you’ll need to unpack the package into a folder as such:

image

The files we’ll need to upload into the Content Library is located in the bin folder:

image

With the contents ready for upload, log into the vSphere Client, navigate into a Content Library that has been created, select Templates, click on Actions and then Import item:

image

Select Local file and then click on the UPLOAD FILE button:

image

Select the vSphere_Replication_OVF10.ovf file in the folder and click Open:

image

What’s nice about the import process is that it will notify you if you forget to include the required VMDK files as shown in the screenshot below:

image

Proceed by clicking on the UPLOAD button again and select the required files:

image

The wizard should now have the IMPORT button active:

image

Clicking on the IMPORT button will proceed with the upload:

image

image

Once the import / upload has completed, the ovf file should now be available under the Templates section:

image

Proceed by right clicking on the vSphere_Replication_OVF10.ovf file and select New VM from This Template…:

image

Provide a name for the appliance in the Virtual machine name text field:

image

Select a compute resource:

image

A brief details summary will be provided

image

Agree to the EULA as we always do:

image

Select the appropriate vCPU configuration for the appliance:

image

The following VMware document provides information on the decision for either a 2 or 4 vCPU configuration:

https://docs.vmware.com/en/vSphere-Replication/6.5/com.vmware.vsphere.replication-admin.doc/GUID-E654F2D8-7D56-4A81-9568-E85172A7022D.html

Note:

Selecting higher number of vCPUs ensures better performance of the vSphere Replication Management Server, but might slow down the replications that run on ESXi host systems that have 4 or less cores per NUMA node. If you are unsure what the hosts in your environment are, select 2 vCPUs.

image

I’ll be selecting 2 vCPU for this example:

image

Select the datastore for the appliance:

image

Select a VLAN for the management network:

image

Fill in the required fields for the appliance:

image

Review and click Next:

image

Review the deployment summary and click on Finish to begin the deployment:

image

The Recent Tasks should now display the deployment status of the appliance:

image

image

image

The new appliance should also be displayed in the client:

image

Proceed by powering on the appliance:

image

Wait until the following is displayed in the console:

image

Launch a browser and navigate to:

https://<replication appliance IP/FQDN>:5480

Log in with the user name root and the password configured earlier in the wizard:

image

image

Click on the Configuration button and fill in the appropriate fields for the vCenter information:

image

**Note that the VRM service is stopped and it is expected as the configuration has not completed.

Proceed to click on Save and Restart Service once the configuration parameters have been configured and you should see the status Verifying LookupService’s SSL certificate to be displayed:

image

The following Confirm SSL Certificate window will be displayed if you are using a self-signed certificate on the vCenter server so proceed by clicking on the Accept button:

image

The status Saving configuration will be displayed:

image

The process should completed with Successfully saved the configuration displayed and the VRM service shown to be running:

image

The Site Recovery icon will not immediately show up:

image

Attempting to log out and back in immediately will likely who the following message:

There are plug-ins that were installed or updated. They will be ready for use next time you log into vSphere Client.

imageimage

After logging out a second time and back in should now show the Site Recovery icon:

imageimage

Tuesday, March 6, 2018

vSphere Replication replicated virtual machines in SRM protected groups have the “Protection Status” as “Replication Error”

I’ve been working with VMware Site Recover Manager (SRM) sparsely over the past few years and had thought I’ve seen most of the error messages but came across one today that I had not seen before so I thought it would be worth while to write a quite post for it.

Problem

Logging into the SRM section of a vSphere Web Client shows all of the Protection Groups listed as Not Configured:

image

Navigating into the list of Virtual Machines show the Protection Status as Replication Error:

image

Solution

One of the possible causes of this status being displayed in SRM is if the VMware vCenter Site Recovery Manager service on the target site is not started.  Starting the service will correct the issue.

clip_image002

Friday, July 14, 2017

“vSphere Replication does not support changing the length of a replicated disk.” error is thrown when attempting to expand a hard disk of replicate virtual machine

Problem

You attempt to expand a hard disk of a vSphere Replication replicated virtual machine but immediately receive the following error:

Reconfigure virtual machine

Invalid or unsupported virtual machine configuration.

See the error stack for details on the cause of this problem.

vSphere Replication does not support changing the length of a replicated disk.

image

Solution

The reason why the error is thrown is because vSphere Replication prevents sizing changes to the protected copy of the virtual machine (source) when it is replicated to a recovery copy of the virtual machine (target).  This makes sense because the replication engine likely tracks the changes in a certain way where changing the disk size would cause issues.  VMware has released the following two KBs to explaining the steps required to expand a replicated virtual machine’s hard disk:

Resizing virtual machine disk files that are protected by vSphere Replication (VR) using VMware vCenter Site Recovery Manager (2042790)
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2042790

Cannot resize the vmdk files during replication which are protected by vSphere replication (2052883)
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2052883

… but I find that the instructions aren’t completely clear so I thought I’d demonstrate the process with screenshots so there are no confusions.

Step #1 - Document Replicated Virtual Machine's vSphere Replication Configuration

Begin by documenting replicated virtual machine's vSphere Replication configuration because you will need this information when specifying the Target Location in one of the later steps (screenshots usually suffice assuming the path fits in the text field):

image

Ensure that you can read the full path of the Target Location:

image

The same applies to every Hard disk Target Location field:

image

image

Document the Quiescing method configuration:

image

Document the Recovery Settings and I usually select Cancel to avoid unintentionally making any changes:

image

Step #2 - Rename the Replicated Virtual Machine's Datastore Folder(s)

Proceed to browsing the Target Location datastore of where the replicated virtual machine is stored.  Note that this is the replicated copy and NOT the live copy:

image

One of the reasons why it is important to document the Target Location of the replicated copy is because the VMDK files are not always stored in the same directory as the VMX files as shown in this example:

image

Proceed to rename the replicated copy's folder as such.  Remember that this is the replicated copy and NOT the live copy:

image

Rename any additional folders that store the replicated virtual machine's files:

image

Step #3 - Stop the Virtual Machine's Replication 

I find the step #2 outlined in the KB:

Cannot resize the vmdk files during replication which are protected by vSphere replication(2052883)
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2052883

... unclear but it states:

2. Disable replication of the virtual machine you want to resize.

The fact that there is no disable option causes confusion.  Step #3 in the KB article:

Resizing virtual machine disk files that are protected by vSphere Replication (VR) using VMware vCenter Site Recovery Manager (2042790)
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2042790

... is much clearer as it states:

3. Stop replication for the virtual machine at the protected site using the vSphere Replication User Interface (UI).

So with this in mind, proceed to right-clicking on the replicate virtual machine in the vSphere Replication console and select Stop:

image

image

Note that it is important to you have renamed the Target Location virtual machine folders.  From what I've seen, if the replicated VM was seeded then the target files would not be deleted but if the replicated VM was not seeded then the files would get deleted.

image

You should now see tasks executed under the Recent Tasks pane indicating replication is being disabled for the virtual machine:

image

The virtual machine should no longer be displayed once the operation completes.

Step #4 - Expand Source/Live Virtual Machine's VMDK

With replication stopped, you should now be able to expand the source/live virtual machine's VMDKs so proceed to expanding them to the size required.

Step #5 - Expand Target/Replicated Virtual Machine's VMDK

Since the target/replicated virtual machine is not inventoried on a host, expanding the drives will need to be done with the vmkfstools command.  Proceed by either accessing the console or SSH to a host that has access to the datastore and navigate to the directory of the renamed folders containing the replicated virtual machine files. 

**The ls -lah command can be used to display the files in the command line.

Once in the directory containing the files, proceed to increase the hard drive VMDK file with the command:

vmkfstools -x XXXGB <filenameOfVMDK>

A similar output below will be displayed upon successfully increasing the VMDK:

image

Refreshing the datastore browser will show the new size of the VMDK:

image

Continue by renaming the folder back to the original name:

image

image

Proceed to reconfigure replication for the virtual machine:

image

image

imageimage

image

The default Target location that is used will most likely be different than the folder with the replicated VMDKs so use the previously documented configuration to select the same Target location as the original location:

image

Once the previous Target location has been configured, the amount of hard disks of the replicated virtual machine will now be displayed (there are 4 in this case):

image

Configure all of the hard disks to use the same folder as the previous location:

image

image

Selecting the folder with the existing replicated VMDK will display the following message:

Replication Seed Confirmation

Duplicate file found. Do you want to use this file as a seed?

Select Yes when receiving this prompt:

image

image

Continue and repeat the same procedure for the rest of the disks and the same Replication Seed Confirmation prompt should be displayed:

imageimage

image

----------------------------------------------------------------------------------------------------------------------------------------------

Note that I’ve noticed there are times when the wizard would prompt all of the disks at the same time rather than prompting for each individual disks as shown above:

image

----------------------------------------------------------------------------------------------------------------------------------------------

Configure the Quiescing method as previously documented:

image

Configure the Recovery settings as previously documented and complete the configuration by clicking Finish::

imageimage

The replicated virtual machine should now be displayed again with an Initial Full Sync Status:

image

Clicking on the i icon in the GUI would provide information:

image

To obtain more information on the status of the synchronization, log onto the esxi host with the protected VM is inventoried and execute:

vim-cmd vmsvc/getallvms

... to list all the VMs along with their Vmid:

image

Note the Vmid and execute the command:

vim-cmd hbrsvc/vmreplica.getState <Vmid>

This will display an output similar to the following:

image

I usually periodically execute the vim-cmd hbrsvc/vmreplica.getState command to check the progress as it provides more information:

image

The time it takes for the process to complete will vary depending on the size of the virtual machine but note that only changes are replicated over and not the full virtual machine.  The following are some screenshots taken during the synchronization:

imageimage

image

After the required time, the virtual machine should get back to an OK Status as such:

image

Hope this would help anyone looking for what the full process of expanding a replicated virtual machine’s hard disk would look like.