Book Image

VMware vRealize Orchestrator Cookbook

By : Daniel Langenhan
Book Image

VMware vRealize Orchestrator Cookbook

By: Daniel Langenhan

Overview of this book

Table of Contents (15 chapters)
VMware vRealize Orchestrator Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with the vCenter API (to change a VM's HA settings)


This recipe will showcase how to derive a function for a more complicated feature. We will be configuring the HA setting for a single VM. In this recipe, we will primarily focus on how to work with the vCenter API.

Getting ready

For this recipe, we will need a vCenter cluster that is configured for HA, as well as a VM which has a HA (VMware High Availability) restart priority that we can change.

For this recipe, you should understand the content of the Working with the API recipe in Chapter 4, Working with Plugins, as well as the introduction to JavaScript in Chapter 3, Visual Programming.

How to do it…

We will use the API and find out how to set VM's HA restart priority. This recipe requires you to take a close look at each of the objects that we will visit and read its properties and its external documentation. It is best to follow this step by step using the API browser.

  1. Create a new workflow and create the following variables:

    Name...