Automate backup tasks with vCenter Orchestrator through the Veeam Restful API

  • Tutorial
Most people who have come across VMware vSphere task automation will sooner or later learn about VMware vCenter Orchestrator.

The presence of a REST plugin in this framework led us to think that it is possible to integrate vCenter Orchestrator with Veeam Backup & Replication, thus automating the operations performed by Veeam Backup Enterprise Manager, in particular: starting, stopping or viewing backup statistics, performing restores, viewing, security role management.

So, the source data:
  • Installed vCenter Orchestrator 5.5.2
  • Installed Veeam Backup & Replication v8 Enterprise Plus

What is needed:
  • make it work together through REST (by the way, through PowerShell integration is also possible, but this is outside the scope of this case)

What awaits you:
  • integration nuances
  • REST request examples

I ask for a cut for details.

Preparation: installing and configuring vCO

In fact, installing vCO is generally a separate song that has several verses and choruses (no, seriously, why does vCO not support IE under 10, but it takes off on Firefox 15?). If someone is interested in this story, write in the comments, I will gladly share my “tips & tricks”.

But, by and large, the most important thing for integration with Veeam Backup & Replication is to install the REST plugin. For all the rest, welcome to VMware's official documentation .

Preparation: setting up Veeam Backup & Replication

I would like to draw particular attention to the fact that this case is possible only if you have Veeam Backup & Replication Enterprise Plus installed. The reason is very simple - the full name of the interface is Veeam Backup Enterprise Manager RESTful API. That is, the API allows developers to communicate specifically with Enterprise Manager, and this component is only available if you have an Enterprise Plus license .

Thus, preparation for integration with vCO is as follows:

  1. Install and configure Veeam Backup Enterprise Manager
  2. All ready for integration :)


Step One: Establish a Connection

To establish a vCO connection with the Veeam RESTful API, you must add a REST host.





In running Wokflow, you need to fill in the Name and URL fields. Connection timeout and Operation timeout settings can be left unchanged.

You can reach the Veeam RESTful API at the following addresses:

  • Veeam Restful API HTTP URL http: //: 9399 / api /
  • Veeam Restful API HTTPS URL https: //: 9398 / api /




Specify a proxy, if used. For our example, we decided to do without it.



Specify the type of authentication; we thought, thought and chose basic.



Next step: select the session mode (Shared Session or per User Session) and specify the authentication data.



In the event that you, like us, decide to choose an https connection, you must accept an SSL certificate.





And if everything went smoothly, nothing fell off anywhere and did not fly away, then Workflow will be created.



Step two: import the circuit

The next step is to import the Veeam REST circuit. It is available on the server where Veeam Backup Enterprise Manager is deployed. In our case, this is:

C: \ Program Files \ Veeam \ Backup and Replication \ Enterprise Manager \ schemas \ RestAPI.xsd

The easiest way is to share the schema on the web server so that vCO can “get through” it.
And proceed directly to the import process.



Select the host added in the previous step.



We indicate the path where the circuit lies.



Schema imported.



Step three: do what we want

After a long stage of settings, finally, we can enjoy the fact that we can start any operations that are allowed from Veeam Backup Enterprise Manager. For example, we decided to create a number of very simple queries. In particular:

Got a list of backup servers.



View a list of failover plans.



Well, the Cloud Gateways collections were delighted.



Finally

In conclusion, I want to say that the integration process turned out to be quite simple if you know where to click and what to add. If you offer me now to redo all 16 pictures that are inserted to demonstrate the process, it will take less than an hour.
And now it’s even become interesting - but will PowerShell get any more complicated or simpler? Does anyone want to try? .. Maybe disassembling a case is more difficult? What do you think?

Additional Information:

Only registered users can participate in the survey. Please come in.

Should I consider the integration case with vCO via PowerShell?

  • 61.5% Why not? 8
  • 30.7% Required, Only Requests Must Be More Complex 4
  • 7.6% Why? After all, the result is the same 1

Also popular now: