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

Unmounting all the CD-ROMs of all VMs in a cluster


This is an easy recipe to start with, but one you can really make it work for your existing infrastructure. The workflow will unmount all CD-ROMs from a running VM. A mounted CD-ROM may block a VM from being vMotioned.

Getting ready

We need a VM that can mount a CD-ROM either as an ISO from a host or from the client.

Before you start the workflow, make sure that the VM is powered on and has an ISO connected to it.

How to do it...

  1. Create a new workflow with the following variables:

    Name

    Type

    Section

    Use

    cluster

    VC:ClusterComputerResource

    IN

    Used to input the cluster

    clusterVMs

    Array of VC:VirtualMachine

    Attribute

    Use to capture all VMs in a cluster

  2. Add the getAllVMsOfCluster action to the schema and assign the cluster in-parameter and the clusterVMs attribute to it as actionResult.

  3. Now, add a Foreach element to the schema and assign the workflow Disconnect all detachable devices from a running virtual machine.

  4. Assign the Foreach element...