Chapter 24. Virtual Machine Placement During Provisioning

The process of deciding where in our virtual infrastructure to position a new virtual machine—the hypervisor or cluster, and datastore—is another step that can be automated as part of the VM provisioning workflow. We might wish to locate VMs on the cluster with the lightest current load, for example, or restrict visibility of selected datastores to some of our users.

CloudForms refers to this process as placement, and there is a corresponding Placement stage in the VMProvision_VM state machine.

In this chapter we’ll look at the various options for automating placement, and how we can create customized placement algorithms to suit our own requirements.

Placement Methods

There are several alternative placement methods that we can use out-of-the-box to determine where to place our new virtual machines. For example, there are three in the ManageIQ domain (see Figure 24-1).

Figure 24-1. Placement methods in the ManageIQ domain

The default value for the Placement stage in the VMProvision_VM/template state machine is as follows:


We can see that this URI includes a message component at the end, which corresponds to the runtime value of the ${/#miq_provision.source.vendor} attribute. This is the string value for the provider type that we are provisioning ...

Get Mastering CloudForms Automation now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.