RecoverPoint for VMs Automation – Advanced VM Protection
Wed, 21 Feb 2024 21:39:22 -0000
|Read Time: 0 minutes
In the spirit of automating everything, this blog will discuss a new automation solution in the RecoverPoint for VMs (RP4VMs) collection of automation solutions.
We have a variety of automation solutions for RP4VMs, including per-tag and per-cluster VM protection and use-case driven tasks, as well as a complete deployment automation solution. Now, I would like to present a new automation solution – Advanced VM Protection.
Let’s take a closer look at this exciting new solution.
What does the solution do?
The RecoverPoint for VMs advanced VM protection solution automates VM protection in RP4VMs with a wide variety of options:
- Automates VM protection based on pre-defined parameters in a JSON configuration file:
- VM name
- RP4VMs cluster name
- Plugin server IP or FQDN
- vCenter user/password or path to credentials file
- Production journal capacity (GB)
- Replica journal capacity (GB)
- Required RPO (sec)
- Failover networks per vNIC
- Performs and monitors mass VM protection
- Protects VMs for a specific RP4VMs cluster (optional)
- Performs VM protection operations on a specific plugin server (optional)
- Includes an option to skip the monitoring of VM protection preparation tasks
- Configures failover networks on a per network adapter basis as a post-protection operation
What is the solution?
It is a Python-based script that exclusively leverages the RP4VMs REST API.
Here is the list of prerequisites:
- Python 3.x (The script supports every platform Python is supported on)
- Python requests module, which can be installed using pip with the command:
pip install requests or python -m pip install requests
- RP4VMs 5.3.x and later
- Connectivity from the host running the script to the RP4VMs plugin server(s), specifically on tcp port 443
How do I use the script?
The script accepts the following parameters:
- One mandatory parameter, file, for a full path to the JSON configuration file.
- The optional parameters, rpvmcluster and server, limit script execution only for VM protection on a specified RP4VMs cluster and/or plugin server accordingly.
- The no-monitor parameter skips monitors of VM protection preparation task.
Here is the full script syntax:
# python advprotectvm.py -h usage: advprotectvm.py [-h] -file CONFIG_FILE [-cl RPVM_CLUSTER] [-s SERVER] [-nmonitor] Scripts advanced VM Protection in RecoverPoint for VMs options: -h, --help show this help message and exit -file CONFIG_FILE, --vm-config-file CONFIG_FILE Path to VM config file -cl RPVM_CLUSTER, --rpvmcluster RPVM_CLUSTER Optionally specify the RP4VMs cluster -s SERVER, --server SERVER Optionally specify RP4VMs Plugin Server DNS/IP -nmonitor, --no-monitor Optionally prevents protection monitoring
Use Cases and Examples
Let’s look at some common use cases for RP4VMs automated advanced VM protection:
- RP4VMs mass VM protection for onboarding of a new application:
# python advprotectvm.py -file idan-vms.json
- Batch VM protection only for a specific RP4VMs cluster:
# python advprotectvm.py -file idan-vms.json -cl Tel-Aviv
- Mass VM protection for a specific vCenter/ plugin or onboarding of a new datacenter:
# python advprotectvm.py -file vms.json -s pluginserver.idan.dell.com
Script output
# python advprotectvm.py -file vms.json -> Protecting VM prodwebsrv1 ---> Protection of VM prodwebsrv1 initiated -> Protecting VM prodappsrv1 ---> Protection of VM prodappsrv1 initiated -> Protecting VM proddbsrv1 ---> Protection of VM proddbsrv1 initiated -> VM protection initiated, monitoring ---> Protection of VM: prodwebsrv1, Transaction: d6783e2d-55be-47db-a082-de1d251c2375, Status: RUNNING ---> Protection of VM: prodappsrv1, Transaction: 808ab022-e79a-4ad1-a633-cc86e17644f2, Status: RUNNING ---> Protection of VM: proddbsrv1, Transaction: c7895dce-f3e6-4e70-872e-9d0b104d6273, Status: RUNNING ---> Protection of VM: prodwebsrv1, Transaction: d6783e2d-55be-47db-a082-de1d251c2375, Status: RUNNING ---> Protection of VM: prodappsrv1, Transaction: 808ab022-e79a-4ad1-a633-cc86e17644f2, Status: RUNNING ---> Protection of VM: proddbsrv1, Transaction: c7895dce-f3e6-4e70-872e-9d0b104d6273, Status: RUNNING ---> Protection of VM: prodwebsrv1, Transaction: d6783e2d-55be-47db-a082-de1d251c2375, Status: RUNNING ---> Protection of VM: prodappsrv1, Transaction: 808ab022-e79a-4ad1-a633-cc86e17644f2, Status: RUNNING ---> Protection of VM: proddbsrv1, Transaction: c7895dce-f3e6-4e70-872e-9d0b104d6273, Status: RUNNING ---> Protection of VM: prodwebsrv1, Transaction: d6783e2d-55be-47db-a082-de1d251c2375, Status: COMPLETED ---> Protection of VM: prodappsrv1, Transaction: 808ab022-e79a-4ad1-a633-cc86e17644f2, Status: COMPLETED ---> Protection of VM: proddbsrv1, Transaction: c7895dce-f3e6-4e70-872e-9d0b104d6273, Status: COMPLETED -> Configuring failover networks ---> Skipping failover network config for VM: prodwebsrv1 ---> Failover networks config is not required for VM: prodappsrv1 ---> Failover network config is successful for VM: proddbsrv1
Where can I find it?
The script and the config file can be found on GitHub: https://github.com/IdanKen/Dell-EMC-RecoverPoint4VMs.
Resources
- The Dell developer site provides comprehensive online API documentation, including full API references, tutorials, and use cases for the RP4VMs REST API.
- The RP4VMs REST API offers self-documentation – Swagger UI running on the plugin server itself – https://{plugin-server}/ui
- RecoverPoint for VMs GitHub repository
- RecoverPoint for VMs 5.3 – New RESTful API Demo
How can I get help?
For additional support, you are more than welcome to raise an issue in GitHub or reach out to me by email: Idan.kentor@dell.com
Thanks for reading!
Idan
Author: Idan Kentor
Related Blog Posts
PowerProtect Data Manager Deployment Automation – Deploy PowerProtect Data Manager in Minutes
Mon, 18 Sep 2023 22:34:52 -0000
|Read Time: 0 minutes
In the spirit of automating EVERYTHING, this blog will showcase the complete deployment of PowerProtect Data Manager (PPDM).
In the PPDM universe, we have auto-policy creation and ad-hoc VM backup solutions, use-case driven tasks, and so on -- all available in the official PowerProtect Data Manager GitHub repository. And now, I am proud to present to you the complete PPDM deployment automation solution.
Without further ado, let’s get started.
What does the solution do?
The PowerProtect Data Manager automated deployment solution boasts a wide array of functionality, including:
- Automatically provisioning PPDM from OVA
- Automatically deploying and configuring PPDM based on a JSON configuration file
- Adding PowerProtect DD (optional)
- Registering vCenter (optional)
- Registering remote PPDM systems (optional)
- Configuring bi-directional replication between two PPDM systems (optional)
What is the solution?
It’s a Python-based script that operates in conjunction with the PPDM REST API and vCenter.
Here is the list of prerequisites:
- Python 3.x (The script supports every platform Python is supported on)
- Python requests module, which can be installed using pip with the command: “pip install requests” or “python -m pip install requests”
- PowerProtect Data Manager 19.14 and later
- Connectivity from the host running the script to vCenter and PPDM
- PowerProtect Data Manager OVA image located on the host that is running the script
- Ovftool installed on the same host the script is running on
- Connectivity to remote PPDM system from the host running the script (only if the -ppdm parameter is provided)
How do I use the script?
The script accepts one mandatory parameter, -configfile or --config-file, and six optional parameters:
- (1) justova to deploy only the PPDM OVA or (2) skipova to skip OVA deployment
- (3) vc and (4) dd to register vCenter and PowerProtect DD respectively
- (5) ppdm and (6) cross to configure a remote PPDM system and bi-directional communication between the two PPDM systems respectively
- -cross / --bi-directional requires the argument -ppdm / --connect-ppdm to be specified as well
Here is the full script syntax:
# ppdm_deploy.py -h
usage: ppdm_deploy.py [-h] -configfile CONFIGFILE [-skipova] [-justova] [-vc] [-dd] [-ppdm] [-cross]
Script to automate PowerProtect Data Manager deployment
options:
-h, --help show this help message and exit
-configfile CONFIGFILE, --config-file CONFIGFILE
Full path to the JSON config file
-skipova, --skip-ova Optionally skips OVA deployment
-justova, --just-ova Optionally stops after OVA deployment
-vc, --register-vcenter
Optionally registers vCenter in PPDM
-dd, --add-dd Optionally adds PowerProtect DD to PPDM
-ppdm, --connect-ppdm
Optionally connects remote PPDM system
-cross, --bi-directional
Optionally configures bi-directional communication between the two PPDM hosts
Use Cases
Let’s look at some common use cases for PPDM deployment:
1. Greenfield deployment of PPDM including registration of PowerProtect DD and vCenter:
# python ppdm_deploy.py -configfile ppdm_prod.json -vc -dd
2. PPDM deployment including registration of vCenter and DD as well as a remote PPDM system:
# python ppdm_deploy.py -configfile ppdm_prod.json -vc -dd -ppdm
3. Full deployment of two PPDM systems including configuration of the remote PPDM systems for bi-directional communication.
In this case, we would run the script twice in the following manner:
# python ppdm_deploy.py -configfile ppdm_siteA.json -vc -dd -ppdm -cross
# python ppdm_deploy.py -configfile ppdm_siteB.json -vc -dd
4. In case of evaluation or test purposes, the script can stop right after the PPDM OVA deployment:
# python ppdm_deploy.py -configfile ppdm_test.json -justova
5. In case of PPDM implementation where deployment needs to take place based on an existing PPDM VM or former OVA deployment:
# python ppdm_deploy.py -configfile ppdm_prod.json -skipova
Script output
# python ppdm_deploy.py -configfile ppdm_prod.json -vc -dd -ppdm -cross
-> Provisioning PPDM from OVA
Opening OVA source: C:\Users\idan\Downloads\dellemc-ppdm-sw-19.14.0-20.ova
Opening VI target: vi://idan%40vsphere.local@vcenter.hop.lab.dell.com:443/ProdDC/host/DC_HA1/
Deploying to VI: vi://idan%40vsphere.local@vcenter.hop.lab.dell.com:443/ProdDC/host/DC_HA1/
Transfer Completed
Powering on VM: PPDM_Prod_36
Task Completed
Completed successfully
---> OVA deployment completed successfully
-> Checking connectivity to PPDM
---> PPDM IP 10.0.0.36 is reachable
-> Checking PPDM API readiness
---> PPDM API is unreachable. Retrying
---> PPDM API is unreachable. Retrying
---> PPDM API is unreachable. Retrying
---> PPDM API is unreachable. Retrying
---> PPDM API is unreachable. Retrying
---> PPDM API is available
-> Obtaining PPDM configuration information
---> PPDM is deployment ready
-> Accepting PPDM EULA
---> PPDM EULA accepted
-> Applying license
-> Using Capacity license
-> Applying SMTP settings
-> Configuring encryption
-> Building PPDM deployment configuration
-> Time zone detected: Asia/Jerusalem
-> Name resolution completed successfully
-> Deploying PPDM
---> Deploying configuration 848a68bb-bd8e-4f91-8a63-f23cd079c905
---> Deployment status PROGRESS 2%
---> Deployment status PROGRESS 16%
---> Deployment status PROGRESS 20%
---> Deployment status PROGRESS 28%
---> Deployment status PROGRESS 28%
---> Deployment status PROGRESS 28%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 32%
---> Deployment status PROGRESS 36%
---> Deployment status PROGRESS 40%
---> Deployment status PROGRESS 40%
---> Deployment status PROGRESS 48%
---> Deployment status PROGRESS 48%
---> Deployment status PROGRESS 48%
---> Deployment status PROGRESS 48%
---> Deployment status PROGRESS 52%
---> Deployment status PROGRESS 52%
---> Deployment status PROGRESS 52%
---> Deployment status PROGRESS 52%
---> Deployment status PROGRESS 52%
---> Deployment status PROGRESS 56%
---> Deployment status PROGRESS 56%
---> Deployment status PROGRESS 56%
---> Deployment status PROGRESS 60%
---> Deployment status PROGRESS 60%
---> Deployment status PROGRESS 72%
---> Deployment status PROGRESS 76%
---> Deployment status PROGRESS 76%
---> Deployment status PROGRESS 80%
---> Deployment status PROGRESS 88%
---> Deployment status PROGRESS 88%
---> Deployment status PROGRESS 88%
---> Deployment status PROGRESS 88%
---> Deployment status PROGRESS 88%
---> Deployment status PROGRESS 88%
---> Deployment status SUCCESS 100%
-> PPDM deployed successfully
-> Initiating post-install tasks
-> Accepting TELEMETRY EULA
---> TELEMETRY EULA accepted
-> AutoSupport configured successfully
-> vCenter registered successfully
--> Hosting vCenter configured successfully
-> PowerProtect DD registered successfully
-> Connecting peer PPDM host
---> Monitoring activity ID 01941a19-ce75-4227-9057-03f60eb78b38
---> Activity status RUNNING 0%
---> Activity status COMPLETED 100%
---> Peer PPDM registered successfully
-> Configuring bi-directional replication direction
---> Monitoring activity ID 8464f126-4f28-4799-9e25-37fe752d54cf
---> Activity status RUNNING 0%
---> Activity status COMPLETED 100%
---> Peer PPDM registered successfully
-> All tasks have been completed
Where can I find it?
You can find the script and the config file in the official PowerProtect GitHub repository:
https://github.com/dell/powerprotect-data-manager
Resources
Other than the official PPDM repo on GitHub, developer.dell.com provides comprehensive online API documentation, including the PPDM REST API.
How can I get help?
For additional support, you are more than welcome to raise an issue in GitHub or reach out to me by email:
Thanks for reading!
Idan
Author: Idan Kentor
RecoverPoint for VMs Deployment Automation – How to Deploy Complete RP4VMs Systems in Minutes
Wed, 21 Sep 2022 22:02:31 -0000
|Read Time: 0 minutes
I’m a firm believer in automating EVERYTHING, so in this blog we are going to show how we automate just about everything in RecoverPoint for VMs 😊.
In RP4VMs land, we have VM protection automation solutions, per-tag and per-cluster protection, use-case driven tasks, and so on. And now, I’m honored to present you a complete deployment automation solution.
So, first things first, what does it do?
- Automatically provisions vRPAs and the Plugin Server from OVA
- Automatically deploys an RP4VMs cluster based on the JSON configuration file
- Configures the Plugin Server (Optional)
- Connects to existing RP4VMs environments (Optional)
What is it?
It’s a Python-based script that operates with the RecoverPoint for VMs Deployment REST API and vCenter.
In terms of requirements, the following list should help:
- The script requires Python 3.x and supports every platform on which Python is supported.
- Requires the Python requests module. It can be installed using pip with the command: “pip install requests” or “python -m pip install requests”.
- RecoverPoint for VMs 5.3.x.
- Connectivity from the host on which the script is running to vCenter, vRPAs. It also requires connectivity to the plugin server and peer clusters if applicable.
- RP4VMs 5.3.x vRPA and Plugin Server OVA images must be located on the host that is running the script.
How do I use it?
The script accepts one mandatory parameter -configfile or --config-file and two optional parameters: (1) pluginserver and (2) connect to prevent configuration of the plugin server and to skip connection to other clusters accordingly.
Here is the full script syntax:
# python rp4vms_deploy.py -h
Usage: rp4vms_deploy.py [-h] -configfile CONFIGFILE [-pluginserver] [-connect] Script to automate RP4VMs deployment options: -h, --help show this help message and exit -configfile CONFIGFILE, --config-file CONFIGFILE Full path to the JSON config file -pluginserver, --config-plugin-server Optionally prevents Plugin Server configuration -connect, --connect-another-cluster Optionally prevents connection to a different cluster
Use cases
I might be biased but there are so many cases where this solution can come in handy. Let’s look at some common use cases:
- Greenfield deployment of a two-cluster system:
In this case, we would run the script twice in the following manner:
a) Deploying the first cluster:
# python rp4vms_deploy.py -configfile clusterA_config.json -connect
b) Deploying the second cluster including cluster connect:
# python rp4vms_deploy.py -configfile clusterB_config.json
2. Adding a new cluster to an existing system:
# python rp4vms_deploy.py -configfile cluster_config.json
3. Scale out – adding new clusters to a separate system on the same vCenter and plugin server:
a) Deploying the first cluster:
# python rp4vms_deploy.py -configfile clusterA_config.json -pluginserver -connect
b) Deploying the second cluster including cluster connect:
# python rp4vms_deploy.py -configfile clusterB_config.json -pluginserver
Script output
# python rp4vms_deploy.py -configfile config.json -> Provisioning Plugin Server from OVA Opening OVA source: C:\Users\idan\Downloads\RecoverPoint-PluginServer_v5.3.3_282.ova Opening VI target: vi://Administrator%40vsphere.local@10.0.0.10:443/Hopkinton/host/Hop_HA1/ Deploying to VI: vi://Administrator%40vsphere.local@10.0.0.10:443/Hopkinton/host/Hop_HA1/ Transfer Completed Powering on VM: Manchester_Plugin-Server Task Completed Completed successfully ---> OVA deployment completed successfully -> Provisioning vRPA1 from OVA Opening OVA source: C:\Users\idan\Downloads\EMC_RecoverPoint_vRPA-RP4VMs_rel5.3.SP3_m.348.ova Opening VI target: vi://Administrator%40vsphere.local@10.0.0.10:443/Hopkinton/host/Hop_HA1/ Deploying to VI: vi://Administrator%40vsphere.local@10.0.0.10:443/Hopkinton/host/Hop_HA1/ Transfer Completed Powering on VM: Manchester_vRPA1 Task Completed Completed successfully ---> OVA deployment completed successfully -> Provisioning vRPA2 from OVA Opening OVA source: C:\Users\idan\Downloads\EMC_RecoverPoint_vRPA-RP4VMs_rel5.3.SP3_m.348.ova Opening VI target: vi://Administrator%40vsphere.local@10.0.0.10:443/Hopkinton/host/Hop_HA1/ Deploying to VI: vi://Administrator%40vsphere.local@10.0.0.10:443/Hopkinton/host/Hop_HA1/ Transfer Completed Powering on VM: Manchester_vRPA2 Task Completed Completed successfully ---> OVA deployment completed successfully -> Checking connectivity to vRPAs ---> vRPA Mgmt IP 10.247.8.118 is reachable ---> vRPA Mgmt IP 10.247.8.119 is reachable ---> All vRPAs are reachable -> Running deployment pre-validation checks ---> Transaction LOCAL_1 RUNNING 0% ---> Pre-installation validation passed successfully -> Timezone detected: Europe/London -> Searching for available vRPAs ---> Transaction LOCAL_2 RUNNING 0% ---> Transaction LOCAL_2 RUNNING 50% ---> Transaction LOCAL_2 RUNNING 50% ---> Transaction LOCAL_2 RUNNING 50% -> DS for Repository Volume detected -> Mgmt Network detected -> Building deployment configuration -> Deploying RP4VMs cluster ---> Transaction DEPLOY_3 RUNNING 0% ---> Transaction DEPLOY_3 RUNNING 52% ---> Transaction DEPLOY_3 RUNNING 52% ---> Transaction DEPLOY_3 RUNNING 52% ---> Transaction DEPLOY_3 RUNNING 53% ---> Transaction DEPLOY_3 RUNNING 53% ---> Transaction DEPLOY_3 RUNNING 84% ---> Transaction DEPLOY_3 RUNNING 84% ---> Transaction DEPLOY_3 RUNNING 84% ---> Transaction DEPLOY_3 RUNNING 84% -> Cluster deployed successfully -> Checking connectivity to cluster Mgmt IP ---> vRPA Cluster is reachable -> Checking connectivity to Plugin Server ---> Plugin Server is reachable -> Configuring Plugin Server -> Plugin Server configured successfully -> Running connectivity checks to peer cluster ---> Transaction LOCAL_28 RUNNING 0% ---> Transaction LOCAL_28 RUNNING 14% ---> Transaction LOCAL_28 RUNNING 44% ---> Transaction LOCAL_28 RUNNING 48% ---> Transaction LOCAL_28 RUNNING 52% ---> Transaction LOCAL_28 RUNNING 84% ---> Connectivity checks to peer cluster completed successfully -> Connecting clusters ---> Transaction LOCAL_29 RUNNING 0% ---> Transaction LOCAL_29 RUNNING 51% ---> Transaction LOCAL_29 RUNNING 51% ---> Clusters Connect completed successfully -> All tasks completed successfully
Where can I find it?
The script and the config file can be found at GitHub:
https://github.com/IdanKen/Dell-EMC-RecoverPoint4VMs
How can I get help?
You are more than welcome to file an issue in GitHub or reach out to me via email:
Idan.kentor@dell.com
Thanks for reading!
Idan
Author: Idan Kentor