广告
广告
Red Hat CloudForms 3.0
Management Engine 5.2 Lifecycle and Automation Guide
Provisioning, Workload Management, Orchestration
Red Hat CloudForms Documentation Team
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and
Automation Guide
Provisioning, Workload Management, Orchestration
Red Hat Clo udFo rms Do cumentatio n Team
Legal Notice
Co pyright © 20 15 Red Hat.
This do cument is licensed by Red Hat under the
Creative Co mmo ns Attributio n-ShareAlike 3.0
Unpo rted License
. If yo u distribute this do cument, o r a mo dified versio n o f it, yo u must pro vide attributio n to Red Hat, Inc. and pro vide a link to the o riginal. If the do cument is mo dified, all Red
Hat trademarks must be remo ved.
Red Hat, as the licenso r o f this do cument, waives the right to enfo rce, and agrees no t to assert,
Sectio n 4 d o f CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shado wman lo go , JBo ss, MetaMatrix, Fedo ra, the Infinity
Lo go , and RHCE are trademarks o f Red Hat, Inc., registered in the United States and o ther co untries.
Linux ® is the registered trademark o f Linus To rvalds in the United States and o ther co untries.
Java ® is a registered trademark o f Oracle and/o r its affiliates.
XFS ® is a trademark o f Silico n Graphics Internatio nal Co rp. o r its subsidiaries in the United
States and/o r o ther co untries.
MySQL ® is a registered trademark o f MySQL AB in the United States, the Euro pean Unio n and o ther co untries.
No de.js ® is an o fficial trademark o f Jo yent. Red Hat So ftware Co llectio ns is no t fo rmally related to o r endo rsed by the o fficial Jo yent No de.js o pen so urce o r co mmercial pro ject.
The OpenStack ® Wo rd Mark and OpenStack Lo go are either registered trademarks/service marks o r trademarks/service marks o f the OpenStack Fo undatio n, in the United States and o ther co untries and are used with the OpenStack Fo undatio n's permissio n. We are no t affiliated with, endo rsed o r spo nso red by the OpenStack Fo undatio n, o r the OpenStack co mmunity.
All o ther trademarks are the pro perty o f their respective o wners.
Abstract
This guide pro vides instructio ns fo r pro visio ning, service creatio n, and auto matio n in
Clo udFo rms Management Engine. Info rmatio n and pro cedures in this bo o k are relevant to
Clo udFo rms Management Engine administrato rs.
T able of Cont ent s
1.1. Typ o g rap hic Co nventio ns
1.2. Pull-q uo te Co nventio ns
2. G etting Help and G iving Feed b ack
Table of Contents
9
10
11
14
16
16
3.1. Req uirements fo r Pro visio ning Virtual Machines and Instances
3.1.1. Req uirements fo r Pro visio ning Virtual Machines fro m VMware Pro vid ers
3.1.2. Req uirements fo r Pro visio ning Virtual Machines fro m Red Hat Enterp rise Virtualizatio n
3.1.3.2. Co nnecting to a PXE Server
3.1.3.3. Creating System Imag e Typ es fo r PXE
3.1.3.4. Setting the PXE Imag e Typ e fo r a PXE Imag e
3.1.4.2. Ad d ing an ISO Datasto re
3.1.4.3. Refreshing an ISO Datasto re
3.1.4.4. Creating System Imag e Typ es fo r ISO
3.1.4.5. Setting the Imag e Typ e fo r an ISO Imag e
3.1.5. Custo mizatio n Temp lates fo r Virtual Machine and Instance Pro visio ning
3.1.5.1. Custo mizatio n Scrip t Ad d itio ns fo r Virtual Machine and Instance Pro visio ning
3.1.5.2. Ad d ing a Custo mizatio n Temp late
3.2. Req uirements fo r Pro visio ning a Ho st
3.2.1.2. Disco vering the Manag ement Interface fo r an IPMI Ho st
3.2.1.3. Ad d ing IPMI Cred entials to a Disco vered Ho st
3.2.1.4. Ad d ing the Manag ement Interface fo r an IPMI Ho st
3.2.2. Custo mizatio n Temp lates fo r Ho st Pro visio ning
3.2.2.1. Custo mizatio n Scrip t Ad d itio ns
3.2.2.2. Ad d ing a Custo mizatio n Temp late
3.4. Pro visio ning Virtual Machines
3.4.1. Pro visio ning a Virtual Machine fro m a Temp late
3.4.2. Clo ning a Virtual Machine (VMware Virtual Machines O nly)
3.4.3. Pub lishing a Virtual Machine to a Temp late (VMware Virtual Machines O nly)
3.5. Pro visio ning Instances
3.5.1. Pro visio ning an EC2 Instance fro m an Imag e
3.6 . Custo mizing Pro visio ning Dialo g s
18
18
32
33
34
37
37
30
31
31
32
32
43
43
43
43
45
27
27
29
30
30
24
25
25
25
26
19
21
21
21
23
24
24
1
5
5
6
7
7
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
3.6 . Custo mizing Pro visio ning Dialo g s
3.6 .1. Custo mizing Pro visio ning Dialo g s
3.6 .2. Ad d ing a Pro visio n Dialo g fo r All Users
3.6 .3. Creating a Custo m Pro visio n Dialo g
3.7. Pro visio ning Pro files
3.7.1. Pro visio ning Pro files
3.7.2. Creating a Pro visio ning Pro file Instance
3.7.3. Using Tag s to set a Sco p e fo r Pro visio ning
4.1. Pro visio ning Req uest Ap p ro val Metho d s
4.2. Wo rking with Pro visio ning Req uests
4.3. Relo ad ing the Status o f Pro visio ning Req uests
4.4. Ap p ro ving a Pro visio ning Req uest
4.5. Denying a Pro visio ning Req uest
4.6 . Co p ying a Pro visio ning Req uest
4.7. Ed iting a Pro visio ning Req uest
4.8 . Deleting a Pro visio ning Req uest
4.9 . Auto matically Ap p ro ving Req uests
4.9 .1. Auto matically Ap p ro ving Req uests
4.9 .2. Enab ling G lo b al Defaults fo r Auto matic Ap p ro val
4.9 .3. Temp late Sp ecific Ap p ro val Defaults
4.9 .4. Assig ning Tag s to a Temp late fo r Auto Ap p ro val
4.10 . Setting Pro visio ning No tificatio n Email Ad d resses
5.1.2. Default Executio n Step s in States Instance
5.2.2. Ed iting the Default Q uo ta
5.2.3. Using Tag s fo r O wner and G ro up Q uo tas
5.2.4. Ap p lying a Tag to a User o r User G ro up
5.3.2. Custo mizing Pro visio ning States
5.3.3. Ed iting the Default State Instance
5.3.4. Viewing the Status o f a Pro visio ning Req uest
5.3.5. Viewing a Pro visio ned Virtual Machine o r Instance
5.3.6 . Viewing a Virtual Machine o r Instance Summary
2
6 .1. Ab o ut Catalo g s and Services
6 .3.2. Creating a Catalo g Item
6 .3.3.2. Ad d ing a Service Dialo g
6 .3.4.1. Creating a Metho d to Asso ciate with the Dialo g
6 .3.4.2. Creating a Metho d in the Facto ry/Service Class
6 .3.4.3. Creating an Instance in the Facto ry/Service Class
6 4
6 4
6 4
6 4
6 5
6 6
6 6
6 6
6 8
6 8
70
70
59
59
6 1
6 1
6 2
6 2
6 3
57
57
58
58
59
57
57
57
53
53
53
53
55
55
55
51
51
51
51
52
52
52
45
45
45
46
47
47
48
49
6 .3.4.3. Creating an Instance in the Facto ry/Service Class
6 .3.4.4. Asso ciating a Metho d with an Auto mate Instance
6 .3.4.5. Creating a Catalo g Bund le
6 .3.4.6 . Pro visio ning a Service
7.1. Retiring Virtual Machines
7.1.1. Retiring Virtual Machines and Instances
7.1.2. Using the Clo ud Fo rms Manag ement Eng ine Co nso le to Retire
7.1.3. Retiring a Virtual Machine Immed iately
7.1.4. Setting a Retirement Date fo r a Virtual Machine o r Instance
7.1.5. Remo ving a Retirement Date fo r a Virtual Machine o r Instance
7.2. Setting Retirement in a Pro visio n Req uest
7.2.1. Setting Retirement in a Pro visio n Req uest
7.2.2. Sched uling Retirement in a Pro visio n Req uest
7.3. Extend ing Retirement Dates
7.3.1. Creating a Custo m Butto n to Extend Retirement
7.3.2. Chang ing the Numb er o f Days to Extend Retirement
8 .4. Creating a Schema fo r a Class
8 .5. Ed iting a Field in a Schema
8 .6 . Ed iting Schema Seq uence
8 .7. Ad d ing an Instance to a Class
8 .8 .1. Relatio nship Syntax
8 .8 .2. Tab le: Relatio nship Examp les
8 .9 .2. Installing a Wind o ws SmartPro xy fo r Po werShell
8 .10 .2. Simulating an Auto mate Mo d el
8 .11. Imp o rting , Exp o rting , and Resetting the Datasto re
8 .11.1. Imp o rting , Exp o rting , and Resetting the Datasto re
8 .11.2. Exp o rting All Datasto re Classes
8 .11.3. Imp o rting Datasto re Classes
8 .11.4. Resetting Datasto re to Default
9 .2. Invo king Auto mate using a Custo m Butto n
9 .3. Creating a Custo m Butto n G ro up
9 .4. Creating a Custo m Butto n
9 .5. Ed iting a Custo m Butto n
9 .6 . Deleting a Custo m Butto n
9 .7. Using a Custo m Butto n
9 .8 . Initiating Auto mate fro m an Event
9 .8 .1. Initiating Auto mate fro m an Event
9 .8 .2. Creating a Po licy fo r Auto mate
9 .8 .3. Creating a Custo m Auto mate Actio n
T able of Cont ent s
70
71
71
72
73
73
73
73
73
74
74
74
74
75
75
75
8 2
8 3
8 4
8 4
8 4
8 1
8 1
8 1
8 2
8 2
8 4
8 4
79
8 0
8 0
8 0
8 0
77
77
77
78
79
8 6
8 6
8 6
8 7
8 7
8 8
8 8
8 8
8 8
8 9
9 0
3
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
9 .8 .3. Creating a Custo m Auto mate Actio n
A.1. Virtual Machine Pro p erties
A.2. Clo ud Fo rms Manag ement Eng ine Metho d s fo r use in Rub y Scrip ts
A.3. Facto ry Metho d s fo r VMs
B.2. Namesp ace: Auto matio n
B.3. Namesp ace: EVMAp p licatio ns
B.3.1. Namesp ace: O p eratio ns
B.3.1.1. Namesp ace: Pro file
B.3.2. Namesp ace: Pro visio ning
B.3.2.1. Namesp ace: Pro file
B.4.1. Namesp ace: StateMachines
B.5. Namesp ace: Integ ratio n
C.1. Phase 1: Create Pro visio n Req uest
C.2. Phase 2: Req uest Ap p ro val
C.3. Phase 3: Q uo ta Valid atio n
9 0
9 1
9 3
9 3
9 4
9 5
9 6
9 8
10 4
10 4
10 4
10 5
10 6
10 7
10 8
115
117
122
123
125
129
129
130
131
132
134
4
Preface
Preface
1. Document Convent ions
This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.
1.1. T ypographic Convent ions
Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.
Mo no -spaced Bo l d
Used to highlight system input, including shell commands, file names and paths. Also used to highlight keys and key combinations. For example:
To see the contents of the file my_next_bestsel l i ng _no vel in your current working directory, enter the cat my_next_bestsel l i ng _no vel command at the shell prompt and press Enter to execute the command.
The above includes a file name, a shell command and a key, all presented in mono-spaced bold and all distinguishable thanks to context.
Key combinations can be distinguished from an individual key by the plus sign that connects each part of a key combination. For example:
Press Enter to execute the command.
Press C trl +Al t+F2 to switch to a virtual terminal.
The first example highlights a particular key to press. The second example highlights a key combination: a set of three keys pressed simultaneously.
If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in mo no -spaced bo l d . For example:
File-related classes include fi l esystem for file systems, fi l e for files, and d i r for directories. Each class has its own associated set of permissions.
Pro p o rt io n al Bo ld
This denotes words or phrases encountered on a system, including application names; dialog-box text; labeled buttons; check-box and radio-button labels; menu titles and submenu titles. For example:
Choose Syst em → Pref eren ces → Mo u se from the main menu bar to launch
Mo u se Pref eren ces. In the Butto ns tab, select the Left-hand ed mo use check box and click C l o se to switch the primary mouse button from the left to the right
(making the mouse suitable for use in the left hand).
To insert a special character into a g ed it file, choose Ap p licat io n s →
Accesso ries → Ch aract er Map from the main menu bar. Next, choose Search →
Fin d … from the Ch aract er Map menu bar, type the name of the character in the
Search field and click Next. The character you sought will be highlighted in the
5
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
C haracter T abl e. Double-click this highlighted character to place it in the T ext
to co py field and then click the C o py button. Now switch back to your document and choose Ed it → Past e from the g ed it menu bar.
The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context.
Mono-spaced Bold Italic or Proportional Bold Italic
Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example:
To connect to a remote machine using ssh, type ssh username@ domain.name at a shell prompt. If the remote machine is exampl e. co m and your username on that machine is john, type ssh jo hn@ exampl e. co m.
The mo unt -o remo unt file-system command remounts the named file system.
For example, to remount the /ho me file system, the command is mo unt -o remo unt
/ho me.
To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release.
Note the words in bold italics above: username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system.
Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example:
Publican is a DocBook publishing system.
1.2. Pull-quot e Convent ions
Terminal output and source code listings are set off visually from the surrounding text.
Output sent to a terminal is set in mo no -spaced ro man and presented thus: books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
Source-code listings are also set in mo no -spaced ro man but add syntax highlighting as follows: static int kvm_vm_ioctl_deassign_device( struct kvm *kvm,
struct kvm_assigned_pci_dev *assigned_dev)
{
int r = 0;
struct kvm_assigned_dev_kernel *match;
mutex_lock(& kvm->lock);
match = kvm_find_assigned_dev(& kvm->arch.assigned_dev_head,
assigned_dev->assigned_dev_id);
if (!match) {
printk(KERN_INFO
"%s: device hasn't been assigned
6
Preface
before, "
"so cannot be deassigned \n " , __func__);
r = -EINVAL;
goto out;
}
kvm_deassign_device(kvm, match);
kvm_free_assigned_device(kvm, match);
out:
mutex_unlock(& kvm->lock);
return r;
}
1.3. Not es and Warnings
Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.
Note
Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.
Important
Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled “ Important” will not cause data loss but may cause irritation and frustration.
Warning
Warnings should not be ignored. Ignoring warnings will most likely cause data loss.
2. Get t ing Help and Giving Feedback
If you experience difficulty with a procedure described in this documentation, visit the Red Hat
Customer Portal at http://access.redhat.com
. Through the customer portal, you can: search or browse through a knowledgebase of technical support articles about Red Hat products submit a support case to Red Hat Global Support Services (GSS) access other product documentation
7
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/listinfo . Click on the name of any mailing list to subscribe to that list or to access the list archives.
Do cu men t at io n Feed b ack
If you find a typographical error in this manual, or if you have thought of a way to make this manual better, please submit a report to GSS through the customer portal.
When submitting a report, be sure to mention the manual's identifier: Lifecycle and Automation Guide
If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.
8
Chapt er 1 . Int roduct ion t o Red Hat CloudForms
Chapter 1. Introduction to Red Hat CloudForms
Red Hat CloudForms Management Engine delivers the insight, control, and automation enterprises need to address the challenges of managing virtual environments. This technology enables enterprises with existing virtual infrastructures to improve visibility and control, and those starting virtualization deployments to build and operate a well-managed virtual infrastructure.
Red Hat CloudForms 3.0 is comprised of a single component, the CloudForms Management Engine.
It has the following feature sets:
Insight: Discovery, Monitoring, Utilization, Performance, Reporting, Analytics, Chargeback, and
Trending.
Control: Security, Compliance, Alerting, and Policy-Based Resource, and Configuration
Enforcement.
Automate: IT Process, Task and Event, Provisioning, and Workload Management and
Orchestration.
Integrate: Systems Management, Tools and Processes, Event Consoles, Configuration
Management Database (CMDB), Role-based Administration (RBA), and Web Services.
1.1. Archit ect ure
The diagram below describes the capabilities of Red Hat CloudForms Management Engine. Its features are designed to work together to provide robust management and maintenance of your virtual infrastructure.
Fig u re 1.1. Feat u res
The architecture comprises the following components:
9
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
The CloudForms Management Engine Appliance (Appliance) which is supplied as a secure, highperformance, preconfigured virtual machine. It provides support for Secure Socket Layer (SSL) communications.
The CloudForms Management Engine Server (Server) resides on the Appliance. It is the software layer that communicates between the SmartProxy and the Virtual Management Database. It includes support for Secure Socket Layer (SSL) communications.
The Virtual Management Database (VMDB) resides either on the Appliance or another computer accessible to the Appliance. It is the definitive source of intelligence collected about your Virtual
Infrastructure. It also holds status information regarding Appliance tasks.
The CloudForms Management Engine Console (Console) is the Web interface used to view and control the Server and Appliance. It is consumed through Web 2.0 mash-ups and web services
(WS Management) interfaces.
The SmartProxy can reside on the Appliance or on an ESX Server. If not embedded in the Server, the SmartProxy can be deployed from the Appliance. Each storage location must have a
SmartProxy with visibility to it. The SmartProxy acts on behalf of the Appliance communicating with it over HTTPS (SSL) on standard port 443.
1.2. Requirement s
To use CloudForms Management Engine, the following requirements must be met:
One of the following web browsers:
Mozilla Firefox for versions supported under Mozilla's Extended Support Release (ESR)
Internet Explorer 8 or higher
Google Chrome for Business
A monitor with minimum resolution of 1280x1024.
Adobe Flash Player 9 or above. At the time of publication, you can access it at http://www.adobe.com/products/flashplayer/ .
The CloudForms Management Engine Appliance must already be installed and activated in your enterprise environment.
The SmartProxy must have visibility to the virtual machines and cloud instances that you want to control.
The resources that you want to control must have a SmartProxy associated with them.
Reg io n s an d Z o n es
Use reg i o ns for centralizing data which is collected from public and private virtualization environments. A region is ultimately represented as a single database for the VMDB. Regions are particularly useful when multiple geographical locations need to be managed as they enable all the data collection to happen at each particular location and avoids data collection traffic across slow links between networks.
When multiple regions are being used, each with their own unique ID, a master region can be created to centralize the data of all the children regions into a single master database. To do this, configure each child region to replicate its data to the master region database (Red Hat recommends use of region 99). This parent and child region is a one-to-many relationship.
10
Chapt er 1 . Int roduct ion t o Red Hat CloudForms
Regions can contain multiple zones, which in turn contain appliances. Z ones are used for further segregating network traffic along with enabling failover configurations. Each appliance has the capability to be configured for a number of specialized server roles. These roles are limited to the zone containing the appliance they run on.
Only one failover type of each server role can run in a zone. If multiple appliances have the same failover role, the extras are used as backups that activate only if the primary appliance fails. Nonfailover server roles can run on multiple appliances simultaenously in a zone, so resources can be adjusted according to the workload those roles are responsible for.
Note
Replicating a parent region to a higher-level parent is not supported.
Parent region can be configured after the child regions are online.
Important
Due to browser limitations, Red Hat supports logging in to only one tab for each multi-tabbed browser. Console settings are saved for the active tab only. For the same reason, CloudForms
Management Engine does not guarantee that the browser's Back button will produce the desired results. Red Hat recommends using the breadcrumbs provided in the Console.
1.3. T erminology
T h e f o llo win g t erms are u sed t h ro u g h o u t t h is d o cu men t . Review t h em b ef o re p ro ceed in g .
Acco u n t Ro le
A designation assigned to a user allowing or restricting a user to parts and functions of the
CloudForms Management Engine console.
Act io n
An execution that is performed after a condition is evaluated.
Alert
CloudForms Management Engine alerts notify administrators and monitoring systems of critical configuration changes and threshold limits in the virtual environment. The notification can take the form of either an email or an SNMP trap.
An alysis Pro f ile
A customized scan of hosts, virtual machines, or instances. You can collect information from categories, files, event logs, and registry entries.
Clo u d
A pool of on-demand and highly available computing resources. The usage of these resources are scaled depending on the user requirements and metered for cost.
11
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Clo u d Fo rms Man ag emen t En g in e Ap p lian ce
A virtual machine on which the virtual management database (VMDB) and CloudForms
Management Engine server reside.
Clo u d Fo rms Man ag emen t En g in e Co n so le
A web-based interface into the CloudForms Management Engine Appliance.
Clo u d Fo rms Man ag emen t En g in e Ro le
A designation assigned to a CloudForms Management Engine server that defines what a
CloudForms Management Engine server can do.
Clo u d Fo rms Man ag emen t En g in e Server
The application that runs on the CloudForms Management Engine Appliance and communicates with the SmartProxy and the VMDB.
Clu st er
Hosts that are grouped together to provide high availability and load balancing.
Co n d it io n
A test of criteria triggered by an event.
Disco very
Process run by the CloudForms Management Engine server which finds virtual machine and cloud providers.
Drif t
The comparison of a virtual machine, instance, host, cluster to itself at different points in time.
Even t
A trigger to check a condition.
Even t Mo n it o r
Software on the CloudForms Management Engine Appliance which monitors external providers for events and sends them to the CloudForms Management Engine server.
Ho st
A computer on which virtual machine monitor software is loaded.
In st an ce/Clo u d In st an ce
A on-demand virtual machine based upon a predefined image and uses a scalable set of hardware resources such as CPU, memory, networking interfaces.
Man ag ed /Reg ist ered VM
A virtual machine that is connected to a host and exists in the VMDB. Also, a template that is connected to a provider and exists in the VMDB. Note that templates cannot be connected to a host.
Man ag ed /Un reg ist ered VM
12
Chapt er 1 . Int roduct ion t o Red Hat CloudForms
A virtual machine or template that resides on a repository or is no longer connected to a provider or host and exists in the VMDB. A virtual machine that was previously considered registered may become unregistered if the virtual machine was removed from provider inventory.
Pro vid er
A computer on which software is loaded which manages multiple virtual machines that reside on multiple hosts.
Po licy
A combination of an event, a condition, and an action used to manage a virtual machine.
Po licy Pro f ile
A set of policies.
Ref resh
A process run by the CloudForms Management Engine server which checks for relationships of the provider or host to other resources, such as storage locations, repositories, virtual machines, or instances. It also checks the power states of those resources.
Reg io n s
Regions are used to create a central database for reporting and charting. Regions are used primarily to consolidate multiple VMDBs into one master VMDB for reporting.
Reso u rce
A host, provider, instance, virtual machine, repository, or datastore.
Reso u rce Po o l
A group of virtual machines across which CPU and memory resources are allocated.
Rep o sit o ry
A place on a datastore resource which contains virtual machines.
Smart Pro xy
The SmartProxy is a software agent that acts on behalf of the CloudForms Management
Engine Appliance to perform actions on hosts, providers, storage and virtual machines.
The SmartProxy can be configured to reside on the CloudForms Management Engine
Appliance or on an ESX server version. The SmartProxy can be deployed from the
CloudForms Management Engine Appliance, and provides visibility to the VMFS storage.
Each storage location must have a SmartProxy with visibility to it. The SmartProxy acts on behalf of the CloudForms Management Engine Appliance. If the SmartProxy is not embedded in the CloudForms Management Engine server, it communicates with the
CloudForms Management Engine Appliance over HTTPS (SSL) on standard port 443.
Smart St at e An alysis
Process run by the SmartProxy which collects the details of a virtual machine or instance.
Such details include accounts, drivers, network information, hardware, and security patches. This process is also run by the CloudForms Management Engine server on hosts and clusters. The data is stored in the VMDB.
13
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Smart T ag s
Descriptors that allow you to create a customized, searchable index for the resources in your clouds and infrastructure.
St o rag e Lo cat io n
A device, such as a VMware datastore, where digital information resides that is connected to a resource.
T ag s
Descriptive terms defined by a CloudForms Management Engine user or the system used to categorize a resource.
T emp lat e
A template is a copy of a preconfigured virtual machine, designed to capture installed software and software configurations, as well as the hardware configuration, of the original virtual machine.
Un man ag ed Virt u al Mach in e
Files discovered on a datastore that do not have a virtual machine associated with them in the VMDB. These files may be registered to a provider that the CloudForms Management
Engine server does not have configuration information on. Possible causes may be that the provider has not been discovered or that the provider has been discovered, but no security credentials have been provided.
Virt u al Mach in e
A software implementation of a system that functions similar to a physical machine. Virtual machines utilize the hardware infrastructure of a physical host, or a set of physical hosts, to provide a scalable and on-demand method of system provisioning.
Virt u al Man ag emen t Dat ab ase ( VMDB)
Database used by the CloudForms Management Engine Appliance to store information about your resources, users, and anything else required to manage your virtual enterprise.
Virt u al T h u mb n ail
An icon divided into smaller areas that summarize the properties of a resource.
Z o n es
CloudForms Management Engine Infrastructure can be organized into zones to configure failover and to isolate traffic. Z ones can be created based on your environment. Z ones can be based on geographic location, network location, or function. When first started, new servers are put into the default zone.
1.4 . About t his Guide
This guide includes the following sections:
Provisioning Requests describes the virtual machine provisioning request process, which is a strategy for efficiently managing space in a storage area network (SAN) by allocating physical storage when required. It discusses how to create a request and how to customize the dialogs displayed.
14
Chapt er 1 . Int roduct ion t o Red Hat CloudForms
Working with Requests describes manual, automatic, and external request approval processes.
Fulfilling Requests describes how the requests are executed after they have been approved.
Catalogs and Services describes how to create multi-tiered services using catalogs to deploy layered workloads across hybrid environments.
Retirement describes the virtual machine retirement process.
Automate Model describes the automation model for managing events and administrative and operational activities.
Invoking Automate describes the options for initiating an automate workflow.
http ://www.mo zilla.o rg /en-US/firefo x/o rg anizatio ns/faq /
15
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Chapter 2. CloudForms Management Engine Lifecycle
This guide discusses lifecycle activities such as provisioning and retirement that are part of the
CloudForms Management Engine Automate component. CloudForms Management Engine Automate enables real-time, bidirectional process integration and adaptive automation for management events and administrative or operational activities.
Operations Management with service level resource enforcement.
Resource Management including datastore cleanup, snapshot aging and enforcement, and virtual machine or instance aging and retirement.
Configuration and Change Management including enforced closed loop change management.
Lifecycle Management such as provisioning, customization, reconfiguration, approval, CMDB updates, and retirement.
Important
Provisioning requires the Auto mati o n Eng i ne server role enabled. Check your server role settings in Co n f ig u re → Co n f ig u rat io n → Server → Server Co n t ro l.
2.1. Provisioning
When a virtual machine or cloud instance is provisioned, it goes through multiple phases. First, the request must be made. The request includes ownership information, tags, virtual hardware requirements, the operating system, and any customization of the request. Second, the request must go through an approval phase, either automatic or manual. Finally, the request is executed. This part of provisioning consists of pre-processing and post-processing. Pre-processing acquires IP addresses for the user, creates CMDB instances, and creates the virtual machine or instance based on information in the request. Post-processing activates the CMDB instance and emails the user. The steps for provisioning may be modified at any time using CloudForms Management Engine.
2.2. Aut omat ion
CloudForms Management Engine Automate Model provides flexibility to not only change parts of the provisioning process, but also to allow you to automate other operational tasks. Below are some scenarios where CloudForms Management Engine can help accomplish these tasks.
Intelligent Workload Management - An enterprise had a requirement that when a virtual machine has reached a High CPU Percent Ready for a specified period of time, a vMotion should occur to a more suitable host. For this reason, VMware's Distributed Resource Scheduler (DRS) was not practical, as the CPU Ready metric could not trigger DRS. The solution was to leverage
CloudForms Management Engine Control and CloudForms Management Engine Automate to drive the management of this workflow.
16
Chapt er 2 . CloudForms Management Engine Lifecycle
Power on only during business hours - An organization which gave a group of self-service users
CloudForms Management Engine access had a requirement to only allow certain virtual machines to be powered during business hours. This was solved with CloudForms Management Engine
Automate.
Auto-Tagging virtual machines based on file contents - An IT organization needed a way to consume information from a text file on a virtual machine and dynamically populate vCenter. The data used to auto-tag virtual machines is also used to align unmanaged virtual machines to the business.
17
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Chapter 3. Provisioning Requests
This chapter will discuss using CloudForms Management Engine Console for provisioning. While making a provisioning request, the user is able to do any of the following:
Set an owner (User can do this using LDAP lookup)
Assign a purpose (tag)
Select a template or image from which to create a new virtual machine or instance respectively
Choose placement
Set hardware requirements
Specify the vLan
Customize the guest operating system
Schedule the provisioning
3.1. Requirement s for Provisioning Virt ual Machines and Inst ances
3.1.1. Requirement s for Provisioning Virt ual Machines from VMware Providers
Note
Currently, CloudForms Management Engine only supports the provisioning of VMware ESX hosts/hypervisors.
To provision a virtual machine from VMware providers, you will require the following in addition to the CloudForms Management Engine Automate requirements:
Important
If you are using a Windows template, the following steps are essential.
To customize settings that are inside the operating system, Sysprep must be copied to the appropriate directory on your vCenter computer. Usually this location is: C : \D o cuments and
Setti ng s\Al l Users\Appl i cati o n D ata\VMware\VMware Vi rtual C enter\sysprep.
Copy the Sysprep tools to the relevant operating system subdirectory. If you are running a standard Win2008 operating system, this step will be unnecessary.
18
Chapt er 3. Provisioning Request s
Note
If you are running a standard Win2008 operating system, this step is unnecessary as
Sysprep is included as standard.
The Windows template must have the latest version of VMware tools for its ESX Server. Check the
VMware Site for more information. If you will be creating a new password for the Administrator account, the Administrators password must be blank on the template. (This is a limitation of
Microsoft Sysprep.)
Refer to VMware documentation for a complete list of customization requirements.
3.1.2. Requirement s for Provisioning Virt ual Machines from Red Hat
Ent erprise Virt ualiz at ion Manager
Below are the requirements for using Red Hat En t erp rise Virt u aliz at io n Man ag er with
CloudForms Management Engine:
T ab le 3.1. Red Hat En t erp rise Virt u aliz at io n Man ag er co n f ig u rat io n req u iremen t s f o r
Clo u d Fo rms Man ag emen t En g in e
It em
Red Hat Enterprise Virtualization Manager version 3.0
Red Hat Enterprise Virtualization Manager
History Database
Req u iremen t s
Red Hat Enterprise Virtualization Manager properly installed with API in default location
(https: //server: 84 4 3/api ).
Red Hat Enterprise Virtualization Manager Data
Warehouse (DWH) properly installed with access to the PostgreSQL database on the Red
Hat Enterprise Virtualization Manager server.
Port 5432 open in iptables.
md5 authentication allowed to CloudForms
Management Engine Appliances in
pg _hba. co nf.
PostgreSQL set to listen for connections on
*: 54 32 in po stg resq l . co nf.
Credentials provided during database setup to be used in CloudForms Management Engine UI.
19
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
It em
Storage Supported for CloudForms
Management Engine Virtual Machine Analysis
Req u iremen t s
NFS - CloudForms Management Engine server must be able to mount NFS storage domain.
iSCSI / FCP - Cluster must use full Red Hat
Enterprise Linux (not Red Hat Enterprise
Virtualization Hypervisor) Hosts.
DirectLUN Hook installed on each host and registered to Red Hat Enterprise Virtualization
Managers.
Must have CloudForms Management Engine
Appliance in each Cluster with this storage type.
CloudForms Management Engine appliance virtual machine container must have DirectLUN attribute set.
Local storage - Not yet supported (Red Hat does not recommend due to single point of failure).
The following are requirements for provisioning virtual machines from Red Hat Enterprise
Virtualization Manager:
DHCP server configured with required PXE implementation
PXE implementation for Linux virtual machine provisioning
NFS and SAMBA read and write access to create and modify files on the PXE server
CloudForms Management Engine Server uses NFS mount to read and write the response files
HTTP read access to the NFS share location as virtual machines use this URL to access PXE images and Kickstart configuration files
Operating system installation media available to be streamed from PXE server
Images configured for desired operating systems
Kickstart templates to configure operating systems with desired packages
Additional Requirements for provisioning Linux virtual machines:
Linux distribution kernel and ramdisk available over HTTP
Linux sources available over HTTP
Sample PXE menu item that boots this kernel
Additional Requirements for provisioning Windows virtual machines:
WinPE ISO built with proper rhev-agent-tools and configured to mount shares for Windows source files and Sysprep files and configured to run customization script
Windows based WIM file with operating system installed and configured with Sysprep
Sample Sysprep unattend file to be used with the operating system
20
Chapt er 3. Provisioning Request s
Sample PXE menu item that downloads WinPE ISO, mount in memdisk and boot into WinPE environment
3.1.3. PXE Provisioning
3.1 .3.1 . PXE Pro visio ning
PXE is a boot method that allows you to load files from across a network link. CloudForms
Management Engine uses it for files required for provisioning virtual machines. PXE can be used for provisioning for either Red Hat Enterprise Virtualization Manager or VMware.
Connect to the P XE Server.
Create a System Imag e T ype.
Associate each P XE image with an image type.
Create a customization template.
3.1 .3.2 . Co nne ct ing t o a PXE Se rve r
The following procedure connects to a PXE server and adds its details to CloudForms Management
Engine.
Pro ced u re 3.1. T o Co n n ect t o a PXE Server
1. Navigate to In f rast ru ct u re → PXE.
2. Click (C o nfi g urati o n), then (Ad d a New P XE Server).
3. In Basi c Info rmati o n, type a Name that will be meaningful in your environment.
21
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
22
4. For D epo t T ype, select either Net wo rk File Syst em (NFS) or Samba. The fields to enter in the dialog depend on the D epo t T ype.
For NFS, type in the UR I, Access UR L, P XE D i recto ry, Wi nd o ws Imag es
D i recto ry and C usto mi zati o n D i recto ry. When you provision, CloudForms
Management Engine writes a text file to the P XE D i recto ry. The file is named after the
MAC address of the NIC that is assigned to the virtual machine. It contains where to get the kernel and initrd image. This file is removed after a successful provision. The Wi nd o ws
Imag es D i recto ry is where the files are located on your NFS for the provisioning of
Windows operating systems. The C usto mi zati o n D i recto ry is where your Kickstart and Sysprep files are located.
If using a D epo t T ype of Samb a, you will not need Access UR L, but you will need a
User ID , and P asswo rd , in addition to the items required for NFS.
5. For P XE Imag e Menus, type the fi l ename for the PXE Boot menu.
6. Click Ad d .
7. Select the new PXE server from the tree on the left, and click
(R efresh) to see your existing images.
(C o nfi g urati o n), then
Chapt er 3. Provisioning Request s
Note
Next, create PXE Image types to associate with the customization templates and to specify if the image type is for a virtual machine, a host, or both.
3.1 .3.3. Cre at ing Syst e m Im age T ype s fo r PXE
The following procedure creates a system image type for PXE servers.
Pro ced u re 3.2. T o Creat e Syst em Imag e T yp es
1. Navigate to In f rast ru ct u re → PXE.
2. Click the System Imag e T ypes accordion.
3. Click C o nfi g urati o n, then (Ad d a new System Imag e T ype).
4. In Basi c Info rmati o n, type in a Name and select a T ype.
Use Ho st if you want this image type to only apply to hosts.
Use Vm if you want this image type to only apply to virtual machines.
Use Any if this image type can be used for either hosts or virtual machines.
5. Click Ad d .
Note
After creating the System Image Types, assign the types to each image on your PXE servers.
To do this, you will select each image on the PXE server and identify its type.
23
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
3.1 .3.4 . Se t t ing t he PXE Im age T ype fo r a PXE Im age
The following procedure sets the image type for a chosen PXE image.
Pro ced u re 3.3. T o Set t h e PXE Imag e T yp e f o r a PXE Imag e
1. Navigate to In f rast ru ct u re → PXE.
2. Click the P XE Servers accordion and select the image that you want to set a type for.
3. Click (C o nfi g urati o n), then (Ed i t thi s P XE Imag e).
4. From the Basi c Info rmati o n area, select the correct type. If this PXE image will be used as the Wi nd o ws Bo o t Envi ro nment, check Wi nd o ws Bo o t Envi ro nment. At the time of this writing, only one PXE Image can be identified as the Wi nd o ws Bo o t Envi ro nment.
Therefore, checking one as the Wi nd o ws Bo o t Envi ro nment, will remove that from any other PXE image with that check.
5. Click Save.
3.1.4 . ISO Provisioning
3.1 .4 .1 . ISO Pro visio ning
CloudForms Management Engine also allows ISO provisioning from Red Hat En t erp rise
Virt u aliz at io n Man ag er datastores. To use this feature, you will need to do the following before creating a provision request.
Pro ced u re 3.4 . T o Prep are f o r an ISO Pro visio n Req u est
1. Add the ISO D atasto re. The Red Hat En t erp rise Virt u aliz at io n Man ag er system must have already been discovered or added into the VMDB. For more information, see the Insight
Guide.
2. Refresh the ISO D atasto re.
3. Create a System Imag e T ype.
4. Set the ISO Imag e T ype.
5. C reate a customization template.
24
Chapt er 3. Provisioning Request s
3.1 .4 .2 . Adding an ISO Dat ast o re
The following procedure adds an ISO Datastore from your Red Hat Enterprise Virtualization environment.
Pro ced u re 3.5. T o Ad d an ISO Dat ast o re
1. Navigate to In f rast ru ct u re → PXE.
2. Click the ISO D atasto res accordion.
3. Click (C o nfi g urati o n), (Ad d a new ISO D atasto re).
4. Select the Red Hat En t erp rise Virt u aliz at io n Man ag er Provider hosting the ISO
Datastore.
5. Click Ad d .
Resu lt :
The ISO datastore is added to CloudForms Management Engine.
3.1 .4 .3. Re fre shing an ISO Dat ast o re
The following procedure refreshes the chosen ISO datastore and updates CloudForms Management
Engine with available ISOs.
Pro ced u re 3.6 . T o Ref resh t h e ISO Dat ast o re
1. Navigate to In f rast ru ct u re → PXE.
2. Click the ISO D atasto res accordion, and select an ISO datastore.
3. Click (C o nfi g urati o n), then click (R efresh).
3.1 .4 .4 . Cre at ing Syst e m Im age T ype s fo r ISO
The following procedure creates a system image type for ISO Servers.
Pro ced u re 3.7. T o Creat e Syst em Imag e T yp es
1. Navigate to In f rast ru ct u re → PXE.
2. Click the System Imag e T ypes accordion.
3. Click ( Co n f ig u rat io n ) , then ( Ad d a n ew Syst em Imag e T yp e) .
4. In Basi c Info rmati o n, type in a Name and select a T ype.
25
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Use Ho st if you want this image type to only apply to hosts.
Use Vm if you want this image type to only apply to virtual machines.
Use Any if this image type can be used for either hosts or virtual machines.
5. Click Ad d .
Note
After creating the system image types, assign the types to each image on your ISO servers. To do this, you will select each image on the ISO server and identify its type.
3.1 .4 .5 . Se t t ing t he Im age T ype fo r an ISO Im age
The following procedure sets the image type for an ISO image.
Pro ced u re 3.8. T o Set t h e Imag e T yp e f o r an ISO Imag e
1. Navigate to In f rast ru ct u re → PXE.
2. Click the P XE Servers accordion, and select the image that you want to set a type for.
3. Click (C o nfi g urati o n), then (Ed i t thi s ISO Imag e).
4. From the Basi c Info rmati o n area, select the correct T ype.
26
Chapt er 3. Provisioning Request s
5. Click Save.
3.1.5. Cust omiz at ion T emplat es for Virt ual Machine and Inst ance Provisioning
Add a customization template to provide Ki ckstart, C l o ud i ni t, or Sysprep files for the initial loading of the operating system. For each of these types of customizations, there are certain sections to use to allow for interactions with the P ro vi si o ni ng D i al o g s provided by CloudForms
Management Engine. On the C atal o g page in the P ro vi si o ni ng D i al o g s, select P ro vi si o n
T ype of ISO or PXE as appropriate. CFME expects the installer to shut down the guest when installation is complete. If the installer can not do this, you can use the callback URL in the postinstall section to notify CFME that the installation is complete.
Note the following additional requirements if you are performing ISO provisioning:
Name the Ki ckstart file ks. cfg
Set the new virtual machine to power down after provisioning is complete
CFME must use the VM payload feature of RHEV to create a floppy disk containing the data from the selected customization template
Customize the installer to include the data written to the floppy disk payload
Examp le 3.1. Examp le: RHEL ISO wit h t h e f o llo win g mo d if icat io n s:
isolinux.cfg: modify default menu item "append" line to include "ks=cdrom" ks.cfg: which must minimally include:
### Pre Install Scripts
%pre
# Mount the floppy drive modprobe floppy mkdir /tmp/floppy mount /dev/floppy /tmp/floppy
%end
# Include ks.cfg file from the floppy (written by CFME based on selected customization template)
%include /tmp/floppy/ks.cfg
3.1 .5 .1 . Cust o m izat io n Script Addit io ns fo r Virt ual Machine and Inst ance
Pro visio ning
27
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Pro visio ning
T ab le 3.2. List o f Cu st o miz at io n Scrip t Ad d it io n s f o r Virt u al Mach in e Pro visio n in g
Cu st o m iz at io n
T yp e
Reaso n t o
In clu d e
Kickstart Takes the values from the
C usto mi ze tab in
P ro vi si o ni ng
D i al o g and substitutes them into the script.
Scrip t en t ries
#Configure Networking based on values from provisioning dialog
<% if evm[:addr_mode].first == 'static' %>
<% network_string = "network --onboot yes -device=eth0 --bootproto=static --noipv6" %>
<% ["ip", :ip_addr, "netmask", :subnet_mask,
"gateway", :gateway, "hostname", :hostname,
"nameserver", :dns_servers].each_slice(2) do
|ks_key, evm_key| %>
<% network_string << " --#{ks_key} #
{evm[evm_key]}" unless evm[evm_key].blank? %>
<% end %>
<%= network_string %>
<% else %> network --device=eth0 --bootproto=dhcp
<% end %>
Kickstart Encrypts the root password from the
C usto mi ze tab in the
P ro vi si o ni ng
D i al o g .
Kickstart Sends status of the provision back to
CloudForms
Management
Engine Server for display in the
CloudForms
Management
Engine Console.
Sysprep Encrypts the root password from the
C usto mi ze tab in the
P ro vi si o ni ng
D i al o g . The value for the
Ad mi ni strato rP a
sswo rd line must be inserted to use the password from the P ro vi si o n
D i al o g and encrypt it.
rootpw --iscrypted <%=
MiqPassword.md5crypt(evm[:root_password]) %>
# Callback to CFME during post-install wget --no-check-certificate <%= evm[:callback_url_on_post_install] %>
<UserAccounts>
<AdministratorPassword>
<Value> < %=
MiqPassword.sysprep_crypt(evm[:root_password])
%> </Value>
<PlainText> false </PlainText>
</AdministratorPassword>
</UserAccounts>
28
Chapt er 3. Provisioning Request s
3.1 .5 .2 . Adding a Cust o m izat io n T e m plat e
Pro ced u re 3.9 . T o Ad d a Cu st o miz at io n T emp lat e
1. Navigate to In f rast ru ct u re → PXE.
2. Click the C usto mi zati o n T empl ates accordion.
3. Click (C o nfi g urati o n), (Ad d a new C usto mi zati o n T empl ate).
4. In Basi c Info rmati o n, type in a Name and D escri pti o n.
5. Select the Imag e T ype. This list should include the PXE image types you created.
6. In T ype, select Kickst art or Clo u d in it for Linux based systems, and Sysp rep for Windows based system.
7. In the Scrip t area, either paste the script from another source or type the script directly into the CloudForms Management Engine interface.
8. Click Ad d .
Note
The default dialogs show all possible parameters for provisioning. To limit the options shown, see Customizing Provisioning Dialogs.
3.2. Requirement s for Provisioning a Host
CloudForms Management Engine can provision hosts using PXE and Intelligent Platform
Management Interface (IPMI) technologies. To do this, complete the following steps before you
29
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
provision your first host.
When creating a provisioning request, you can limit the hosts, datastores, and templates from which a group can choose. To do this, create a tag value with the exact name of the user group for the
P ro vi si o ni ng Sco pe C ateg o ry. For example, if you want to limit the scope for the group named EvmGroup-desktop, create a tag value of EvmGroup-desktop. Then, assign that tag to the hosts, datastores, and template to which you want to limit this group.
Important
Provisioning requires the Auto mati o n Eng i ne server role be enabled. Confirm your server role settings in Co n f ig u re → Co n f ig u rat io n → Server → Server Co n t ro l. In addition, set the P ro vi si o ni ng Sco pe tag to All, for a provider, a host, and a data store.
Pro ced u re 3.10. T o Pro visio n a Ho st
1. Make a PXE server accessible to the CloudForms Management Engine server.
2. Create a customization template for hosts. This customization template must contain hostspecific additions, documented in the Customization Templates for Host Provisioning section.
3. Create system image types for the host.
4. Associate images with the image types.
5. Enable IPMI on provisioning hosts and add them to the CloudForms Management Engine
Infrastructure.
3.2.1. IPMI Host s
3.2 .1 .1 . IPMI Ho st s
There are two ways to get the Intelligent Platform Management Interface (IPMI) Host into the VMDB.
You can either use the CloudForms Management Engine's discovery process or add the host using its IP address and credentials.
3.2 .1 .2 . Disco ve ring t he Manage m e nt Int e rface fo r an IPMI Ho st
Pro ced u re 3.11. T o Disco ver t h e Man ag emen t In t erf ace f o r an IPMI Ho st
1. Navigate to In f rast ru ct u re → Ho st s.
2. Click (C o nfi g urati o n), then
3. In D i sco ver, check IP MI.
(D i sco ver Ho sts).
4. Optionally, in IP MI C red enti al s, type in a User ID and P asswo rd .
30
Chapt er 3. Provisioning Request s
Note
You can also add IPMI credentials after the host has been discovered. See Adding IPMI
Credentials to a Discovered Host.
5. In Subnet R ang e, type in a range of IP addresses. For quickest results, use the actual IP address in both fields.
6. Click D i sco ver.
Note
After the host is discovered, you can add credentials for IPMI.
3.2 .1 .3. Adding IPMI Cre de nt ials t o a Disco ve re d Ho st
After discovering an IPMI host, add the credentials using the following procedure.
Pro ced u re 3.12. T o Ad d IPMI Cred en t ials
1. Navigate to In f rast ru ct u re → Ho st s.
2. Click on the host you want to edit.
3. Click (C o nfi g urati o n), and then (Ed i t thi s Ho st).
4. In the C red enti al s area, IP MI tab, type in the IPMI credentials a. Use User ID to specify a login ID.
b. Use P asswo rd to specify the password for the user ID.
c. Use Veri fy P asswo rd to confirm the password.
5. Click Val i d ate to test the credentials.
6. Click Save.
3.2 .1 .4 . Adding t he Manage m e nt Int e rface fo r an IPMI Ho st
Pro ced u re 3.13. T o Ad d t h e Man ag emen t In t erf ace f o r an IPMI Ho st
1. Navigate to In f rast ru ct u re → Ho st s.
2. Click (C o nfi g urati o n), then (Ad d a New Ho st).
3. In Basi c Info rmati o n, type in a Name and the IP MI IP ad d ress.
4. In the C red enti al s area, under IP MI tab, type in the IPMI credentials a. Use User ID to specify a login ID.
b. Use P asswo rd to specify the password for the User ID.
31
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
c. Use Veri fy P asswo rd to confirm the password.
5. Click Val i d ate to test the credentials.
6. Click Ad d .
Resu lt :
The IPMI host is added to the CloudForms Management Engine environment; an operating system can now be provisioned onto it.
3.2.2. Cust omiz at ion T emplat es for Host Provisioning
Add a customization template to provide Kickstart files for the initial loading of the operating system.
There are certain sections to use to allow for interactions with the provisioning dialogs provided by
CloudForms Management Engine.
3.2 .2 .1 . Cust o m izat io n Script Addit io ns
T ab le 3.3. Cu st o miz at io n Scrip t Ad d it io n s
Scrip t en t ries Cu st o miz at io n
T yp e
Kickstart
Reaso n t o
In clu d e
Takes the values from the
C usto mi ze tab in
P ro vi si o ni ng
D i al o g and substitutes them into the script.
#Configure Networking based on values from provisioning dialog
<% if evm[:addr_mode].first ==
'static' %>
<% network_string = "network -onboot yes --device=eth0 -bootproto=static --noipv6" %>
<% ["ip", :ip_addr, "netmask",
:subnet_mask, "gateway", :gateway,
"hostname", :hostname, "nameserver",
:dns_servers].each_slice(2) do
|ks_key, evm_key| %>
<% network_string << " --#{ks_key}
#{evm[evm_key]}" unless evm[evm_key].blank? %>
<% end %>
<%= network_string %>
<% else %> network --device=eth0 -bootproto=dhcp
<% end %>
Kickstart Encrypts the root password from the
C usto mi ze tab in the
P ro vi si o ni ng
D i al o g .
rootpw --iscrypted <%=
MiqPassword.md5crypt(evm[:root_passwor d]) %>
32
Cu st o miz at io n
T yp e
Kickstart
Chapt er 3. Provisioning Request s
Reaso n t o
In clu d e
Sends status of the provision back to
CloudForms
Management
Engine for display in the CloudForms
Management
Engine Console.
Scrip t en t ries
# Callback to EVM during post-install wget --no-check-certificate <%= evm[:callback_url_on_post_install] %>
3.2 .2 .2 . Adding a Cust o m izat io n T e m plat e
Pro ced u re 3.14 . T o Ad d a Cu st o miz at io n T emp lat e
1. Navigate to In f rast ru ct u re → PXE.
2. Click the C usto mi zati o n T empl ates accordion.
3. Click (C o nfi g urati o n), then (Ad d a New C usto mi zati o n T empl ate).
4. In Basi c Info rmati o n, type in a Name and D escri pti o n.
5. Select the Imag e T ype dropdown. This list should include the PXE image types you created.
6. In T ype, select Kickst art or Clo u d in it for Linux based systems, and Sysp rep for Windows based system.
7. In the Scri pt area, either paste the script from another source or type the script directly into the CloudForms Management Engine interface.
8. Click Ad d .
33
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Note
The default dialogs show all possible parameters for provisioning. To limit the options shown, see Customizing Provisioning Dialogs.
3.3. Provisioning a Host
After setting up the IPMI and PXE environments, you are ready to provision a host. Currently, you can only provision in the cluster where the template is located or you can create a template in each cluster and let a CloudForms Management Engine Automate method automatically switch the selected template in the provision object.
Important
A customization template with host-specific script additions is required. Ensure especially that the customization template contains the post-installation callback to enable discovery in
CloudForms Management Engine.
Pro ced u re 3.15. T o Pro visio n a Ho st
1. Navigate to In f rast ru ct u re → Ho st s.
2. Select a host with IPMI enabled.
3. Click (Li fecycl e), then (P ro vi si o n Ho sts).
4. In R eq uest Info rmati o n, type in at least a Fi rst Name and Last Name and an email address. This email is used to send the requester status emails during the provisioning. The other information is optional. If the CloudForms Management Engine server is configured to use LDAP, you can use the Lo o k Up button to populate the other fields based on the email address.
34
Chapt er 3. Provisioning Request s
5. On the P urpo se tab, select the desired tags for the provisioned host.
35
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
36
6. On the C atal o g tab, select the hosts to provision.
In the Ho st area, select the hosts to provision.
In the P XE area, select the PXE server and image.
7. On the C usto mi ze tab, you can select customizations for the operating system of the new host. These options vary based on the operating system to be provisioned.
Use C red enti al s to type in a root password
In the IP Ad d ress area, select either Stati c or D HC P and enter any other address information you need. If needed, type in DNS specifications.
Under C usto mi ze T empl ate, select a script.
8. On the Sched ul e tab, select when to start the provisioning process.
Chapt er 3. Provisioning Request s
In Sched ul e Info , select when to start the provisioning process. If you select
Sched ul e, enter a date and time.
Select Statel ess to retain files after the provision completes. A stateless provision does not write to the disk so it requires the PXE files on the next boot.
9. Click Submi t.
Resu lt :
The provisioning request is sent for approval. For the provisioning to begin, a user with the admin, approver, or super admin account role must approve the request. The admin and super admin roles can also edit, delete, and deny the requests. You will be able to see all provisioning requests where you are either the requester or the approver.
After submission, the appliance assigns each provision request a R eq uest ID . If an error occurs during the approval or provisioning process, use this ID to locate the request in the appliance logs.
The Request ID consists of the region associated with the request followed by the request number. As regions define a range of one trillion database IDs, this number can be several digits long.
Examp le 3.2. Req u est ID Fo rmat
Request 99 in region 123 results in Request ID 123,000,000,000,099.
3.4 . Provisioning Virt ual Machines
There are three types of provisioning requests available in CloudForms Management Engine:
1. Provision a new virtual machine from a template
2. Clone a virtual machine
3. Publish a virtual machine to a template
3.4 .1. Provisioning a Virt ual Machine from a T emplat e
You can provision virtual machines through various methods. One method is to provision a virtual machine directly from a template stored on a provider.
Pro ced u re 3.16 . T o Pro visio n a Virt u al Mach in e f ro m a T emp lat e
1. Navigate to In f rast ru ct u re → Virt u al Mach in es.
37
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
2. Click (Li fecycl e), and then
3. Select a template from the list presented.
(P ro vi si o n VMs).
4. Click C o nti nue.
5. On the R eq uest tab, enter information about this provisioning request.
38
In R eq uest Info rmati o n, type in at least a Fi rst Name and Last Name and an email address. This email is used to send the requester status emails during the provisioning process for items such as auto-approval, quota, provision complete, retirement, request pending approval, and request denied. The other information is optional. If the CloudForms
Management Engine server is configured to use LDAP, you can use the Lo o k Up button to populate the other fields based on the email address.
Note
Parameters with a * next to the label are required to submit the provisioning request.
To change the required parameters, see Customizing Provisioning Dialogs.
6. Click the P urpo se tab to select the appropriate tags for the provisioned virtual machines.
7. Click the C atal o g tab to select the template to provision from. This tab is context sensitive based on provider.
8. For templates on VMware providers:
Chapt er 3. Provisioning Request s
a. For P ro vi si o n T ype, select Net Ap p , VMware, or PXE.
i. If VMware is selected, select Li nked C l o ne to create a linked clone to the virtual machine instead of a full clone. Since a snapshot is required to create a linked clone, this box is only enabled if a snapshot is present. Select the snapshot you want to use for the linked clone.
ii. If PXE is selected, select a PXE Server and Imag e to use for provisioning b. Under C o unt, select the number of virtual machines to create in this request.
c. Use Nami ng to specify a virtual machine name and virtual machine description.
When provisioning multiple virtual machines, a number will be appended to the virtual machine name.
9. For templates on Red Hat providers: a. Select the Name of a template to use.
b. For P ro vi si o n T ype, select either ISO , PXE, or Nat ive Clo n e. You must select
Nati ve C l o ne in order to use a Cloud-Init template.
i. If Nat ive Clo n e is selected, select Li nked C l o ne to create a linked clone to the virtual machine instead of a full clone. This is equivalent to Thin Template
Provisioning in Red Hat Enterprise Virtualization. Since a snapshot is required to create a linked clone, this box is only enabled if a snapshot is present.
Select the snapshot to use for the linked clone.
ii. If ISO is selected, select an ISO Imag e to use for provisioning iii. If PXE is selected, select a PXE Server and Imag e to use for provisioning c. Under C o unt, select the number of virtual machines you want to create in this request.
d. Use Nami ng to specify a VM Name and VM D escri pti o n. When provisioning multiple virtual machines, a number will be appended to the VM Name.
10. Click the Envi ro nment tab to decide where you want the new virtual machines to reside.
39
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
a. If provisioning from a template on VMware, you can either let CloudForms
Management Engine decide for you by checking C ho o se Auto mati cal l y, or select a specific cluster, resource pool, folder, host, and datastore.
b. If provisioning from a template on Red Hat, you can either let CloudForms
Management Engine decide for you by checking C ho o se Auto mati cal l y, or select a datacenter, cluster, host and datastore.
11. Click the Hard ware tab to set hardware options.
a. In VM Hard ware, set the number of CPUs, amount of memory, and disk format: thin, pre-allocated/thick or same as the provisioning template (default).
b. For VMware provisioning, set the VM Li mi ts of CPU and memory the virtual machine can use.
c. For VMware provisioning, set the In VM R eservati o n amount of CPU and memory.
12. Click Netwo rk to set the vLan adapter. Additional networking settings that are internal to the operating system appear on the C usto mi ze tab.
4 0
a. In Netwo rk Ad apter Info rmati o n, select the vLan.
Chapt er 3. Provisioning Request s
13. Click C usto mi ze to customize the operating system of the new virtual machine. These options vary based on the operating system of the template.
14. For Windows provisioning: a. To use a customer specification from the Provider, click Speci fi cati o n. To select an appropriate template, a list will be provided in the custom specification area. The values that are honored by CloudForms Management Engine will display.
Note
Any values in the specification that do not show in the CloudForms
Management Engine console's request dialogs are not used by CloudForms
Management Engine. For example, for Windows operating systems, if you have any run once values in the specification, they are not used in creating the new virtual machines. Currently, for a Windows operating system, CloudForms
Management Engine honors the unattended GUI, identification, workgroup information, user data, windows options, and server license. If more than one network card is specified, only the first is used.
To modify the specification, select O verri d e Speci fi cati o n Val ues.
b. Select Sysprep Answer Fi l e, to upload a Sysprep file or use one that exists for a custom specification on the Provider where the template resides. To upload a file, click Bro wse to find the file, and then upload. To use an answer file in
C usto mi zati o n Speci fi cati o n, click on the item. The answer file will automatically upload for viewing. You cannot make modifications to it.
15. For Linux provisioning: a. Under C red enti al s, enter a R o o t P asswo rd for the ro o t user to access the instance.
4 1
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
b. Enter a IP Ad d ress Info rmati o n for the instance. Leave as D HC P for automatic
IP assignment from the provider.
c. Enter any D NS information for the instance if necessary.
d. Select C usto mi ze T empl ate for additional instance configuration. Select from the
Kickstart or Cloud-Init customization templates stored on your appliance.
16. Click the Sched ul e tab to select when provisioning begins.
a. In Sched ul e Info , select when to start provisioning. If you select Sched ul e, you will be prompted to enter a date and time. Select Statel ess if you do not want the files deleted after the provision completes. A stateless provision does not write to the disk so it requires the PXE files on the next boot.
b. In Li fespan, select to power on the virtual machines after they are created, and to set a retirement date. If you select a retirement period, you will be prompted for when you want a retirement warning.
17. Click Submi t.
Resu lt :
The provisioning request is sent for approval. For the provisioning to begin, a user with the administrator, approver, or super administrator account role must approve the request. The administrator and super administrator roles can also edit, delete, and deny the requests. You will be able to see all provisioning requests where you are either the requester or the approver.
After submission, the appliance assigns each provision request a R eq uest ID . If an error occurs during the approval or provisioning process, use this ID to locate the request in the appliance logs.
The Request ID consists of the region associated with the request followed by the request number. As regions define a range of one trillion database IDs, this number can be several digits long.
4 2
Examp le 3.3. Req u est ID Fo rmat
Chapt er 3. Provisioning Request s
Request 99 in region 123 results in Request ID 123,000,000,000,099.
3.4 .2. Cloning a Virt ual Machine (VMware Virt ual Machines Only)
Pro ced u re 3.17. T o Clo n e a Virt u al Mach in e
1. Navigate to In f rast ru ct u re → Virt u al Mach in es, and check the virtual machine you want to clone.
2. Click (Li fecycl e), and then (C l o ne sel ected i tem).
3. Fill in the options as shown in T o P ro vi si o n from a template using the provided dialogs.
Be sure to check the C atal o g T ab.
4. Schedule the request on the Sched ul e tab.
5. Click Submi t.
3.4 .3. Publishing a Virt ual Machine t o a T emplat e (VMware Virt ual Machines
Only)
Pro ced u re 3.18. T o Pu b lish a Virt u al Mach in e t o a T emp lat e
1. Navigate to In f rast ru ct u re → Virt u al Mach in es, and check the virtual machine you want to publish as a template.
2. Click (Li fecycl e), and then (P ubl i sh sel ected VM to a T empl ate).
3. Fill in the options as shown in T o P ro vi si o n from a template using the provided dialogs.
Be sure to check the C atal o g tab.
4. Schedule the request on the Sched ul e tab.
5. Click Submi t.
3.5. Provisioning Inst ances
Cloud instances follow the same process (Request, Approval, Deployment) as a standard virtual machine from virtualization infrastructure. First, a user makes a request for instances and specifies the image, tags, availability zone and hardware profile flavor. Second, the request goes through the approval phase. Finally, CloudForms Management Engine executes the request.
3.5.1. Provisioning an EC2 Inst ance from an Image
Pro ced u re 3.19 . T o Pro visio n an In st an ce f ro m an Imag e
1. Navigate to Clo u d s → In st an ces.
2. Click (Li fecycl e), then click
3. Select an image from the list presented.
(P ro vi si o n Instances).
4. Click C o nti nue.
4 3
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
5. On the R eq uest tab, enter information about this provisioning request. In R eq uest
Info rmati o n, type in at least a first and last name and an email address. This email is used to send the requester status emails during the provisioning process for items such as autoapproval, quota, provision complete, retirement, request pending approval, and request denied. The other information is optional. If the CloudForms Management Engine Server is configured to use LDAP, you can use the Lo o k Up button to populate the other fields based on the email address.
Note
Parameters with a * next to the label are required to submit the provisioning request.
To change the required parameters, see Customizing Provisioning Dialogs.
6. Click the P urpo se tab to select the appropriate tags for the provisioned instance.
7. Click the C atal o g tab for basic instance options.
a. To change the image to use as a basis for the instance, select it from the list of images.
b. Select the Number o f VMs to provision.
c. Type a VM Name and VM D escri pti o n.
8. Click the Envi ro nment tab to select the instance's Avai l abi l i ty Zo ne, Avai l abi l i ty
Zo ne, Vi rtual P ri vate C l o ud , C l o ud Subnet, Securi ty G ro ups, and El asti c
IP Ad d ress. If no specific availability zone is required, select the C ho o se
Auto mati cal l y checkbox.
9. Click the P ro perti es tab to set provider options such as hardware flavor and security settings.
a. Select a flavor from the Instance T ype list.
b. Select a G uest Access Key P ai r for access to the instance.
c. Select the C l o ud Watch monitoring level. Leave as Basi c for the default EC2 monitoring.
10. Click the C usto mi ze tab to set additional instance options.
a. Under C red enti al s, enter a R o o t P asswo rd for the ro o t user access to the instance.
b. Enter a IP Ad d ress Info rmati o n for the instance. Leave as D HC P for automatic
IP assignment from the provider.
c. Enter any D NS information for the instance if necessary.
d. Select a C usto mi ze T empl ate for additional instance configuration. Select from the Cloud-Init scripts stored on your appliance.
11. Click the Sched ul e tab to set the provisioning and retirement date and time.
a. In Sched ul e Info , choose whether the provisioning begins upon approval, or at a specific time. If you select Sched ul e, you will be prompted to enter a date and time.
4 4
Chapt er 3. Provisioning Request s
b. In Li fespan, select whether to power on the instances after they are created, and whether to set a retirement date. If you select a retirement period, you will be prompted for when to receive a retirement warning.
12. Click Submi t.
Resu lt :
The provisioning request is sent for approval. For the provisioning to begin, a user with the admin, approver, or super admin account role must approve the request. The admin and super admin roles can also edit, delete, and deny the requests. You will be able to see all provisioning requests where you are either the requester or the approver.
After submission, the appliance assigns each provision request a R eq uest ID . If an error occurs during the approval or provisioning process, use this ID to locate the request in the appliance logs.
The Request ID consists of the region associated with the request followed by the request number. As regions define a range of one trillion database IDs, this number can be several digits long.
Examp le 3.4 . Req u est ID Fo rmat
Request 99 in region 123 results in Request ID 123,000,000,000,099.
3.6. Cust omizing Provisioning Dialogs
3.6.1. Cust omiz ing Provisioning Dialogs
The default set of provisioning dialogs shows all possible options. However, CloudForms
Management Engine also provides the ability to customize which tabs and fields are shown. You can decide what fields are required to submit the provisioning request or set default values.
For each type of provisioning, there is a dialog that can be created to adjust what options are presented. While samples are provided containing all possible fields for provisioning, you can remove what fields are shown. However, you cannot add fields or tabs.
Edit the dialogs to:
1. Hide or show provisioning tabs.
2. Hide or show fields. If you hide an attribute, the default will be used, unless you specify otherwise.
3. Set default values for a field.
4. Specify if a field is required to submit the request.
5. Create custom dialogs for specific users.
3.6.2. Adding a Provision Dialog for All Users
Pro ced u re 3.20. T o Ad d a Pro visio n Dialo g f o r All Users
1. Navigate to Au t o mat e → Cu st o miz at io n .
2. Click the P ro vi si o ni ng D i al o g s accordion.
4 5
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
3. Click the type of dialog you want to create: Ho st P ro vi si o n, VM P ro vi si o n or VM
Mi g rate.
4. Select one of the default dialogs.
5. Click (C o nfi g urati o n), and then (C o py thi s D i al o g ).
6. Type a new Name and D escri pti o n for the dialog.
7. In the C o ntent field,
To remove a tab from display, change its display value to ignore. By choosing ignore, you not only hide the tab, but also skip any fields on that tab that were required. To show the tab, change the display value to show.
To hide a field, change its display value from edit to hide. To display fields of most data types, use edit. To display a button, use show. To set a default value for a field, use
:default => defaultvalue to the list of parameters for the field. Set the required parameter to either true or false based on your needs. Note that if you set required parameter to true, the field must have a value for the provision request to be submitted.
8. Click Ad d .
Resu lt :
If you are using P ro vi si o ni ng P ro fi l es, you can specify a specific file that holds the customizations. To do this, you must create an instance mapping to this file in the CloudForms
Management Engine Applications/provisioning/profile/VM provisioning by group class. By default, if you are using provisioning profiles and the group does not have a defined instance, the appropriate default dialog file will be used based on the type of provisioning selected.
3.6.3. Creat ing a Cust om Provision Dialog
Pro ced u re 3.21. T o Creat e a Cu st o m Pro visio n Dialo g
1. Navigate to Au t o mat e → Cu st o miz at io n .
2. Click on the P ro vi si o ni ng D i al o g s accordion.
3. Click on the type of dialog you want to create, Ho st P ro vi si o n, VM P ro vi si o n or VM
Mi g rate.
4. Select one of the default dialogs.
5. Click (C o nfi g urati o n), and then (C o py thi s D i al o g ).
6. Rename the dialog as shown in the examples below.
T yp e o f p ro visio n
Provision Virtual Machine from a template
Dialo g n ame
miq_provision_dialogs_groupname_template
Example: miq_provision_dialogs_
EvmGroup-user_self_service _template
4 6
T yp e o f p ro visio n
Clone a Virtual Machine
Publish a Virtual Machine to a template
Chapt er 3. Provisioning Request s
Dialo g n ame
miq_provision_dialogs_groupname_clone_to
_vm
Example: miq_provision_dialogs_
EvmGroup-user_self_service _clone_to_vm miq_provision_dialogs_groupname_clone_to
_template
Example: miq_provision_dialogs_
EvmGroup-user_self_service
_clone_to_template
7. Make any changes you need.
8. In the C o ntent field,
To remove a tab from display, change its display value to ignore. By choosing ignore, you not only hide the tab, but also skip any fields on that tab that were required. To show the tab, change the display value to show.
To hide a field, change its display value from ed i t to hi d e. To ensure the field does not get turned back on by a workflow model, use : d i spl ay_o verri d e = > : hi d e. To display fields of most data types, use ed i t. To display a button, use sho w. To set a default value for a field, use : d efaul t = > d efaul tval ue to the list of parameters for the field. Set the required parameter to either true or fal se based on your needs. Note that if you set required to true, the field must have a value for the provision request to be submitted.
9. Click Ad d .
Resu lt :
Enter the name of the new dialog into the dialog name field in the appropriate CloudForms
Management Engine Applications/provisioning/profile instance. This dialog can now be referred to in an instance in the Provisioning Profiles class so that it can be used for groups of users.
3.7. Provisioning Profiles
3.7.1. Provisioning Profiles
Provisioning profiles can be used to customize the dialogs and the state machine (steps used to provision the machine). Profiles can be created for LDAP or CloudForms Management Engine groups. To use provisioning profiles, you will need to:
Create a P ro vi si o ni ng P ro fi l e instance for the LDAP or CloudForms Management Engine group. If no instance exists, then default settings will be used.
If customizing dialogs, create a custom dialog file, and specify the name of that file in the provisioning profile instance. If customizing the states for provisioning, create a state instance and set the name of the state instance in the provisioning profile instance.
The diagram below shows where provisioning profiles are called during the entire provisioning process.
4 7
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
3.7.2. Creat ing a Provisioning Profile Inst ance
Pro ced u re 3.22. T o Creat e a Pro visio n in g Pro f ile In st an ce
1. Navigate to Au t o mat e → Exp lo rer.
2. Using the tree located in the accordion, select EVMAp p licat io n s → Pro visio n in g →
Pro f ile → VM p ro visio n in g G ro u p ( VM) .
3. Click (C o nfi g urati o n), (Ad d a New Instance).
4. Make the name of the tag identical to the name of the LDAP or CloudForms Management
Engine group you are creating the instance for, replacing spaces in the group name with underscores. For example, change C l o ud Fo rms-test g ro up to C l o ud Fo rms-
test_g ro up. This is how CloudForms Management Engine knows which instance to use.
4 8
Chapt er 3. Provisioning Request s
5. In the dialog name field, type in the name of the customized dialog file. This file must reside on the CloudForms Management Engine Appliance in the
/var/www/mi q /vmd b/d b/fi xtures directory. As a best practice, you should name the file in the format mi q _pro vi si o n_d i al o g s-g ro upname. rb. Red Hat recommends putting this file on all CloudForms Management Engine Appliances. For instructions on how to create a custom dialog file, see C usto mi zi ng P ro vi si o ni ng D i al o g s.
Note
Be sure that the custom dialog file exists. If it does not, an error will appear when the user clicks on the P ro vi si o ni ng button in the CloudForms Management Engine console.
6. After making all required changes, click Ad d .
3.7.3. Using T ags t o set a Scope for Provisioning
When creating a provisioning request, you may want to limit which hosts, datastores, and templates,
4 9
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
a group can choose from. To do this, create a tag value with the exact name of the user group for the
P ro vi si o ni ng Sco pe C ateg o ry. For example, if you want to limit the scope for the group named EvmGroup-desktop, create a tag value of EvmGroup-desktop. Then, assign that tag to the hosts, datastores, and template to which you want to limit this group.
50
Chapt er 4 . Working wit h Request s
Chapter 4. Working with Requests
4 .1. Provisioning Request Approval Met hods
In this chapter, you will learn about the different approval methods. The request can be approved manually in the CloudForms Management Engine console, set for automatic approval by setting options in the Auto mate Expl o rer, or by using an external method.
When using an external method, the approval actually takes place on the external system and is sent directly for execution. This chapter discusses how to view and edit requests in the CloudForms
Management Engine Console, how to approve a request, and how to set automatic approval parameters.
4 .2. Working wit h Provisioning Request s
After a provisioning request is sent, if you have proper authority, you can copy, edit, delete, approve, or deny a request.
After submission, the appliance assigns each provision request a R eq uest ID . If an error occurs during the approval or provisioning process, use this ID to locate the request in the appliance logs.
The Request ID consists of the region associated with the request followed by the request number. As regions define a range of one trillion database IDs, this number can be several digits long.
Examp le 4 .1. Req u est ID Fo rmat
Request 99 in region 123 results in Request ID 123,000,000,000,099.
4 .3. Reloading t he St at us of Provisioning Request s
Pro ced u re 4 .1. T o Relo ad t h e St at u s o f a Pro visio n in g Req u est
1. Navigate to Services → Req u est s.
2. Click (R el o ad the current d i spl ay).
4 .4 . Approving a Provisioning Request
After a user creates provisioning request, administrators have the ability to approve the request and allow CloudForms Management Engine to complete virtual machine or instance creation.
Pro ced u re 4 .2. T o Ap p ro ve a Pro visio n in g Req u est
1. Navigate to Services → Req u est s.
51
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
2. Click on the request you want to approve.
3. Type in a R easo n for the approval.
4. Click (Appro ve thi s req uest).
4 .5. Denying a Provisioning Request
Pro ced u re 4 .3. T o Den y a Pro visio n in g Req u est
1. Navigate to Services → Req u est s.
2. Click on the request you want to deny.
3. Type in a R easo n for the denial.
4. Click (D eny thi s req uest).
4 .6. Copying a Provisioning Request
Pro ced u re 4 .4 . T o Co p y a Pro visio n in g Req u est
1. Navigate to Services → Req u est s.
2. Click on the request you want to copy.
3. Click (C o py o ri g i nal pro vi si o n req uest).
4. Make changes to the request.
5. Click Submi t.
Note
If the logged in user is not same as the requester or the request has been already approved or denied, you cannot edit or delete the request.
4 .7. Edit ing a Provisioning Request
Pro ced u re 4 .5. T o Ed it a Pro visio n in g Req u est
1. Navigate to Services → Req u est s.
2. Click on the request you want to edit.
3. Click (Ed i t the o ri g i nal pro vi si o n req uest).
4. Make changes to the request.
5. Click Submi t.
52
Chapt er 4 . Working wit h Request s
4 .8. Delet ing a Provisioning Request
Pro ced u re 4 .6 . T o Delet e a Pro visio n in g Req u est
1. Navigate to Services → Req u est s.
2. Click on the request you want to delete.
3. Click (D el ete thi s req uest).
4. Click O K to confirm.
4 .9. Aut omat ically Approving Request s
4 .9.1. Aut omat ically Approving Request s
You can set thresholds for automatic approval of provisioning requests and, therefore, remove the requirement to manually approve the request. You can do this either as a global default or on a per template basis.
4 .9.2. Enabling Global Default s for Aut omat ic Approval
To enable a global set of default approval values, edit the defaults instance by navigating to
Au t o mat e → Exp lo rer, then Dat ast o re → Fact o ry → St at eMach in es → VM Pro visio n
Ap p ro val St at e Mach in e ( Pro visio n Req u est Ap p ro val) in the accordion menu. The parameters in this instance are used by the methods in that same class. By default, the maximum number of virtual machines or instances that can be automatically approved for provisioning is 1. To skip the check for the maximum number of virtual machines, set this field to 0. Set this field to -1 to force manual approval. At a minimum, you must change this parameter for all others to be validated.
Pro ced u re 4 .7. T o En ab le G lo b al Def au lt s f o r Au t o mat ic Ap p ro val
1. Navigate to Au t o mat e → Exp lo rer.
2. From the tree in the accordion menu, select Dat ast o re → Fact o ry → St at eMach in es → VM
Pro visio n Ap p ro val St at e Mach in e ( Pro visio n Req u est Ap p ro val) → Def au lt .
3. Click (C o nfi g urati o n), then (Ed i t thi s i nstance).
53
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Note
Do not change any values other than those listed below. Doing so may prevent the automatic approval process from running.
Use max_cpus to set the number of CPUs allowed to approve automatically the provisioning request.
Use max_vms to set the maximum number of virtual machines or instances that are allowed to be provisioned automatically approve the request. If this is set to blank, no requests will be automatically approved.
Use max_memo ry to set the maximum memory allowed to approve automatically the provisioning request.
Use max_reti rement_d ays to set the maximum number of days until the virtual machine or instance is retired to automatically approve this request.
If a value is blank or 0, the parameter is ignored.
4. Click Save.
Resu lt :
The thresholds for automatic approval are set. The next time a provision request is created these thresholds will be checked. If the requirements are met, the provisioning request will be approved with
54
Chapt er 4 . Working wit h Request s
no user intervention.
4 .9.3. T emplat e Specific Approval Default s
CloudForms Management Engine provides tags that can be used to set default automatic approval values on a per template or image basis. These values supersede those in the Auto mate model. Use these tags to eliminate the need for manual approval for all provisioning requests. To enable automatic approval, assign the tags directly to templates or images.
Cat eg o ry Disp lay Name
( Name)
Auto Approve Max CPU
(prov_max_cpus)
Auto Approve Max Memory
(prov_max_memory)
Auto Approve Max Retirement Days
(prov_max_retirement_days)
Auto Approve Max VM
(prov_max_vms)
Use
Samp le Valu es
Sets the maximum number of CPUs that can be automatically approved in a single provisioning request.
Sample Values: 1, 2, 3, 4, 5
Sets the maximum number of memory that can be automatically approved in a single provisioning request.
Sample Values: 1, 2, 4, 8 (in GB)
Sets the maximum number of days until retirement that can be automatically approved in a single provisioning request.
Sample Values: 30, 60, 90, 180 (in days)
Sets the maximum number of virtual machines or instances that can be automatically approved in a single provisioning request.
Sample Values: 1, 2, 3, 4, 5
4 .9.4 . Assigning T ags t o a T emplat e for Aut o Approval
Pro ced u re 4 .8. T o Assig n T ag s t o a T emp lat e f o r Au t o Ap p ro val
1. Navigate to In f rast ru ct u re → Virt u al Mach in es.
2. Click the T empl ates accordion, and select the templates that you want to tag.
3. Click (P o l i cy), and then (Ed i t T ag s).
4. Select a customer tag from the first dropdown, and then a value for the tag.
Resu lt :
The thresholds for automatic approval for a specific template are set. The next time a provision request is created for this template these thresholds will be checked. If the requirements are met, the provisioning request will be approved with no user intervention.
55
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
4 .10. Set t ing Provisioning Not ificat ion Email Addresses
CloudForms Management Engine contains a set of Automate instances for provisioning. These
Automate instances also include email fields to set the sender and recipient of provisioning notifications, such as requests. These fields are set to evmad mi n@ co mpany. co m as a default.
Pro ced u re 4 .9 . T o Ch an g e t h e Email Ad d ress f o r Pro visio n in g No t if icat io n s
1. Navigate to Au t o mat e → Exp lo rer.
2. Choose the following Namespace: Dat ast o re → Alert .
3. Select the Emai l No ti fi cati o ns (Emai l No ti fi cati o ns) class.
4. Select an instance within the chosen class.
5. Navigate to Co n f ig u rat io n → Ed it Select ed In st an ce.
6. Type the desired email addresses in the to _emai l _ad d ress and fro m_emai l _ad d ress fields.
7. Click Save.
56
Chapt er 5. Fulfilling Request s
Chapter 5. Fulfilling Requests
5.1. Fulfilling a Request
5.1.1. Fulfilling a Request
After a request has been approved, CloudForms Management Engine then goes through the steps required to complete the request. The steps followed for a regular provision from a virtual machine to a virtual machine (not to a template) are found by navigating to Au t o mat e → Exp lo rer, then listed under Fact o ry → St at eMach in es → VMPro visio n St at e Mach in e ( VMPro visio n _VM) →
Pro visio n VM f ro m T emp lat e ( t emp lat e) in st an ce. The value for each state shows where the instance resides in the Dat ast o re accordion. The default set of execution steps is shown below. For more information on state machines, see State Machines.
5.1.2. Default Execut ion St eps in St at es Inst ance
T ab le 5.1. Def au lt Execu t io n St ep s in St at es In st an ce
St ep
Customize Request
Acquire IP Address
Acquire MAC Address
Register DNS
Register CMDB
Register AD
PreProvision
Provision
CheckProvisioned
PostProvision
Register DHCP
Activate CMDB
Email owner
Descrip t io n
Apply customizations.
Integrates with IPAM (IP Address Management) to get an IP Address.
Integrates with IPAM to get a MAC Address.
Integrates with IPAM to register with DNS.
Integrates with CMDB (Configuration
Management Database) to register with the
CMDB.
Integrates with IPAM to register with active directory.
Pre-provisioning steps.
Create the virtual machine or instance.
Check that the new virtual machine or instance is in the VMDB.
Post-provisioning steps.
Integrate with IPAM to register the IP address with DHCP Server.
Integrate with IPAM to active the virtual machine or instance in the CMDB.
Send email to owner that the virtual machine or instance has been provisioned.
5.2. Quot as
5.2.1. Quot as
Quotas allow you to establish maximum usage thresholds for an owner or group for provisioned virtual machines or instances and are integrated into provisioning profiles. These maximums are checked after the approval but before the actual provision request is started. The quota is set for the group as a whole.
57
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
5.2.2. Edit ing t he Default Quot a
Pro ced u re 5.1. T o Ed it t h e Def au lt Q u o t a
1. Log in as a user with administrator or super administrator rights to the CloudForms
Management Engine console.
2. Navigate to Au t o mat e → Exp lo rer.
3. From the accordion menu, click Dat ast o re → Fact o ry → St at eMach in es → VM
Pro visio n Q u o t a Verif icat io n St at e Mach in e → Def au lt .
4. Click (C o nfi g urati o n), (Ed i t thi s i nstance).
Set the values for O wner Max C P Us Al l o wed , O wner -- Max Memo ry Al l o wed , or
O wner -- Max Sto rag e Al l o wed to be the maximums for a specific owner.
Set the values for G ro up Max C P Us Al l o wed , G ro up -- Max Memo ry Al l o wed , or
G ro up -- Max Sto rag e Al l o wed to be the maximums for a specific user group.
5. Click Save.
5.2.3. Using T ags for Owner and Group Quot as
CloudForms Management Engine provides tags for enforcing quotas for the owners of virtual machines or instances. Ownership of a virtual machine or instance can be set either during the provisioning process or by using the C o nfi g urati o n Set O wnershi p button. If a virtual machine or instance has an owner, the value is displayed in the Li fecycl e section of the virtual machine or instance summary page.
Quota tags can be assigned directly to either a group or owner not to a configuration item. The table below shows the tags for use in quotas.
58
Cat eg o ry Disp lay Name
( Name)
Quota Max CPU
(quota_max_cpu)
Chapt er 5. Fulfilling Request s
Use
Sets the maximum number of CPUs summed over all virtual machines and instances owned by the group or user.
Sample Values: 1, 2, 3, 4, 5, 10, 20, 30, 40, 50
Quota Max Memory
(quota_max_memory)
Quota Max Storage
(quota_max_storage)
Sets the maximum memory summed over all virtual machines and instances owned by the group or user.
Sample Values: 1024, 2048, 4096, 8192, 10240,
20480, 40960, 81920 (in MB)
Sets the maximum storage summed over virtual machines and instances owned by the group or user.
Sample Values: 10, 100, 1000, 20, 200, 40, 400
(in GB)
5.2.4 . Applying a T ag t o a User or User Group
Pro ced u re 5.2. T o Ap p ly a T ag t o a User o r User G ro u p
1. Click Co n f ig u re → Co n f ig u rat io n .
2. Click the Access C o ntro l accordion, and select the user or group that you want to tag.
3. Click (P o l i cy), then click (Ed i t T ag s).
4. Select the appropriate customer tag to assign, then the value.
5. Click Save.
5.3. St at e Machines
5.3.1. St at e Machines
A State Machi ne stores the status of something at a given time, and can operate on input to change the status. It can also cause an action or output to take place for any given change. State machines are also designed so that State-B cannot begin until State-A completes successfully.
The following components make up a CloudForms Management Engine automate state machine:
T ab le 5.2. St at e Mach in e Co mp o n en t s
59
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Co mp o n en t
On_Entry
On_Exit
On_Error
Default Value
Max Retries
Max Time
Descrip t io n
Method to run when entering the state. It enables you to execute an automate method to do some pre-processing before the state of the state machine is processed.
Method to run when exiting the state.
Method to run if an error is encountered when running the state. It enables you to execute an automate method to do some final processing before the state machine finally exits
(MIQ_ABORT) due to the error.
Runs after the On_Entry method completes (The actual state being processed).
Maximum number of times to retry the state before exiting.
Maximum time in seconds to retry the state before exiting.
In the diagram below, you can see how these components combine to create a state machine workflow.
Note that the retry logic, On_Entry and On_Error are distinct cases in the program flow.
60
Examp le 5.1. Co d e sn ip p et d emo n st rat in g t h e st at e mach in e ret ry lo g ic:
# Get current provisioning status task = $evm.root['service_template_provision_task'] task_status = task['status'] result = task.status
Then check the result to see how it should proceed: case result
Chapt er 5. Fulfilling Request s
when 'error'
$evm.root['ae_result'] = 'error'
.....
when 'retry'
$evm.root['ae_result'] = 'retry'
$evm.root['ae_retry_interval'] = '1.minute' when 'ok'
$evm.root['ae_result'] = 'ok' end
When the result is "retry", it sets:
$evm.root['ae_result'] = 'retry'
$evm.root['ae_retry_interval'] = '1.minute'
The following image shows a simple state machine pertaining to approving a provision request. This instance can be found in Dat ast o re → Fact o ry → St at eMach in es → VM Pro visio n Ap p ro val
St at e Mach in e ( Pro visio n Req u est Ap p ro val) → Def au lt .
1. The attribute max_vms has a value of 1. State machine processing can use the attributes of the state machine instance to make logic decisions. In this case, the val i d ate_req uest method, which is processed during the O n_Entry portion of the Val i d ateR eq uest state, evaluates the max_vms attribute. If the number of virtual machines requested is less than the
max_vms value, the request can be auto-approved. See the val i d ate_req uest method for more details.
2. ValidateRequest is the first state to be executed.
3. ApproveRequest is the next state to be executed.
Note
Grayed out items reflect values that are set in the class schema. These values can be overwritten on a per instance basis.
5.3.2. Cust omiz ing Provisioning St at es
The steps followed when provisioning a virtual machine or cloud instance are completed based on instances from the Dat ast o re → Fact o ry → St at eMach in es → VMPro visio n class. Depending on your environment you can remove, change, or add steps to the provisioning process. For example, if you are not integrating with IPAM or a CMDB, then you can remove those execution steps.
5.3.3. Edit ing t he Default St at e Inst ance
Pro ced u re 5.3. T o Ed it t h e Def au lt St at e In st an ce
1. Navigate to Au t o mat e → Exp lo rer.
61
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
2. From the accordion menu, click Dat ast o re → Fact o ry → St at eMach in es → VMPro visio n
St at e Mach in e ( VMPro visio n _VM) → Pro visio n VM f ro m T emp lat e ( t emp lat e) .
3. Click (C o nfi g urati o n), then (Ed i t thi s i nstance).
4. For each step that you want to remove, clear the entries in the Val ue, O n Entry, O n Exi t, and O n Erro r columns.
5. Click Save.
5.3.4 . Viewing t he St at us of a Provisioning Request
After a request has been approved, the various stages of fulfillment are executed. You can see the progress of the provisioning process by viewing its status.
Pro ced u re 5.4 . T o View t h e St at u s o f a Pro visio n in g Req u est
1. Navigate to Services → Req u est s. The list of requests is shown.
2. Click on a specific request for more information. Once the provisioning begins, if the request was supposed to create more than one virtual machine or instance, a field will appear called
P ro vi si o ned VMs. Click on the number that appears next to it for information on each of the individual provisions.
5.3.5. Viewing a Provisioned Virt ual Machine or Inst ance
When a virtual machine or instance is created as a result of a provisioning request, its summary screen will show when it was provisioned in the Li fecycl e area of the respective summary.
Pro ced u re 5.5. T o View a Virt u al Mach in e o r In st an ce Su mmary
From Services → Wo rklo ad s, click the virtual machine or instance that you want to view.
62
Chapt er 5. Fulfilling Request s
5.3.6. Viewing a Virt ual Machine or Inst ance Summary
From Services → Wo rklo ad s, click the virtual machine or instance that you want to view.
63
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Chapter 6. Catalogs and Services
6.1. About Cat alogs and Services
Through the use of catalogs, CloudForms Management Engine provides support for multi-tier service provisioning to deploy layered workloads across hybrid environments. You can create customized dialogs that will give consumers of the services the ability to input just a few parameters and provision the entire service.
6.2. T erminology
T ermin o lo g y
Cat alo g Bu n d le
A grouping of Templates.
Cat alo g It em
A single Template or a group of Templates (catalog bundle).
Dialo g T ab s
Part of a Service Dialog.
Elemen t
An item on a tab in a Dialog. It can be a Button, Check Box, Drop Down List, Radio Button,
Tag Control, Text Area Box, or a Text Box.
Pro visio n in g Dialo g s
Dialogs created for Host Provisioning, VM Migration, or VM Provisioning. The dialog name must be added to the appropriate provision instance to be processed.
Service Cat alo g
A catalog item or Catalog bundle that is available for provisioning.
Service Dialo g s
Made up of fully customizable tabs, items, and values for use with Service provisioning.
T emp lat e
A template is a copy of a preconfigured virtual machine, designed to capture installed software and software configurations, as well as the hardware configuration, of the original virtual machine.
6.3. Cat alogs
6.3.1. Cat alogs
Catalogs are used to create groups of virtual machines or instances for provisioning. For example, a complete package of a database server, desktop with specialized software already on it, and a firewall. You will need to complete the following steps to create and provision a service catalog.
64
Chapt er 6 . Cat alogs and Services
1. Create C atal o g Items for each virtual machine or instance that will be part of the service.
2. Create a Servi ce dialog. For example, create a dropdown with three options small, medium, and large.
3. Create a method for the Servi ce D i al o g in the Factory/Service class. This method defines what each of the options means to each of the individual virtual machines or cloud instances for the service. This method is called from a service provisioning instance in the Auto mate model.
4. Create an instance in the Factory/StateMachines/ServiceProvision class that calls the method.
5. Associate method with Automate instance.
6. Create a C atal o g Bund l e, adding each of the catalog items to it. Select the Servi ce
D i al o g you created. Use the instance created in the
Factory/StateMachines/ServiceProvision class as the Entry P o i nt. Check D i spl ay i n
C atal o g box.
7. Provision a service.
6.3.2. Creat ing a Cat alog It em
Create a catalog item for each virtual machine or cloud instance that will be part of the service.
Pro ced u re 6 .1. T o Creat e a Cat alo g It em
1. Navigate to Services → Cat alo g s.
2. Click the C atal o g Items accordion.
3. Click (C o nfi g urati o n), and then (Ad d a New C atal o g Item).
4. Select the C atal o g Item T ype you are adding. The dialogs that appear will be filtered based on the selected type of provider. For example, you will only see templates residing on
Red Hat Providers, if the C atal o g Item T ype is Red h at .
5. In the Basi c Info subtab: a. Type a Name/D escri pti o n.
b. Check D i spl ay i n C atal o g to edit C atal o g , D i al o g , and Entry
P o i nt(NS/C l s/Inst) options.
i. P ro vi si o ni ng Entry P o i nt (NS/C l s/Inst) requires you to select an
Automate instance to run upon provisioning.
ii. R eti rement Entry P o i nt (NS/C l s/Inst) requires you to select an
Automate instance to run upon retirement.
65
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Note
You can only choose from the catalogs and dialogs you have already created.
If you haven't done so, leave the values blank and edit later.
6. In the D etai l s subtab, write a Lo ng D escri pti o n for the catalog item.
7. In the R eq uest Info subtab, select provisioning options that apply to the provider chosen.
For more information, refer to the sections on Provisioning Virtual Machines and Provisioning
Instances.
8. Click Ad d .
6.3.3. Service Dialogs
6 .3.3.1 . Se rvice Dialo gs
When provisioning a service, input will be needed from the requester. Servi ce D i al o g s are used to take input from the user. This input is connected to a method in the Auto mate model that defines how the users input is translated into the provision request. Before creating a Servi ce D i al o g , be sure to plan what items you need the user to input.
6 .3.3.2 . Adding a Se rvice Dialo g
Pro ced u re 6 .2. T o Ad d a Service Dialo g
1. Navigate to Au t o mat e → Cu st o miz at io n .
2. Click the Servi ce D i al o g s accordion.
3. Click (C o nfi g urati o n), and then (Ad d a new D i al o g ).
4. In D i al o g Info rmati o n, type in a Label and D escri pti o n. Check the boxes for the buttons you want available at the bottom of the dialog form. The description will appear as hover text.
5. Click Ad d .
6. Select the dialog you just created.
7. Click (C o nfi g urati o n), and then
8. Add a tab to the dialog.
(Ed i t thi s D i al o g ).
a. Click (Ad d ), then (Ad d a New T ab to thi s D i al o g ).
b. Type in a Label and D escri pti o n for this tab.
9. Add a box to this tab.
a. Click (Ad d ), then (Ad d a New Bo x to thi s T ab).
b. Type in a Label and D escri pti o n for this box.
66
Chapt er 6 . Cat alogs and Services
10. Add an element to this box. Elements are controls that accept input.
a. Click (Ad d ), then (Ad d a New El ement to thi s Bo x).
b. Type in a Label , Name, and D escri pti o n for this element.
Important
Name must use only alphanumeric characters and underscores without spaces. It is also used to retrieve the value of this element in the method used with the dialog and must start with d i al o g _servi ce_type c. Select a T ype for an element type. All T ype options have a R eq ui red and D efaul t
Val ue field. Check R eq ui red or set R eq ui red to t ru e if the element is required to proceed. You can also specify a default value. The rest of the options presented are based on which type of element you select.
T ab le 6 .1. Elemen t T yp es
Elemen t T yp es
Check Box
Date Control
Date/Time Control
Drop Down Dynamic List
Drop Down List
Radio Button
Tag Control
Ad d it io n al In f o
Check D efaul t Val ue if you want this check box checked by default.
Use Dat e Co n t ro l to create a field where users can select a date. If you want users to be able to select a date and time, use the Dat e/T ime Co n t ro l option.
Use Dat e/T ime Co n t ro l to create a field where users can select a date and time. Only one Dat e Co n t ro l or
Dat e/T ime Co n t ro l element can be present in a dialog.
Use Dro p Do wn Dyn amic List if you want the list options to be created using automate methods. Use Entry P o i nt
(NS/C l s/Inst) to select an automate instance. Check Sho w R efresh
Butto n to allow users to refresh the list options manually.
Use Dro p Do wn List to create a list of options for the user to choose from.
This element type serves the same purpose as Dro p Do wn List but displays options using radio buttons.
Select a C ateg o ry of tags you want assigned to the virtual machines associated with this service dialog.
Check Si ng l e Sel ect if only one tag can be selected.
67
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Elemen t T yp es
Text Area Box
Text Box
Ad d it io n al In f o
Provides text area for users to type in some text. You can also leave a message to users by typing in the
D efaul t Val ue field or leave it as blank.
This element type serves the same purpose as T ext Area Bo x with the option to check P ro tected so the text is shown as asterisks (*), instead of plain text.
11. Click Save.
6.3.4 . Met hods
6 .3.4 .1 . Cre at ing a Me t ho d t o Asso ciat e wit h t he Dialo g
You will need to create a method that connects the values in the dialog with the provisioning request.
The method should be created in the Factory/Service class of the Auto mate model. A method is provided below that was created for the following scenario:
You want to provision a 3-tiered Service that contains catalog items of web, app and DB. Each of these virtual machines (or cloud instances) has been tagged under the Servi ce category with the appropriate value. Then, added as a catalog item and combined into a catalog bundle.
The Servi ce D i al o g captures the selection of small, medium or large application in a dropdown called servi ce_type. When referring to a value captured in an element in a dialog, the name of the element should be prefixed with d i al o g _. For example, servi ce_type becomes d i al o g _servi ce_type when used in the method.
The method will set the memory sizes for each of the catalog items based on the servi ce_type selection.
68
#
# CloudForms Management Engine Automate Method
#
$evm .log( "info" , "CloudForms Management Engine Automate Method
ConfigureChildDialog Started" )
#
# Method Code Goes here
#
$evm .log( "info" , "===========================================" )
$evm .log( "info" , "Listing ROOT Attributes:" )
$evm .root.attributes.sort.each { | k, v | $evm .log( "info" , "\t #{ k } : #{ v } " ) }
$evm .log( "info" , "===========================================" )
stp_task
= $evm .root
[ "service_template_provision_task" ]
$evm .log( "info" , "===========================================" )
$evm .log( "info" , "Listing task Attributes:" )
stp_task.attributes.sort.each
{ | k, v | $evm .log( "info" , "\t #{ k } : #{ v } " ) }
$evm .log( "info" , "===========================================" )
#############################################################
Chapt er 6 . Cat alogs and Services
#### This is how the method would look for dialog variables
#############################################################
dialog_service_type
= $evm .root
[ 'dialog_service_type' ]
$evm .log( "info" , "User selected Dialog option = [ #{ dialog_service_type } ]" )
stp_miq_request_task
= stp_task.miq_request_task
#$evm.log("info","(parent) miq_request_task: = [#
{stp_miq_request_task}]")
#############################################################
#### This is how you get the catalog items for the catalog bundle
#############################################################
stp_miq_request_tasks
= stp_task.miq_request_tasks
#$evm.log("info","(children) miq_request_tasks count: = [#
{stp_miq_request_tasks.count}]")
#############################################################
#### By going through the children, you can set the dialog variable for each of the children (we based our values on the childrens service tags)
#############################################################
stp_miq_request_tasks.each do | t |
$evm .log( "info" , " Setting dialog for: #{ t.description
} " )
service
= t.source
service_resource
= t.service_resource
#$evm.log("info"," Child service resource name: #
{service_resource.resource_name}")
#$evm.log("info"," Child service resource description: #
{service_resource.resource_description}")
service_tag_array
= service.tags( :app_tier )
service_tag
= service_tag_array.first.to_s
memory_size
= nil
#############################################################
#### The dialog_service_type is the attribute set on the service dialog
#### We use the service_tag to decide what child gets what dialog
#############################################################
case dialog_service_type
when "Small"
case service_tag
when "app"
memory_size
= 1024
when "web"
memory_size
= 1024
when "db"
memory_size
= 4096
else
$evm .log( "info" , "Unknown Dialog type" )
end
when "Large"
case service_tag
69
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
when "app"
memory_size
= 4096
when "web"
memory_size
= 4096
when "db"
memory_size
= 8192
else
$evm .log( "info" , "Unknown Dialog type" )
end
else
$evm .log( "info" , "Unknown Dialog type - setting Dialog options here" )
end
#############################################################
#### set_dialog_option sets the dialog for the child
#############################################################
t.set_dialog_option(
'memory' ,memory_size) unless memory_size.nil?
$evm .log( "info" , "Set dialog for selection: [ #{ dialog_service_type } ]
Service_Tier: [ #{ service_tag } ] Memory size: [ #{ memory_size } ]" ) end
#
#
#
$evm .log( "info" , "CloudForms Management Engine Automate Method
ConfigureChildDialog Ended" )
exit
MIQ_OK
6 .3.4 .2 . Cre at ing a Me t ho d in t he Fact o ry/Se rvice Class
Pro ced u re 6 .3. T o Creat e a Met h o d in t h e Fact o ry/Service Class
1. Navigate to Au t o mat e → Exp lo rer.
2. Click the D atasto re accordion, and select a Fact o ry → Service class.
3. Click the Metho d s tab.
4. Click (C o nfi g urati o n), then
5. Type in a Name and D i spl ay Name.
(Ad d a New Metho d ).
6. In the D ata field, type in the method contents.
7. Click Val i d ate and wait for your data entry to be successfully validated.
8. Click Ad d .
6 .3.4 .3. Cre at ing an Inst ance in t he Fact o ry/Se rvice Class
Pro ced u re 6 .4 . T o Creat e an In st an ce in t h e Fact o ry/Service Class
1. Navigate to Au t o mat e → Exp lo rer.
2. Click the D atasto re accordion, and select a Fact o ry → Service class.
70
Chapt er 6 . Cat alogs and Services
3. Click the Instances tab.
4. Click (C o nfi g urati o n), then
5. Type in a Name and D i spl ay Name.
(Ad d a new Instance).
6. In the Fi el d s area, type in the method's name in Val ue.
7. Click Ad d .
Resu lt :
The instance is created so that it can be called from the Servi ceP ro vi si o n class.
Note
After the method has been created, it must be mapped to an instance in the
Factory/StateMachines/Service Provision State Machine class. The name of the instance must be specified as the Entry P o i nt. This method must be called before the provision job begins.
6 .3.4 .4 . Asso ciat ing a Me t ho d wit h an Aut o m at e Inst ance
Pro ced u re 6 .5. T o Asso ciat e t h e Met h o d wit h an Au t o mat e In st an ce
1. Navigate to Au t o mat e → Exp lo rer.
2. From the accordion menu, click Dat ast o re → Fact o ry → St at eMach in es → Service
Pro visio n St at e Mach in e class.
3. Either create a new instance or select the cl o ne_to _servi ce instance.
4. Click (C o nfi g urati o n), then (Ed i t Sel ected Instance).
5. In the co nfi g urechi l d d i al o g value, put the path to the method.
6. Click Save or Ad d if you are adding this to a new instance.
Resu lt :
Now that the catalog items, service dialog, dialog methods, and service provision instance have been created, you can create the catalog bundle.
6 .3.4 .5 . Cre at ing a Cat alo g Bundle
Pro ced u re 6 .6 . T o Creat e a Cat alo g Bu n d le
1. Navigate to Services → Cat alo g s.
2. Click the C atal o g Items accordion.
3. Click (C o nfi g urati o n), and then (Ad d a New C atal o g Bund l e).
4. In Basi c Info , type in a name and description
71
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
5. Click D i spl ay i n C atal o g .
6. Select the appropriate dialog name.
7. Select the path to the appropriate Automate/Factory/StateMachines/ServiceProvision instance.
8. Click on the R eso urces tab, then select the catalog items you want added to the bundle from the Ad d a R eso urce dropdown.
9. Click Ad d .
Resu lt :
A catalog bundle is created and visible in the Servi ce C atal o g accordion.
Note
You should also create and specify an Entry Point in the Factory/StateMachines/Service
Provision State Machine class for each catalog item that is part of a bundle. If you do not, then the pre and post provision processing will occur for each item in the bundle in addition to processing for the C atal o g Bund l e. To set the entry point, go into each C atal o g Item and check D i spl ay i n C atal o g . Then, you will see the Entry Point field.
6 .3.4 .6 . Pro visio ning a Se rvice
Pro ced u re 6 .7. T o Pro visio n a Service
1. Navigate to Services → Cat alo g s.
2. Click the Servi ce C atal o g s accordion, and select the service to provision.
3. Click O rd er. The dialog appears.
4. Select the options in the Servi ce dialog.
Resu lt :
The parameters are passed to the children based on the method tied to the choices made in the dialog.
72
Chapt er 7 . Ret irement
Chapter 7. Retirement
7.1. Ret iring Virt ual Machines
7.1.1. Ret iring Virt ual Machines and Inst ances
When a virtual machine or instance is no longer required, it can be retired. Once a virtual machine or instance reaches its retirement date, it is immediately shut down and not allowed to restart. If an attempt to restart is made, CloudForms Management Engine will shut down the virtual machine or instance.
There are three built-in policies involved with retirement.
If the virtual machine or instance reaches its retirement date, it will be stopped even if it is running.
If a retired virtual machine or instance is requested to start through CloudForms Management
Engine, the virtual machine or instance will not be allowed to start.
If a provider starts a retired virtual machine or instance outside of CloudForms Management
Engine, the virtual machine or instance will be stopped.
CloudForms Management Engine provides a number of ways to retire a virtual machine or instance.
By using the allocated buttons in the CloudForms Management Engine console.
When creating a provision request, a retirement date can be set up.
7.1.2. Using t he CloudForms Management Engine Console t o Ret ire
Through the CloudForms Management Engine console, you can retire a virtual machine on a specific date or immediately.
7.1.3. Ret iring a Virt ual Machine Immediat ely
Pro ced u re 7.1. T o Immed iat ely Ret ire a Virt u al Mach in e
1. Navigate to Services → Wo rklo ad s.
2. Select the virtual machine or instance that you want to retire.
3. Click (Li fecycl e), then (R eti re thi s VM/Instance).
Resu lt :
The virtual machine or instance is immediately stopped, and will be shut down if an attempt is made to restart it.
7.1.4 . Set t ing a Ret irement Dat e for a Virt ual Machine or Inst ance
Pro ced u re 7.2. T o Set a Ret iremen t Dat e f o r a Virt u al Mach in e o r In st an ce
1. Navigate to Services → Wo rklo ad s.
2. Select the virtual machine that you want to set a retirement date for.
73
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
3. Click (Li fecycl e), then (Set/remo ve reti rement d ate).
4. Select a date using the calendar control.
5. Click Save.
Resu lt :
The retirement date is set, and displays in the virtual machine or instance summary screen.
7.1.5. Removing a Ret irement Dat e for a Virt ual Machine or Inst ance
Pro ced u re 7.3. T o Remo ve a Ret iremen t Dat e f o r a Virt u al Mach in e o r In st an ce
1. Navigate to Services → Wo rklo ad s.
2. Select the virtual machine or instance that you want to remove the retirement date from.
3. Click (Li fecycl e), then click (Set R eti rement D ate).
4. Click (R emo ve R eti rement D ate).
7.2. Set t ing Ret irement in a Provision Request
7.2.1. Set t ing Ret irement in a Provision Request
If you are using CloudForms Management Engine to provision, you can set when you want retirement in the provision request. To see how to create a request, go to Chapter 3. Provisioning Requests. A warning email will be sent to the owner before the retirement.
7.2.2. Scheduling Ret irement in a Provision Request
After provisioning either a Cloud Instance or Virtual Machine, a multi-tabbed screen appears where you can set up your provision requests. The Sched ul e tab allows you to choose to power on the virtual machines or instances after they are created, and to set a retirement date. If you select a retirement period, you will be prompted for when you want a retirement warning.
74
Chapt er 7 . Ret irement
7.3. Ext ending Ret irement Dat es
CloudForms Management Engine Auto mate includes a method to extend the retirement of a virtual machine or instance by 14 days. This section describes how to create a button that invokes this method and how to edit the method to change the number of days.
7.3.1. Creat ing a Cust om But t on t o Ext end Ret irement
Pro ced u re 7.4 . T o Creat e a Cu st o m Bu t t o n t o Ext en d Virt u al Mach in e Ret iremen t
1. Navigate to Au t o mat e → Cu st o miz at io n .
2. Click the Butto ns accordion.
3. From the O bject T ypes tree, select VM and Instance.
4. Navigate to the button group to which you want to add this button. (If you do not have a button group, add one and then create the button.)
5. Click (C o nfi g urati o n), then (Ad d a new Butto n).
6. Type in a button text and button hover text, and select the image you want to use.
7. In O bject D etai l s, select Req u est from the /System/P ro cess/ dropdown. By default, the message is create. Do not change it.
8. In R eq uest, type vm_retire_extend .
9. Click Ad d .
7.3.2. Changing t he Number of Days t o Ext end Ret irement
75
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Pro ced u re 7.5. T o Ch an g e t h e Nu mb er o f Days t o Ext en d Ret iremen t
1. Navigate to Au t o mat e → Exp lo rer.
2. Click Dat ast o re → Alert → Email No t if icat io n s → vm_ret ire_ext en d instance.
3. Click (C o nfi g urati o n), then (Ed i t thi s Instance).
4. In the Data area, change the vm_retire_extend_days attribute to the new value.
5. Click Save.
76
Chapt er 8 . Aut omat e Model
Chapter 8. Automate Model
8.1. About Aut omat e
This chapter discusses the Automate feature set. CloudForms Management Engine Automate enables real-time, bi-directional process integration and adaptive automation for management events and administrative or operational activities.
8.2. Aut omat e Model
The Automate model is designed to be used by operations administrators, platform and subsystem support administrators, and line of business or application owners. With that in mind, the Automate model is comprised of the following namespaces.
Alert is used to send emails for different automation tasks.
Automation is used specifically for management activities for hosts, storage, virtual machines and cloud instances, including both lifecycle and operations.
CloudForms Management Engine Applications includes automation activities specifically used with CloudForms Management Engine. For example, the ability to provision virtual machines and cloud instances with customizations.
Factory includes methods created by Red Hat that can be reused by creating relationships. For example, it includes the methods for sending emails, logging events, and performing a SmartState analysis.
Integration is used to interface with systems outside of CloudForms Management Engine such as
C o nfi g urati o n Manag ement D atabase (C MD B), Si mpl e Netwo rk Manag ement
P ro to co l (SNMP ), and IP Ad d ress Manag ement (IP AM). Use this namespace if you want to integrate with additional systems.
Sample provides examples of methods that can be tailored for your own environment.
System contains classes that can provide the start points for all CloudForms Management Engine
Automate activities.
Each namespace can contain another namespace or classes. A class has a schema and includes attributes, methods, and relationships. An instance can include a collection of any number of attributes, methods, and relationships. For example, an instance can be a collection of attributes and a relationship or just one method.
Note
Red Hat does not recommend changing any of the existing classes or instances shipped with the product as this may hinder the operation of the CloudForms Management Engine.
However, you can link to these methods using relationships.
8.3. Creat ing a Class
Pro ced u re 8.1. T o Creat e a Class
77
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
1. Navigate to Au t o mat e → Exp lo rer, navigate to the namespace you want to add a class to.
2. Click (C o nfi g urati o n), then (Ad d a new C l ass).
3. Type in a unique Name and D escri pti o n.
4. If you want to use the schema from a class that has already been created, select it from the
Inheri ts Fro m dropdown. If the class that the new class inherits from changes, the new class will also change.
5. Click Ad d .
Resu lt :
The new class is created and you can create a schema, add instances and methods.
Note
For each class, create a schema if you did not choose to inherit from an existing class. The schema can include attributes, methods, assertions, and relationships.
8.4 . Creat ing a Schema for a Class
This procedure shows you how to create a schema.
Pro ced u re 8.2. T o Creat e a Sch ema f o r a Class
1. Navigate to Au t o mat e → Exp lo rer, and click the class you want to define a schema for.
2. Click on the Schema tab.
3. Click (C o nfi g urati o n), then (Ed i t sel ected Schema).
4. Click (C l i ck to ad d a new fi el d ) to create a new field.
5. Type in a Name for the new field.
6. From T ype, select Assert io n , At t rib u t e, Met h o d , Relat io n sh ip , or St at e.
7. If applicable, select a D ata T ype and set a D efaul t Val ue.
8. Type in a user friendly D i spl ay Name and D escri pti o n.
9. Check Sub to enable the substitution syntax of ${}. Uncheck it if you want to use that syntax as a regular string.
10. Fill in C o l l ect and Messag e as required. C o l l ect is used to rollup values from resolved relationships. For example, a relationship can resolve to a large object tree. Use co l l ect to specify how to pull out data from those child objects into the current object. If you give
co l l ect a name value, it will store the method result in an attribute of the current object with that name.
11. O n Entry, O n Exi t, O n Erro r, Max R etri es, and Max T i me are fields used mostly for state machines. Leave blank if not applicable. See State Machines.
78
Chapt er 8 . Aut omat e Model
12. Click (Ad d thi s entry) to confirm the fields values.
13. For each new field, repeat steps 4 through 10.
14. When you have created all of the fields, click Save.
Resu lt :
The class schema is created, and you can now add instances to it.
Note
You may need to edit a class schema to reorder, add, edit, or remove a field. Classes define the order in which fields are processed and you may need to process some items before others.
8.5. Edit ing a Field in a Schema
This procedure describes how to edit schema fields.
Pro ced u re 8.3. T o Ed it a Field in a Sch ema
1. Navigate to Au t o mat e → Exp lo rer.
2. Click the class you want to define a schema for.
3. Click the Schema tab.
4. Click (C o nfi g urati o n), then (Ed i t sel ected Schema).
5. Make required changes to any of the definitions for the field.
6. To remove a field, click (C l i ck to d el ete thi s fi el d fro m the schema).
7. Click Save when you are finished editing the schema.
Resu lt :
Once the schema is created, you can add instances and methods to the class.
8.6. Edit ing Schema Sequence
This procedure shows you how to change schema sequence.
Pro ced u re 8.4 . T o Ed it a Sch ema Seq u en ce
1. Navigate to Au t o mat e → Exp lo rer.
2. Click the class you want to change the schema sequence for.
3. Click the Schema tab.
79
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
4. Click (C o nfi g urati o n), then (Ed i t Seq uence).
5. In the C l ass Schema Seq uenci ng area, click the field you want to change the sequence for.
To move a field up in the order of resolving an instance, click
fi el d up).
(Mo ve sel ected
To move a field down in the order of resolving an instance, click
sel ected fi el d d o wn).
6. Click Save when you are finished editing the sequence.
(Mo ve
8.7. Adding an Inst ance t o a Class
This procedure shows you how to create an instance.
Pro ced u re 8.5. T o Ad d an In st an ce t o a Class
1. Navigate to Au t o mat e → Exp lo rer.
2. Click the class you want to define a schema for.
3. Click the Instances tab.
4. Click (C o nfi g urati o n), then (Ad d a new Instance).
5. In the Mai n Info area, type in a Name, D i spl ay Name and D escri pti o n.
6. In the Fi el d s area, type in an appropriate value for each field, leave the field blank if no value is required, or use the default value.
7. Click Ad d .
8.8. Relat ionships
8.8.1. Relat ionship Synt ax
Relationships are used to connect to other instances in the Auto mati o n D atasto re. Relationships are formed using URI syntax. The following can also be passed through a relationship:
Use # to set the message to send to the item in the relationship.
To pass an input to the method use ? followed by the item to pass.
If you want to use a substitution, the syntax is ${} with the substitution located between the brackets.
8.8.2. T able: Relat ionship Examples
80
Chapt er 8 . Aut omat e Model
Examp le
/Integration/IPAM/AcquireMACAddress#${#ae_m essage}
/FACTORY/METHOD/vm_allowed?
vm_id=${process#vm_id}
/Factory/Method/VM_SCAN?
vm_id=${process#vm_id}
Exp lan at io n
Goes to Integration Namespace, IPAM Class, substituting the value of ae_message for the message.
Goes to Factory Namespace, Method class, vm_allowed method, passing the vm_id that came in through the process class (The VM from where the Automation Model was initiated).
Goes to Factory Namespace, Method class, vm_scan (SmartState Analysis) method, passing the vm_id that came in through the process class (The VM from where the Automation Model was initiated).
8.9. Met hods
8.9.1. Met hods
Methods are pieces of code associated with a class or object to perform a task. CloudForms
Management Engine allows for Perl or Ruby methods. You can create your own methods or use relationships to link to pre-existing ones. In addition, you can use Windows PowerShell to create these methods. If you will be using PowerShell, you must install a SmartProxy on a Windows computer with network access to a CloudForms Management Engine Appliance in the CloudForms
Management Engine Z one where you are running Automation.
8.9.2. Inst alling a Windows Smart Proxy for PowerShell
This procedure shows you how to install a Windows SmartProxy for PowerShell. On the computer where you want to run the Windows SmartProxy, log in to the CloudForms Management Engine
Console.
Important
The Windows SmartProxy is being deprecated. Red Hat recommends using WinRM for connecting to Windows servers. See Authenticating to Microsoft SCVMM
Pro ced u re 8.6 . T o In st all a Win d o ws Smart Pro xy f o r Po werSh ell
1. Click Co n f ig u re → Co n f ig u rat io n .
2. Click the Setti ng s accordion, and click Zo nes.
3. Click the zone where the CloudForms Management Engine server is located.
4. Click the CloudForms Management Engine server that you want to apply the maintenance to.
5. Click the Mai ntenance tab.
6. Click the P ro d uct Upd ate with a component of SmartProxy and platform of Windows.
7. Click D o wnl o ad . The file is downloaded to the computer where you are accessing the
CloudForms Management Engine Console.
81
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
8. Open a command prompt, and navigate to the directory where you downloaded the file.
9. Run:
C:\Downloads\>filename -h ipaddress install
Note
Ensure that filename is replaced with the actual name of the file downloaded, and that
ipaddress is replaced with the IP address of your CloudForms Management Engine host.
Resu lt :
The SmartProxy is installed as a service on the Windows computer in the \P ro g ram
Fi l es\Manag eIQ directory. To start the SmartProxy, navigate to Co n t ro l Pan el →
Ad min ist rat ive T o o ls → Services. Start the ManageIQ SmartProxy service. The service is set to start automatically when you restart the computer.
8.9.3. Creat ing a Met hod
This procedure shows you how to create a method.
Pro ced u re 8.7. T o Creat e a Met h o d
1. Navigate to Au t o mat e → Exp lo rer, navigate to the class where you want to create a method.
2. Click the Metho d s tab.
3. Click (C o nfi g urati o n), (Ad d a New Metho d ).
4. In the Mai n Info area, type in a Name and D i spl ay Name.
5. For Lo cati o n, select in lin e. Once selected, you will be presented with a D ata area in which to write or copy the script.
6. Click Val i d ate to check the syntax.
7. Click Ad d .
Resu lt :
The Facto ry Namespace provides methods that can be re-used throughout the automation model.
You can link to these in an instance by using a relationship instead of writing your own scripts.
8.10. Simulat ion
8.10.1. Simulat ion
After your model is designed, use the simulate page to test it. It allows you to see the results in tree and XML view.
82
Chapt er 8 . Aut omat e Model
8.10.2. Simulat ing an Aut omat e Model
This procedure shows you how to simulate an automate model.
Pro ced u re 8.8. T o Simu lat e an Au t o mat e Mo d el
1. Navigate to Au t o mat e → Simu lat io n .
2. In O bject D etai l s, select a type of object from /System/P ro cess/ that will initiate the model. The Messag e should be create. Type in the name of the R eq uest where you are starting from.
3. Select the T ype of item you want to run the simulation on. Then, select a specific one to use as the example.
4. Check Execute Metho d s if you want to perform the model and not just simulate it.
5. Type in the Attri bute/Val ue P ai rs fields if applicable.
6. Click Submi t.
Resu lt :
83
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Click on the T ree Vi ew or XML Vi ew tabs to see results.
8.11. Import ing, Export ing, and Reset t ing t he Dat ast ore
8.11.1. Import ing, Export ing, and Reset t ing t he Dat ast ore
The Auto mate Mo d el can be exported and imported as an XML file. CloudForms Management
Engine allows you to back up your model by export. Red Hat may provide you with new or updated classes, and provides an import function for either a class or the entire model. Finally, you can reset the datastore to its default. Always be sure to export the current datastore before importing or resetting.
8.11.2. Export ing All Dat ast ore Classes
This procedure shows you how export datastore classes as an XML file.
Pro ced u re 8.9 . T o Exp o rt All Dat ast o re Classes
1. Navigate to Au t o mat e → Imp o rt /Exp o rt .
2. Click (Expo rt al l D atasto re cl asses and i nstances to a fi l e).
3. Follow your browsers prompts to save the file.
Resu lt :
The datastore is exported as an XML file.
8.11.3. Import ing Dat ast ore Classes
This procedure shows you how to import datastore classes.
Pro ced u re 8.10. T o Imp o rt Dat ast o re Classes
1. Navigate to Au t o mat e → Imp o rt /Exp o rt .
2. Export the datastore so that you have a backup.
3. Click Bro wse to navigate to the location of the file to import.
4. Click Upl o ad .
Resu lt :
The datastore is imported from the XML file.
8.11.4 . Reset t ing Dat ast ore t o Default
This procedure shows you how reset datastore to default.
Pro ced u re 8.11. T o Reset t h e Dat ast o re t o t h e Def au lt
1. Navigate to Au t o mat e → Imp o rt /Exp o rt .
84
Chapt er 8 . Aut omat e Model
2. Export the datastore so that you have a backup.
3. Click (R eset al l D atasto re custo m cl asses and i nstances to d efaul t).
4. Read the prompt warning you that communication with the datastore will be lost and all classes and instances will be cleared and reset.
5. After reading the prompt, click O K.
[2] Sup p o rt fo r Micro so ft SCVMM is in Technical Preview. See
Techno lo g y Preview Features Sup p o rt
Sco p e .
85
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Chapter 9. Invoking Automate
9.1. Aut omat e Examples
This chapter describes the ways to invoke an Automate workflow. Automation can be initiated through an alert, an event, a CloudForms Management Engine application, or a custom button. The same automation process can be re-used across more than one of these. For example, using automation to remove orphaned virtual machines and instances could be initiated by:
An administrator request from the CloudForms Management Engine console (from a custom button)
An alert indicating the datastore has less than 20% free-space
A virtual machine or instance unregistered event is detected
All invocations of an automate model must enter through the /System/P ro cess namespace.
9.2. Invoking Aut omat e using a Cust om But t on
One of the ways to invoke an Automate model is to map an instance from the
/System/P ro cess/R eq uest class to a custom button. Before creating the button, you need to have an instance in the /System/P ro cess/R eq uest class to map to it and a button group to assign it to.
Create buttons for a cluster, host, datastore, provider, virtual machines or cloud instances. When the button is clicked, the model will be invoked for the selected item. For each of these, you can have up to 15 buttons.
9.3. Creat ing a Cust om But t on Group
This procedure shows you how to create a custom button group.
Pro ced u re 9 .1. T o Creat e a Cu st o m Bu t t o n G ro u p
1. Navigate to Au t o mat e → Cu st o miz at io n .
2. Click the Butto ns accordion.
3. From the O bject T ypes tree, select the type of object you want to create the button group for.
4. Click (C o nfi g urati o n), (Ad d a new Butto n G ro up).
5. Type in a Butto n G ro up T ext and Butto n G ro up Ho ver T ext, and select the Butto n
G ro up Imag e you want to use.
6. If custom buttons have already been created, assign them to the button group. If not, see
Creating a Custom Button to create custom buttons.
7. Click Ad d .
Resu lt :
86
Chapt er 9 . Invoking Aut omat e
The button group will show in the object type you added the button to.
9.4 . Creat ing a Cust om But t on
This procedure shows you how to create a custom button.
Pro ced u re 9 .2. T o Creat e a Cu st o m Bu t t o n
1. Navigate to Au t o mat e → Cu st o miz at io n .
2. Click the Butto ns accordion.
3. From the O bject T ypes tree, select the type of object you want to create the button for.
4. Click Unassi g ned Butto ns.
5. Click (C o nfi g urati o n), then (Ad d a new Butto n).
Note
If (Ad d a new Butto n) is not available, that means you have not created a button group for that object. To continue, create a button group first. See Creating a
Custom Button Group
6. In Acti o n, type in a Butto n T ext and Butto n Ho ver T ext, and select the Butto n
Imag e you want to use.
7. Select a D i al o g if applicable.
8. In O bject D etai l s, select Req u est from the /System/P ro cess/ dropdown. By default, the message is create. Do not change it.
9. Type in a R eq uest name for the /System/P ro cess/R eq uest instance.
10. Type in the Attri bute/Val ue P ai rs fields if applicable.
11. Under Vi si bi l i ty, select which Acco unt R o l es you want to have access to this button.
12. Click Ad d when you have confirmed that the button accomplishes the task you want.
Resu lt :
The button will show in the object type you added the button to.
9.5. Edit ing a Cust om But t on
This procedure shows you how to edit a custom button.
Pro ced u re 9 .3. T o Ed it a Cu st o m Bu t t o n
1. Navigate to Au t o mat e → Cu st o miz at io n .
2. From the O bject T ypes dropdown, select the type of object you want to edit the button for.
87
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
3. Click the button you want to edit.
4. Click (C o nfi g urati o n),
5. Modify as required.
6. Click Save.
(Ed i t thi s Butto n).
9.6. Delet ing a Cust om But t on
This procedure shows you how to delete a custom button.
Pro ced u re 9 .4 . T o Delet e a Cu st o m Bu t t o n
1. Navigate to Au t o mat e → Cu st o miz at io n s, then select the Butto ns accordion.
2. From the O bject T ype tree in the accordion menu, select the type of object you want to remove the button from.
3. Click (C o nfi g urati o n). then click (R emo ve thi s butto n).
4. Click O K to confirm that you want to delete this button.
9.7. Using a Cust om But t on
This procedure shows you how to use custom buttons to invoke a cluster, host, datastore, provider, virtual machine or instance.
Pro ced u re 9 .5. T o Use a Cu st o m Bu t t o n
1. Go to the page for the item that you created a button for.
2. Click the custom button group from the taskbar, and then your custom button.
Resu lt :
The automate model is invoked for the specified item.
9.8. Init iat ing Aut omat e from an Event
9.8.1. Init iat ing Aut omat e from an Event
You can also use a CloudForms Management Engine Policy Event to initiate automation. You can either use the provided Raise Automation Event action or create a custom automation action. The first case will start in the /System/P ro cess class, but then go to the Event that initiated the Automate model in the /System/P ro cess/Event C l ass. If you create your own custom action, it will start from the /System/P ro cess class and then go to the /System/P ro cess/R eq uest C l ass instead.
For example, suppose that you always want the same Automate model to occur when a virtual machine is created. You would use the Raise Automation Event Action. There are instances in the
/System/P ro cess/Event C l ass for the following Events that you can select as part of a Policy:
88
Chapt er 9 . Invoking Aut omat e
9.8.2. Creat ing a Policy for Aut omat e
This procedure shows you how to create a policy for automate.
Pro ced u re 9 .6 . T o Creat e a Po licy f o r Au t o mat e
1. Navigate to Co n t ro l → Exp lo rer.
2. Click the P o l i ci es accordion, and select C o ntro l P o l i ci es.
3. Select VM C o ntro l P o l i ci es.
4. Click (C o nfi g urati o n), then
5. Type in a D escri pti o n.
(Ad d a New C o ntro l Vm P o l i cy).
6. Uncheck Acti ve if you do not want this policy processed even when assigned to a resource.
7. Click Ad d . You are brought to the page where you add conditions and events to your new policy.
8. Click (C o nfi g urati o n), then
assi g nments).
(Ed i t thi s P o l i cy' s Event
Check the events you want to use to send to an Auto mate Mo d el .
Click Save.
From the Events area, click on the D escri pti o n o f the Event you want to assign an action to.
89
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Click (Ed i t Acti o ns fo r thi s P o l i cy Event).
9. Select R ai se Auto mati o n Event, and click
thi s Event).
10. Click Save.
(Mo ve sel ected Acti o ns i nto
Resu lt :
You can now assign this policy to a P o l i cy P ro fi l e. Then, assign the policy profile to the virtual machines. Every time this event happens on the virtual machine the appropriate Automate Model will be initiated.
Note
If you want the policy to initiate an Automate Model from the /System/P ro cess/R eq uest class, then you can create your own custom action. Be sure to have an instance in the
/System/P ro cess/R eq uest class for it to map to.
9.8.3. Creat ing a Cust om Aut omat e Act ion
This procedure shows you how to create a custom Automate action.
Pro ced u re 9 .7. T o Creat e a Cu st o m Au t o mat e Act io n
1. Navigate to Co n t ro l → Exp lo rer accordion.
2. Click the Acti o ns accordion.
3. Click ( Co n f ig u rat io n ) , then ( Ad d a n ew Act io n ) .
4. Type in a D escri pti o n for the Action.
5. Select In vo ke a Cu st o m Au t o mat io n from Acti o n T ype.
6. In C usto m Auto mati o n,
For Messag e, type create.
For R eq uest, type in the name of the instance of the /System/P ro cess/R eq uest
C l ass in the second.
7. Type in the Attri bute/Val ue P ai rs fields if applicable.
8. Click Ad d .
Resu lt :
The action is created and can be added to a policy.
90
Objects
A.1. Virt ual Machine Propert ies
When using these items in a method, prefix them with vm. . For example: vm. sto rag e_i d .
T ab le A.1. Virt u al Mach in e Pro p ert ies
Frien d ly Name o r Descrip t io n
Allocated Disk Storage
Autostart
Blackbox Exists
Blackbox Validated
Boot Time
Busy
Cluster
Configuration XML
Connection State
CPU Affinity
CPU Limit
CPU Reserve
CPU Reserve Expand
CPU Shares
CPU Shares Level
Created on Time
Currently Used Space
Datastore Path
Date Created
Date Updated
Description
Ems
Evm Owner
Evm Owner Email
Evm Owner Name
CloudForms Management Engine Unique ID
(Guid)
Format
Host
Host Name
Id
Is a Template
Last Analysis Attempt On
Last Analysis Time
Last Compliance Status
Last Compliance Timestamp
Last Perf Capture On
Last Sync Time
Location
Memory Limit
Raw Co lu mn Name
allocated_disk_storage autostart blackbox_exists blackbox_validated boot_time busy ems_cluster_name config_xml connection_state cpu_affinity cpu_limit cpu_reserve cpu_reserve_expand cpu_shares cpu_shares_level ems_created_on used_storage_by_state v_datastore_path created_on updated_on description ems_id evm_owner_id evm_owner_email evm_owner_name guid format host_id host_name id v_is_a_template last_scan_attempt_on last_scan_on last_compliance_status last_compliance_timestamp last_perf_capture_on last_sync_on location memory_limit
O bject s
91
Frien d ly Name o r Descrip t io n
Memory Reserve
Memory Reserve Expand
Memory Shares
Memory Shares Level
Name
OS Name
Owner
Paravirtualization
Parent Cluster
Parent Datacenter
Parent Folder (Hosts & Clusters)
Parent Folder (VMs & Templates)
Parent Folder Path (Hosts & Clusters)
Parent Folder Path (VMs & Templates)
Parent Host Platform
Parent Resource Pool
Pct Free Disk
Platform
Power State
Previous State
Registered
Reserved
Retired
Retirement
Retires On
Service
Smart
Standby Action
State Changed On
Storage
Storage Name
Template
Thin Provisioned
Tools Status
Total Provisioned Space
Total Snapshots
Total Used Disk Space
Uid Ems
Uncommitted Space
Used Storage
V Pct Used Disk Space
Vdi Available
Vdi Connection Dns Name
Vdi Connection Logon Server
Vdi Connection Name
Vdi Connection Remote Ip Address
Vdi Connection Session Name
Vdi Connection Session Type
92
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Raw Co lu mn Name
memory_reserve memory_reserve_expand memory_shares memory_shares_level name os_image_name owner paravirtualization v_owning_cluster v_owning_datacenter v_owning_folder v_owning_blue_folder v_owning_folder_path v_owning_blue_folder_path v_host_vmm_product v_owning_resource_pool v_pct_free_disk_space platform power_state previous_state registered reserved retired retirement retires_on service_id smart standby_action state_changed_on storage_id storage_name template thin_provisioned tools_status provisioned_storage v_total_snapshots used_disk_storage uid_ems uncommitted_storage used_storage v_pct_used_disk_space vdi_available vdi_connection_dns_name vdi_connection_logon_server vdi_connection_name vdi_connection_remote_ip_address vdi_connection_session_name vdi_connection_session_type
O bject s
Frien d ly Name o r Descrip t io n
Vdi Connection Url
Vdi Endpoint Ip Address
Vdi Endpoint Mac Address
Vdi Endpoint Name
Vdi Endpoint Type
Vdi User Appdata
Vdi User Dns Domain
Vdi User Domain
Vdi User Home Drive
Vdi User Home Path
Vdi User Home Share
Vdi User Logon Time
Vdi User Name
Vendor
Version
VMsafe Agent Address
VMsafe Agent Port
VMsafe Enable
VMsafe Fail Open
VMsafe Immutable VM
VMsafe Timeout (ms)
Raw Co lu mn Name
vdi_connection_url vdi_endpoint_ip_address vdi_endpoint_mac_address vdi_endpoint_name vdi_endpoint_type vdi_user_appdata vdi_user_dns_domain vdi_user_domain vdi_user_home_drive vdi_user_home_path vdi_user_home_share vdi_user_logon_time vdi_user_name vendor version vmsafe_agent_address vmsafe_agent_port vmsafe_enable vmsafe_fail_open vmsafe_immutable_vm vmsafe_timeout_ms
A.2. CloudForms Management Engine Met hods for use in Ruby Script s
To use one of these in one of your own Ruby methods, use the syntax of vm. method. For example, to reboot the guest operating system, use vm. rebo o tG uest.
Met h o d
start stop suspend unregister collect_running_processes shutdownGuest standbyGuest rebootGuest
Descrip t io n
Start Virtual Machine container.
Stop Virtual Machine container.
Suspend Virtual Machine container.
Unregister Virtual Machine.
Collect the running processes from a started
Virtual Machine.
Shutdown the guest operating system of the VM container. Requires VMware tools (or vendors tools) installed on the guest.
Put the guest operating system into standby.
Requires VMware tools (or vendors tools) installed on the guest.
Reboot the guest operating system. Requires
VMware tools (or vendors tools) installed on the guest.
A.3. Fact ory Met hods for VMs
Use the Au t o mat e → Exp lo rer page to see the referenced examples.
93
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Met h o d
log_vm_event vm_email_owner vm_email_remedy vm_scan vm_stop_and_unregister vm_post_retire
Descrip t io n
Logs a VM Event.
Sends email to the VM Owner.
Sends email to Open Remedy.
Performs SmartState Analysis on a Virtual
Machine.
Stops and unregisters a Virtual Machine.
Stops the Virtual Machine, unregisters it from the
Provider, and sends an email to the owner.
Meant to be used when a Virtual Machine reaches retirement.
A.4 . Host Propert ies
When using these items in a method, prefix them with host, such as ho st. ems_i d .
Frien d ly Name o r Descrip t io n Raw Co lu mn Name
All Enabled Ports
Annotation
Authentication Status
Connection State
CPU usage MHz rate average over time period
CPU usage MHz rate high over time period
CPU usage MHz rate low over time period
Custom Attribute 1
Custom Attribute 2
Custom Attribute 3
Custom Attribute 4
Custom Attribute 5
Custom Attribute 6
Custom Attribute 7
Custom Attribute 8 all_enabled_ports v_annotation
Authentication_status connection_state cpu_usagemhz_rate_average_avg_over_time_p eriod cpu_usagemhz_rate_average_high_over_time_p eriod cpu_usagemhz_rate_average_low_over_time_pe riod custom_1 custom_2 custom_3 custom_4 custom_5 custom_6 custom_7 custom_8
Custom Attribute 9
Date Created custom_9 created_on
Derived memory usage average over time period derived_memory_used_avg_over_time_period
Derived memory usage high over time period derived_memory_used_high_over_time_period
Derived memory usage low over time period
Ems
Enabled Inbound Ports
Enabled Outbound Ports derived_memory_used_low_over_time_period ems_id enabled_inbound_ports enabled_outbound_ports
Enabled Run Level 0 Services
Enabled Run Level 1 Services
Enabled Run Level 2 Services
Enabled Run Level 3 Services
Enabled Run Level 4 Services
Enabled Run Level 5 Services enabled_run_level_0_services enabled_run_level_1_services enabled_run_level_2_services enabled_run_level_3_services enabled_run_level_4_services enabled_run_level_5_services
94
O bject s
Frien d ly Name o r Descrip t io n
Enabled Run Level 6 Services
Enabled Tcp Inbound Ports
Enabled Tcp Outbound Ports
Enabled Udp Inbound Ports
Enabled Udp Outbound Ports
EVM Unique ID (Guid)
Hostname
Id
IP Address
Last Compliance Status
Last Compliance Timestamp
Last Perf Capture On
Last Analysis Time
Name
OS Name
Platform
Power State
Region Description
Region Number
Reserved
Service Names
Settings
Smart
SSH Root Access
Uid Ems
Date Updated
User Assigned Os
Parent Cluster
Parent Datacenter
Parent Folder (Hosts & Clusters)
Total Datastores
Total VMs
VMM Build Number
VMM Platform
VMM Vendor
VMM Version
Raw Co lu mn Name
enabled_run_level_6_services enabled_tcp_inbound_ports enabled_tcp_outbound_ports enabled_udp_inbound_ports enabled_udp_outbound_ports guid hostname id ipaddress last_compliance_status last_compliance_timestamp last_perf_capture_on last_scan_on name os_image_name platform power_state region_description region_number reserved service_names settings smart ssh_permit_root_login uid_ems updated_on user_assigned_os v_owning_cluster v_owning_datacenter v_owning_folder v_total_storages v_total_vms vmm_buildnumber vmm_product vmm_vendor vmm_version
A.5. Provider Propert ies
When using these items in a method, prefix them with ems, such as ems. ems_i d .
Frien d ly Name o r Descrip t io n
Aggregate VM CPUs
Aggregate VM Memory
CPU Ratio
CPU Usage MHZ Rate Average High Over Time
Period
Raw Co lu mn Name
aggregate_vm_cpus aggregate_vm_memory v_cpu_vr_ratio cpu_usagemhz_rate_average_high_over_time_p eriod"
95
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Frien d ly Name o r Descrip t io n
CPU Usage MHZ Rate Average Low Over Time
Period
CPU Usage MHZ Rate Average Over Time
Period
Date Created
Date Updated
Derived Memory Usage Rate Average High Over
Time Period
Derived Memory Usage Rate Average Low Time
Period
Derived Memory Usage Rate Average Over Time
Period
Distributed Resource Scheduler Automation
Level
Distributed Resource Scheduler Enabled
Distributed Resource Scheduler Migration
Threshold
EMS ID
EVM Z one
High-Availability Admission Control
High-Availability Enabled
High-Availability Max Failures
Id
Last Performance Data Captured
Last Smart State Analysis
Memory Ratio
Name
Parent Datacenter
Qualified Description
Region Description
Region Number
Reserved
Total CPU Speed
Total Hosts
Total Memory
Total Number of Logical CPUs
Total Number of Physical CPUs
Total Vms
Unique Identifier
Raw Co lu mn Name
cpu_usagemhz_rate_average_low_over_time_pe riod cpu_usagemhz_rate_average_avg_over_time_p eriod created_on updated_on derived_memory_used_high_over_time_period derived_memory_used_low_over_time_period derived_memory_used_avg_over_time_period drs_automation_level drs_enabled drs_migration_threshold ems_id zone_name ha_admit_control ha_enabled ha_max_failures id last_perf_capture_on last_scan_on v_ram_vr_ratio name v_parent_datacenter v_qualified_desc region_description region_number reserved aggregate_cpu_speed total_hosts aggregate_memory aggregate_logical_cpus aggregate_physical_cpus total_vms uid_ems
A.6. St orage Propert ies
When using these items in a method, prefix them with sto rag e, such as sto rag e. name.
T ab le A.2. St o rag e Pro p ert ies
Raw Co lu mn Name Frien d ly Name o r
Descrip t io n
Date Created created_on
96
Frien d ly Name o r
Descrip t io n
Raw Co lu mn Name
Date Updated
Disk Files Percent of Used updated_on v_disk_percent_of_used
Free Space
Free Space Percent of Total
Id
Last Analysis Time
Last Perf Capture On
Location
Multiple Host Access
Name free_space v_free_space_percent_of_total id last_scan_on last_perf_capture_on location multiplehostaccess name
Non-VM Files Percent of Used v_debris_percent_of_used
Other VM Files Percent of Used v_vm_misc_percent_of_used
Provisioned Space Percent of
Total v_provisioned_percent_of_total
Reserved
Size of Non-VM Files
Size of Other VM Files
Size of VM Memory Files
Size of VM Snapshot Files
Snapshot Files Percent of
Used reserved v_total_debris_size v_total_vm_misc_size v_total_vm_ram_size v_total_snapshot_size v_snapshot_percent_of_used
Store Type
Total Hosts store_type v_total_hosts
Total Managed Registered Vms total_managed_registered_vms
Total Managed Unregistered
Vms total_managed_unregistered_v ms
Total Provisioned Space
Total Space
Total Unmanaged Vms
Total VMs v_total_provisioned total_space total_unmanaged_vms v_total_vms
Uncommitted
Used Space
Used Space Percent of Total
VM Memory Files Percent of
Used uncommitted v_used_space v_used_space_percent_of_total v_memory_percent_of_used
O bject s
97
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Automate Model
This appendix lists the Namespaces, Classes, Methods, and Instances for the Automate Model. The
Namespace hierarchy for the model is defined as follows:
Alert
Automation
EVMApplications
Operations
Profile
Provisioning
Profile
Factory
StateMachines
Integration
MIQ_IPAM
Sample
System
B.1. Namespace: Alert
Class: Email Notifications (EmailNotifications)
In st an ce: (MiqHostProvisionRequest_Approved)
Contains configurable parameters for the MiqHostProvisionRequest_Approved method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (MiqHostProvisionRequest_Complete)
Contains configurable parameters for the MiqHostProvisionRequest_Complete method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
98
Aut omat e Model
signature - used to stamp the email with a custom signature.
In st an ce: (MiqProvisionRequest_Approved)
Contains configurable parameters for the MiqProvisionRequest_Approved method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (MiqProvisionRequest_Denied)
Contains configurable parameters for the MiqProvisionRequest_Denied method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (MiqProvisionRequest_Pending)
Contains configurable parameters for the MiqProvisionRequest_Pending method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (MiqProvision_Complete)
Contains configurable parameters for the MiqProvision_Complete method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (ServiceProvision_Complete)
Contains configurable parameters for the ServiceProvision_Complete method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
99
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (ServiceTemplateProvisionRequest_Approved)
Contains configurable parameters for the MiqProvisionRequest_Approved method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (VmMigrateRequest_Approved)
Contains configurable parameters for the VmMigrateRequest_Approved method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (VmMigrateTask_Complete)
Contains configurable parameters for the VmMigrateTask_Complete method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (vm_retire_extend)
Contains configurable parameters for the vm_retire_extend method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
vm_retire_extend - number of days to extend retirement.
In st an ce: (vm_retirement_emails)
100
Aut omat e Model
Contains configurable parameters for the vm_retirement_emails method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
Met h o d : (MiqHostProvisionRequest_Approved)
This method is used to email the provision requester that the Host provisioning request has been approved.
Met h o d : (MiqHostProvisionRequest_Complete)
This method sends an email when the host_provisioned event is raised.
Met h o d : (MiqProvisionRequest_Approved)
This method is used to email the provision requester that the VM provisioning request has been approved.
Met h o d : (MiqProvisionRequest_Denied)
This method is used to email the provision requester and approver that the VM provisioning request has been denied.
Met h o d : (MiqProvisionRequest_Pending)
This method is launched from the not_approved method which raises the requst_pending event when the provisioning request is NOT auto-approved.
Met h o d : (MiqProvision_Complete)
This method sends an email when the vm_provisioned event is raised.
Met h o d : (ServiceProvision_Complete)
This method sends an email when the service_provisioned event is raised.
Met h o d : (ServiceTemplateProvisionRequest_Approved)
This method is used to email the provision requester that the Service provisioning request has been approved.
Met h o d : (VmMigrateRequest_Approved)
This method is used to email the provision requester that the VM Migrate request has been approved.
Met h o d : (VmMigrateTask_Complete)
This method sends an email when the VmMigrateTask-Complete event is raised.
Met h o d : (vm_retire_extend)
This method is used to add 14 days to retirement date when target VM has a retires_on value and is not already retired.
101
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Met h o d : (vm_retirement_emails)
This method sends out retirement emails when the following events are raised: vm_retire_warn, vm_retired, vm_entered_retirement
Class: General Email Alerts (Email_Alerts)
In st an ce: (EMS_Cluster_Alert)
Contains configurable parameters for the EMS_Cluster_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (Ext_Management_System_Alert)
Contains configurable parameters for the Ext_Management_System _Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (Host_Alert)
Contains configurable parameters for the Host_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (MIQ_Server_Alert)
Contains configurable parameters for the MIQ_Server_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (Parse_Alerts)
102
Aut omat e Model
Contains configurable parameters for the Parse_Alerts method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (Storage_Alert)
Contains configurable parameters for the Storage_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (VM_Alert)
Contains configurable parameters for the VM_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
Met h o d : (EMS_Cluster_Alert)
This method is used to send Email Alerts based on Cluster.
Met h o d : (Ext_Management_System_Alert)
This method is used to send Email Alerts based on Provider.
Met h o d : (Host_Alert)
This method is used to send Email Alerts based on Host.
Met h o d : (MIQ_Server_Alert)
This method is used to send Email Alerts based on CloudForms Management Engine Server.
Met h o d : (Parse_Alerts)
This method is used to parse incoming Email Alerts.
Met h o d : (Storage_Alert)
This method is used to send Email Alerts based on Datastore.
Met h o d : (VM_Alert)
103
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
This method is used to send Email Alerts based on Virtual Machine.
B.2. Namespace: Aut omat ion
Class: Host Lifecycle Management (HostLifecycle)
In st an ce: Host Discovery (Discovery)
For internal use. Do not modify.
In st an ce: Host Migrate (Migrate)
For internal use. Do not modify.
In st an ce: Host Provisioning (Provisioning)
For internal use. Do not modify.
In st an ce: VM Retirement (Retirement)
For internal use. Do not modify.
Class: VM Lifecycle Management (VMLifecycle)
In st an ce: VM Discovery (Discovery)
For internal use. Do not modify.
In st an ce: VM Migrate (Migrate)
For internal use. Do not modify.
In st an ce: VM Provisioning (Provisioning)
For internal use. Do not modify.
In st an ce: VM Retirement (Retirement)
For internal use. Do not modify.
Class: VM Management (vm)
In st an ce: (.missing)
For internal use. Do not modify.
B.3. Namespace: EVMApplicat ions
B.3.1. Namespace: Operat ions
Class: Intelligent Workload Management (Intelligent_Workload_Management)
In st an ce: (Cluster_Workload_Management)
Contains configurable parameters for the Cluster_Workload_Management method.
to_email_address - where to send email from_email_address - specify the from email.
104
Aut omat e Model
signature - used to stamp the email with a custom signature.
host_scope: specify scope of other hosts to which this VM can be Vmotioned. Default is to get
ESX Hosts from the Cluster source VM resides.
In st an ce: Host_Evacuation
Contains configurable parameters for the Host_Evacuation method.
to_email_address - where to send email if the VM is going to be Vmotioned.
from_email_address - specify the from email if the VM is going to be Vmotioned.
signature - used to stamp the email with a custom signature.
host_scope: specify scope of hosts to be evacuated.
In st an ce: VM_Placement_Optimization (VM_Placement_Optimization)
Contains configurable parameters for the VM_Placement_Optimization method.
to_email_address - where to send email if the VM is going to be Vmotioned.
from_email_address - specify the from email if the VM is going to be Vmotioned.
signature - used to stamp the email with a custom signature.
host_scope: specify scope of other hosts to which this VM can be Vmotioned. Default is to get
ESX Hosts from the Cluster source VM resides.
Met h o d : (Cluster Workload Management)
This method will find a VM that is running hot in a given cluster and vMotion the VM to a more desirable host within that cluster.
Met h o d : (Host_Evacuation)
When a VM encounters high CPU % Ready, VMotions VM to a more suitable host.
Met h o d : (VM_Placement_Optimization)
When a VM encounters high CPU % Ready, VMotion VM to a more suitable host.
B.3.1 .1 . Nam e space : Pro file
Class: VM Migrate Group (VmMigrate)
In st an ce: (.missing)
Default instance used when no group is found for the user creating a migrate request.
In st an ce: (EVMGroup-super_administrator)
Instance used when the user is part of the Super Administrator Group. Configurable items: pre_dialog_name dialog_name state_machine
In st an ce: (EVMGroup-user_self_service)
105
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Instance used when the user is part of the User Self Service Group. Configurable items: pre_dialog_name dialog_name state_machine
In st an ce: (Super_Admin) pre_dialog_name dialog_name state_machine
Met h o d : (get_deploy_dialog)
Dynamically choose dialog based on Category:environment chosen in pre-dialog.
B.3.2. Namespace: Provisioning
Class: ActiveDirectory Domain (Domain)
Empty
Class: DHCP Server (DHCP_Server)
Empty
Class: VM Naming Profiles (Naming)
In st an ce: (default)
Calls the vmname method.
Met h o d : Default (vmname)
If VM Name was not chosen during dialog processing then use prefix and [:environment] to generate name (The prefix currently coded into the method is mi q ). Otherwise, use VM name chosen in dialog. When provisioning multiple Virtual Machines, a number will be appended to the VM Name.
Class: VM Placement Profiles (Where)
In st an ce: (best_fit_cluster)
Calls the best_fit_cluster method.
In st an ce: best_fit_default (best_fit)
Calls the /factory/method/host_and_storage_least_utilized method.
In st an ce: (best_fit_least_utilized)
Calls the least_utilized method.
In st an ce: (best_fit_with_scope)
Calls the best_fit_with_scope method.
In st an ce: (best_fit_with_tags)
106
Aut omat e Model
Calls the best_fit_with_tags method.
In st an ce: (best_placement_with_scope)
Calls the best_placement_with_scope method.
Met h o d : (best_fit_cluster)
Used to find the cluster with best fit.
Met h o d : (best_fit_with_scope)
Used to find all hosts, datastores that have the tag category prov_scope = 'all'|| prov_scope =
<group-name>
Met h o d : (best_fit_with_tags)
Used to find all hosts, datastores that match the required tag.
Met h o d : (best_placement_with_scope)
This method is used to find the incoming templates cluster as well as hosts and storage that have the tag category prov_scope = 'all' && prov_scope = <group-name>
Met h o d : (least_utilized)
Used to find all hosts, datastores that are the least utilized.
Class: vLANs in Virtual Center (Network)
Empty
B.3.2 .1 . Nam e space : Pro file
Class: Host Provisioning Group (Host)
In st an ce: (.missing)
Default instance used when no group is found for the user creating a host provision request.
In st an ce: (EVMGroup-super_administrator)
Instance used when the user is part of the Super Administrator Group. Configurable items: pre_dialog_name dialog_name state_machine
Met h o d : (get_deploy_dialog)
Dynamically choose dialog based on Category:environment chosen in pre-dialog.
Class: Service Provisioning Group (service)
In st an ce: (.missing)
Default instance used when no group is found for the user creating a provision request.
Class: VM Provisioning Group (VM)
107
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
In st an ce: (.missing)
Default instance used when no group is found for the user creating a provision request.
In st an ce: (EVMGroup-super_administrator)
Instance used when the user is part of the Super Administrator Group. Configurable items: where domains networks vmname pre_dialog_name: Name of pre-provisioning dialog dialog_name: Name of dialog file auto_approval_state_machine quota_state_machine state_machine
In st an ce: (EVMGroup-user_self_service)
Instance used when the user is part of the User Self Service Group. Configurable items: where domains networks vmname pre_dialog_name: Name of pre-provisioning dialog dialog_name: Name of dialog file auto_approval_state_machine: quota_state_machine state_machine
Met h o d : (get_deploy_dialog)
Dynamically choose dialog based on Category:environment chosen in pre-dialog.
Met h o d : (vm_dialog_name_prefix)
This is the default method to determine the dialog prefix name to use.
B.4 . Namespace: Fact ory
Class: Host(Host)
In st an ce: (CheckProvisioned)
108
Aut omat e Model
Calls the check_provisioned method.
In st an ce: (CustomizeRequest)
Calls the CustomizeRequest and vm_email_owner method.
In st an ce: (PostProvision_Host)
Calls the PostProvision_Host method.
In st an ce: (PreProvision_Host)
Calls the PreProvision_Host method.
In st an ce: (Provision)
Calls the Provision method.
Met h o d : (CustomizeRequest)
This method is used to Customize the provisioning request.
Met h o d : (PostProvision_Host)
This method is used to perform post provisioning tasks.
Met h o d : (PreProvision_Host)
This method is used to customize the provisioning request.
Met h o d : (Provision)
Launches the provisioning job.
Met h o d : (checkprovisioned)
This method checks to see if the host has been provisioned.
Class: Methods
In st an ce: host_and_storage_least_utilized
Calls the host_and_storage_least_utilized method.
In st an ce: log_Vm_event
Calls the log_vm_event method.
In st an ce: Vm_allowed
Calls the vm_allowed2 method.
In st an ce: Vm_email_remedy
Calls the vm_email_remedy and send_email methods. Send_email is an internal method that is not visible in the model.
In st an ce: Stop VM, Unregister and Email Owner (Vm_Post_Retire)
Calls the vm_stop_and_unregister and vm_email_owner methods.
In st an ce: Vm_scan
109
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Calls the vm_scan method.
Met h o d : host_and_storage_least_utilized
Built in method to find least used host and storage.
Met h o d : log_vm_event
Used to log VM events.
Met h o d : vm_allowed
Parse a text file for VM names.
Met h o d : vm_allowed2
Parse .csv file for VM names.
Met h o d : vm_email_remedy
Used to send an email to Remedy.
Met h o d : vm_scan
Used to launch a SmartState Analysis on a VM.
Met h o d : vm_stop_and_unregister
Used to stop a VM and unregister it from the VC.
Class: Service-Now
Class used for integration with Service-Now.com
In st an ce: Create CI in Service Now (create_ci_in_eccq).
Create CMDB CI for Service-now.
Unknown: Create Incident in Service Now (create_incident_in_eccq).
Create CMDB incident in Service-now.
In st an ce: (eccq_insert)
Inserts a record into Service-Now's eccq queue.
In st an ce: (eccq_insert1)
Inserts a record into Service-Now's eccq queue.
Class: Service (Service)
In st an ce: (CatalogBundleInitialization)
Executes ConfigureParentProvisioningService.
In st an ce: (CatalogItemInitialization)
Executes ConfigureChildProvisioningService.
In st an ce: (CheckProvisioned)
Executes check_provisioned.
110
Aut omat e Model
In st an ce: (ConfigureChildDialog)
Executes configurechilddialog.
In st an ce: Provision (provision)
Executes provision method.
Met h o d : (CatalogBundleInitialization)
This method looks for all service dialog variables that start with "dialog_option_[0-9]" and
"dialog_tag_[0-9]" and passes them down to their appropriate child tasks.
Met h o d : (CatalogItemInitialization)
This method first looks in the options hash for :child_options and :child_tags then sets the options/tags for the appropriate task.
Met h o d : Check_Provisioned(CheckProvisioned)
Checks to see if the service has been provisioned.
Met h o d : (ConfigureChildDialog)
Configures the child dialogs for the service.
Met h o d : Provision (provision)
Launches the provisioning job.
Class: VM Migrate (VMMigrate)
In st an ce: (BestHost)
Executes BestHost.
In st an ce: (BestStorage)
Executes BestStorage.
In st an ce: (CheckMigration)
Executes CheckMigration.
In st an ce: (Migrate)
Executes Migrate.
In st an ce: (PostMigration)
Executes PostMigration.
In st an ce: (PreMigration)
Executes PreMigration.
Met h o d : (BestHost)
Future Use.
Met h o d : (BestStorage)
Future Use.
111
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Met h o d : (CheckMigration)
Checks to see if the VM has been migrated.
In st an ce: (Migrate)
Launches the migration job.
In st an ce: (PostMigration)
Steps to run after migration.
In st an ce: (PreMigration)
Steps to run before migration.
Class: Virtual Machine (VM)
In st an ce: (CheckPoweredOff)
Executes check_powered_off.
In st an ce: (CheckProvisioned)
Executes check_provisioned.
In st an ce: (CheckUnregisteredFromVC)
Executes check_unregistered_from_vc.
In st an ce: (CustomizeRequest)
Executes CustomizeRequest.
In st an ce: (DeleteFromVC)
Executes delete_from_vc.
In st an ce: (DeleteFromVMDB)
Executes delete_from_vmdb.
In st an ce: (PostProvision)
Executes PostProvision.
In st an ce: (PostProvision_Clone_to_VM)
Executes PostProvision._Clone_to_VM.
In st an ce: (PowerOff)
Executes power_off.
In st an ce: (PreDeleteFromVC)
Executes PreDeleteFromVC.
In st an ce: (PreProvision)
Executes PreProvision.
In st an ce: (PreProvision_Clone_to_Template)
112
Executes PreProvision_Clone_to_Template.
In st an ce: (PreProvision_Clone_to_VM)
Executes PreProvision_Clone_to_VM.
In st an ce: (Provision)
Executes provision.
In st an ce: (UnregisterFromVC)
Executes unregister_from_vc.
In st an ce: (VdiAddVmToDesktopPool)
Executes vdi_add_vm_to_desktop_pool.
In st an ce: (VdiWaitForHostname)
Executes vdi_wait_for_hostname.
Met h o d : CheckPoweredOff (check_powered_off)
Checks to see if the VM has been deleted from the VC.
Met h o d : CheckProvisioned (check_provisioned)
Checks to see if the vm has been provisioned.
Met h o d : CheckUnregisteredFromVC (check_unregistered_from_vc)
Checks to see if the VM is unregistered from the VC.
Met h o d : (CustomizeRequest)
This method is used to Customize the Provisioning Request:
1. Customization Specification Mapping for VMware provisioning.
2. Customization Template and PXE for RHEV provisioning.
Met h o d : DeleteFromVCCheck (delete_from_vc_check)
Checks to see if the VM has been deleted from the VC.
Met h o d : DeleteFromVC (delete_from_vc)
Deletes the VM from the VC.
Met h o d : DeleteFromVMDB (delete_from_vmdb)
Removes the VM from the VMDB database.
Met h o d : (PostProvision)
Used to customize the provisioning object prior to provisioning.
Met h o d : (PostProvision_Clone_to_VM)
Used to customize the provisioning object prior to provisioning.
Met h o d : PowerOff (power_off)
Aut omat e Model
113
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
powers-off the VM on the VC.
Met h o d : (PreDeleteFromVC) runs prior to deleting the VM from VC.
Met h o d : (PreProvision)
Used to apply PreProvision customizations as follows:
Customization Spec
VLAN
VM Description/Annotations
Target VC Folder
Resource Pool
Met h o d : (PreProvision_Clone_to_Template)
This default method is used to apply PreProvision customizations as follows:
1. VM Description/Annotations
2. Target VC Folder
3. Tag Inheritance
Met h o d : (PreProvision_Clone_to_VM)
Used to apply PreProvision customizations during the cloning to a VM:
Customization Spec
VLAN
VM Description/Annotations
Target VC Folder
Resource Pool
Met h o d : Provision (provision)
Launches the provisioning job.
Unknown: Scan (scan)
Performs SmartState analysis on a VM.
Met h o d : UnregisterFromVC (unregister_from_vc)
Unregisters the VM from the VC.
Met h o d : VDI Add VM to Desktop Pool (vdi_add_vm_to_desktop_pool)
Adds a provisioned VM to a VDI Desktop Group and optionally creates the Desktop Group.
Met h o d : VDI wait for hostname (vid_wait_for_hostname)
Waits for the VM's hostname, then starts the VM.
114
B.4 .1. Namespace: St at eMachines
Class: Host Provision State Machine (HostProvision)
In st an ce: Provision Host from PXE (host_pxe_install)
Steps to complete to provision a Host using PXE.
Met h o d : (update_provision_status)
Updates provisioning status.
Class: Service Provision Request Approval (ServiceProvisionRequestApproval)
In st an ce: Default (Default)
Validates or approves request.
Met h o d : (approve_request)
Executed when the provisioning request is auto-approved.
Met h o d : (pending_request)
Executed when the provisioning request is NOT auto-approved.
Met h o d : (validate_request)
Validates the request.
Class: Service Provision State Machine (ServiceProvision_Template)
In st an ce: clone_to_service (clone_to_service)
Steps to complete to clone a service to a service template.
Met h o d : (update_provision_status)
Updates provisioning status.
Class: VM Migration State Machine (VMMigrate)
In st an ce: (default)
Steps to complete to migrate a Virtual Machine.
Met h o d : (update_migration_status)
Updates provisioning status.
Class: VM Provision Approval State Machine (ProvisionRequestApproval)
In st an ce: Default (Default)
Create new instances for group profiles for automatic approval.
Configurable parameters for autoapproval: max_cpus: maximum number of cpus allowed for autoapproval.
max_vms: maximum number of VMs allowed for autoapproval.
max_memory: maximum amount of memory allowed for autoapproval.
Aut omat e Model
115
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
max_retirement_days: maximum number of days until retirement allowed for autoapproval.
Met h o d : (approve_request)
Executed when the provisioning request is auto-approved.
Met h o d : (pending_request)
Executed when the provisioning request is NOT auto-approved.
Met h o d : (validate_request)
This method validates the provisioning request using the values [max_vms, max_cpus, max_memory, max_retirement_days] from values in the following order:
1. In the model.
2. Template tags - This looks at the source provisioning template/VM for the following tags: category values: [prov_max_cpu, prov_max_vm, prov_max_memory, prov_max_retirement_days].
Tag values supersede values in the model.
Class: VM Provision Quota Verification State Machine (ProvisionRequestQuotaVerification)
In st an ce: Default (Default)
Default instance for quotas for user group provisioning profiles.
Configurable parameter for group quotas: max_owner_cpu: maximum number of cpus allowed for the VM Owner max_owner_memory: maximum memory allowed for the VM Owner max_owner_storage: maximum storage allowed for the VM Owner max_group_cpu: maximum number cpus allowed for the Owner's Group max_group_memory: maximum memory allowed for the Owner's Group max_group_storage: maximum storage allowed for the Owner's Group
Met h o d : (rejected)
Runs when the provision request quota validation has failed.
Met h o d : (validate_quotas)
This method validates the group and owner quotas using the values [max_owner_cpu, max_owner_memory, max_owner_storage, max_group_cpu, max_group_memory, max_group_storage] from values in the following order:
1. In the model
2. Group tags - This looks at the Group for the following tag values: [quota_max_cpus, quota_max_memory, quota_max_storage]
3. Owner tags - This looks at the User for the following tag values: [quota_max_cpus, quota_max_memory, quota_max_storage]
Tags supersede values in the model.
116
Class: VM Provision State Machine (VMProvision_Template)
In st an ce: Clone VM to Template (clone_to_template)
Steps to complete for cloning a Virtual Machine to a template.
Met h o d : (update_provision_status)
Updates provisioning status. Calls Service Now if applicable.
Class: VM Provision State Machine (VMProvision_VM)
In st an ce: Clone VM (clone_to_vm)
Steps to complete for cloning a Virtual Machine.
In st an ce: Provision VM from Template (template)
Steps to complete for creating a Virtual Machine from a template.
Met h o d : (update_provision_status)
Updates provisioning status. Calls Service Now if applicable.
Class: VM Retirement State Machine (VMRetirement)
In st an ce: Default
Steps to complete for retiring a Virtual Machine.
Met h o d : (update_retirement_status)
Updates retirement status.
B.5. Namespace: Int egrat ion
Class: BMC Remedy (Remedy)
Integration with Remedy
In st an ce: (Remedy_Change_Query_Service)
Executes (Remedy_Change_Query_Service).
In st an ce: (Remedy_ReassignRFC)
Executes (Remedy_ReassignRFC).
In st an ce: (Remedy_SearchCommentbyParentId)
Executes (Remedy_SearchCommentbyParentId).
In st an ce: (Remedy_SubmitComment)
Executes (Remedy_SubmitComment).
Met h o d : (Remedy_Change_Query_Service)
Query Remedy Change Management Work Details.
Met h o d : (Remedy_ReassignRFC)
Aut omat e Model
117
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Reassign Service Request in Remedy.
Met h o d : (Remedy_SearchCommentbyParentId)
Search Remedy Comments by Parent ID.
Met h o d : (Remedy_SubmitComment)
Submit Comments to Remedy.
Class: Configuration Management Database (CMDB)
For future use.
In st an ce: Activate CI (Activate)
For future use.
In st an ce: Called when Specified Instance is Missing (.missing)
For future use.
In st an ce: Deactivate CI (Deactivate)
For future use.
In st an ce: Register CI (Register)
For future use.
In st an ce: Unregister CI (Unregister)
For future use.
Class: Event (Event)
For SNMP traps.
In st an ce: Event - Error (Error)
For SNMP traps categorized as an Error.
In st an ce: Event - Information (Information)
For SNMP traps categorized as Informational.
In st an ce: Event - Warning (Warning)
For SNMP traps categorized as a Warning.
Met h o d : (EVMSNMP)
For future use.
Class: HP Operations Manager (HPOM)
Used to send HPOM Alerts.
In st an ce: (HPOM_EMS_Cluster_Alert)
Contains configurable parameters for the EMS_Cluster_Alert method.
118
Aut omat e Model
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (HPOM_Ext_Management_System_Alert)
Contains configurable parameters for the HPOM_Ext_Management_System _Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (HPOM_Host_Alert)
Contains configurable parameters for the HPOM_Host_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (HPOM_MIQ_Server_Alert)
Contains configurable parameters for the HPOM_MIQ_Server_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (HPOM_Storage_Alert)
Contains configurable parameters for the HPOM_Storage_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
119
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
In st an ce: (HPOM_VM_Alert)
Contains configurable parameters for the HPOM_VM_Alert method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
In st an ce: (Parse_HPOM_Alerts)
Contains configurable parameters for the Parse_ HPOM_Alerts method.
to_email_address - used to specify an email address in the case where vm's owner does not have an email address. To specify more than one email address, separate email addresses with commas.
from_email_address - used to specify an email address in the event the requester replies to the email.
signature - used to stamp the email with a custom signature.
Met h o d : (HPOM_EMS_Cluster_Alert)
This method is used to send HPOM Alerts based on Cluster
Met h o d : (HPOM_Ext_Management_System_Alert)
This method is used to send HPOM Alerts based on Provider.
Met h o d : (HPOM_Host_Alert)
This method is used to send HPOM Alerts based on Host.
Met h o d : (HPOM_MIQ_Server_Alert)
This method is used to send HPOM Alerts based on CloudForms Management Engine Server.
Met h o d : (HPOM_Storage_Alert)
This method is used to send HPOM Alerts based on Datastore.
Met h o d : (HPOM_VM_Alert)
This method is used to send HPOM Alerts based on Virtual Machine.
Met h o d : (Parse_HPOM_Alerts)
This method is used to parse incoming HPOM Alerts.
Class: IP Address Management (IPAM)
IPAM methods reside in this class.
In st an ce: Acquire IP Address (AcquireIPAddress)
Executes acquire_ip_address method.
120
In st an ce: Acquire MAC Address (AcquireMacAddress)
Executes acquire_mac_address method.
In st an ce: Called when Specified Instance is Missing (.missing)
Default instance.
In st an ce: Register ActiveDirectory (RegisterAD)
Executes register_ad method.
In st an ce: Register DNS (RegisterDNS)
Executes register_dns method.
In st an ce: Release DHCP (ReleaseDHCP)
Executes release_dhcp method.
In st an ce: Release IP Address (ReleaseIPAddress)
Executes release_ip_address method.
In st an ce: Release MAC Address (ReleaseMacAddress)
Recommended to be used for customer specific IPAM release of MAC address.
In st an ce: (ipam_release_ip_from_file)
Executes ipam_release_ip_from_file method.
Met h o d : Acquire IP Address (acquire_ip_address)
Used to acquire an IP Address from an IPAM Server.
Met h o d : Acquire MAC Address (acquire_mac_address)
Used to acquire a MAC Address.
Met h o d : Register ActiveDirectory (register_ad)
Used to register a VM in Active Directory.
Met h o d : Register DHCP (register_dhcp)
Used to register a VM in DHCP.
Met h o d : Register DNS (register_dns)
Used to register a VM in DNS.
Met h o d : Release DHCP (release_dhcp)
Used to release IP Address from DHCP.
Met h o d : Unregister DHCP (unregister_dhcp)
Used to unregister a VM from DHCP.
Met h o d : (ipam_release_ip_from_file)
Used to release an IP Address from an ASCII file living on an appliance.
Aut omat e Model
121
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Class: VMware SRM(SRM)
Integration with VMware SRM
In st an ce: (querySRM)
Executes querySRM method.
Met h o d : (querySRM)
Calls VMware SRM to query protected group information for a VM and then dynamically tags the vm based SRM information.
Inputs: $evm.root['vm']
Class: VMware VIX(VIX)
Integration with VMware VIX
In st an ce: (RunProgramInGuest)
Executes (RunProgramInGuest) method.
Met h o d : (RunProgramInGuest)
This method will run a program on a guest VM via VIX SDK/API./
B.5.1. Namespace: MIQ_IPAM
Namespace for MIQ IPAM.
Class: IPAM Database (IPAM_DB)
Class for IPAM Database instances.
In st an ce: (sample-10.0.0.10)
Class: (IPAM_Methods)
In st an ce: (IPAM_Acquire_from_MIQ)
Contains parameters and runs (IPAM_Acquire_from_MIQ) method.
In st an ce: (IPAM_Import)
Contains parameters and runs (IPAM_Import) method.
In st an ce: (IPAM_Release_from_MIQ)
Contains parameters and runs (IPAM_Release_from_MIQ) method.
Met h o d : (IPAM_Acquire_from_MIQ)
Acquires IP Address information from CloudForms Management Engine Automate Model.
Met h o d : (IPAM_Import)
Imports IPAM .csv file into CloudForms Management Engine Automate.
Met h o d : (IPAM_Release_from_MIQ)
Releases IP Address information from CloudForms Management Engine Automate Model.
122
Aut omat e Model
Met h o d : Sample (ipamdb_csv)
Sample ipam .csv file. Make necessary changes to this file and place in the /var/www/miq directory.
B.6. Namespace: Sample
Class: (Methods)
All methods in this class are samples only.
In st an ce: (InspectME)
Calls InspectMe method.
Met h o d : (CheckMulticast)
For future use.
Met h o d : (ConfigureChildDialog)
Sample method to configure/set child dialog values.
Met h o d : (InspectMe)
Returns all properties of specified object.
Met h o d : (PowerOn_DHOB)
Powers On During Hours of Business is triggered using a Custom Button and allows vms to be powered on only during business hours
Met h o d : (PreProvision_sample1)
Used to customize the provisioning object prior to provisioning.
Met h o d : (auto_tag)
Used to Auto Tag vms based on a CA ASCII file content extracted from VM SmartState Analysis.
Met h o d : (clone)
Run from "VM Lifecycle - Clone (vm_clone)".
Met h o d : (cluster_cpu_utilization)
Power on or off Grid Application vm based on an alert. Can be called in three ways; high cpu utilization, low cpu utilization, and hourly for business hours check.
Met h o d : (extend_retirement_date)
Add 14 days to retirement date when target vm has a retires_on value and is not already retired.
Met h o d : (group_specific_quotas)
Allows for specific quotas based on LDAP group membership.
Met h o d : (print_profiles)
Launched from "VM Lifecycle - Created (vm_created)".
123
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Met h o d : (vdi_reboot)
Reboots the VDI endpoint for a VM.
Met h o d : (vm2clone)
Clone a VM to a new VM using the perl CLI.
Met h o d : (vm2template)
Convert a VM to template using the perl CLI.
Met h o d : (vmname_sample1)
Names a VM with the following characteristics: XXDC-WOS-INP
Where:
XX = static 2 chars that will always be the prefix when naming a vm
DC = 3 char from Tag Category Datacenter
W = 1 char from Tag Category Function
OS = 3 for Win2K3 8 for Win2K8 based on Template
IN = 3 char user will be required to input from dialog where VM Naming was before. We have renamed and set limits on this dialog field accordingly.
$n(2) = 2 digit generated number 01, 02, 03
Met h o d : (vmname_sample2)
This method names the vm using the following: location}#{os_type}#{domain}$n{4}
Met h o d : (vmname_sample3)
This method names the vm based on tag category chosen in dialog.
Met h o d : (workload_manager)
For future use.
Class: (Service_Now_Methods)
Sample methods for use with Service-now.
Met h o d : (Create_CI)
Used to create a CMDB in Service-now.
Met h o d : (Create_CI_For_Host)
Used to create a CMDB in Service-now.
Met h o d : (Create_Incident)
Used to create an incident in Service-now.
Met h o d : (Tag_By_Application)
124
Aut omat e Model
Used to tag vms by application.
B.7. Namespace: Syst em
Class: Automation Requests (Requests)
In st an ce: (Cluster_Workload_Management)
Connects to /System/Event/Alert_Cluster_Workload_Management.
In st an ce: Default for Undefined Requests (.missing)
Default instance.
In st an ce: Host - EVM Provisioning Application (UI_Host_Provision_Info)
Connects request to
/EVMApplications/Provisioning/Profile/Host/${/#user.normalized_ldap_group}#${process#message}.
In st an ce: (Host_Evacuation)
Connects to /System/Event/Alert_Host_Evacuation.
In st an ce: (InspectME)
Connects request to /Sample/Methods/InspectME.
In st an ce: VM - EVM Provisioning Application (UI_Provision_Info)
Connects request to Group Profile
In st an ce: (VM_Alert_CPU_Ready)
Connects to VM_Alert CPU_Ready event.
In st an ce: (vm_retire_extend)
Connects to alert for retirement extension.
Class: Automation Starting Point(Process)
In st an ce: EVM Automation (Automation)
Connects to an instance in the Automation class.
In st an ce: EVM Events (Event)
Connects to instance in System/Event class.
In st an ce: EVM Requests (Request)
Connects to instance in System/Request class.
Met h o d : (parse_automation_request)
Used to parse incoming automation requests.
Class: Event (Event)
In st an ce: Alert Cluster Workload Management (Alert_Cluster_Workload_Management)
125
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Connects to
/EVMApplications/Operations/Intelligent_Workload_Management/Cluster_Workload_Management.
In st an ce: Alert Host Evacuation (Alert_Host_Evacuation)
Connects to
/EVMApplications/Operations/Intelligent_Workload_Management/Host_Evacuation.
In st an ce: Request Approved (request_approved)
Connects to /System/Policy/request_approved.
In st an ce: Request Created (request_created)
Connects to /System/Policy/request_created.
In st an ce: Default for Missing Events (.missing)
Unknown: General Email Alerts (Email_Alerts)
Connects to appropriate Alert under Alert/Email_Alerts.
Unknown: HP Operations Manager Alerts (HPOM_Alerts)
Connects to appropriate Alert under Integration/HPOM.
In st an ce: Request Denied (request_denied)
Connects to /System/Policy/request_denied.
In st an ce: Request Pending (request_pending)
Connects to /System/Policy/request_pending.
In st an ce: Request Starting (request_starting)
Connects to /System/Policy/request_starting.
In st an ce: Request Updated (request_updated)
Connects to /System/Policy/request_updated.
In st an ce: VM - Alert - CPU ready (VM_Alert_CPU_Ready)
Connects to
/EVMApplications/Operations/Intelligent_Workload_Management/VM_Placement_Optimization.
In st an ce: VM - Analysis Aborted (vm_scan_abort)
Connects to /Automation/Vm/${#vm_scan}?vm_id=${process#vm_id}&status=error.
In st an ce: VM - Analysis Complete (vm_scan_complete)
Connects to /Automation/Vm/${#vm_scan}?vm_id=${process#vm_id}&status=ok.
In st an ce: VM - Clone Complete (CloneVM_Task_Complete)
Connects to /Automation/Vm/${#logical_event}?vm_id=${process#dest_vm_id}.
In st an ce: VM - Create Complete (CreateVM_Task_Complete)
Connects to /Automation/Vm/${#logical_event}?vm_id=${process#vm_id}.
126
Aut omat e Model
In st an ce: VM - Creation (vm_create)
Connects to /Automation/VMLifecycle/Discovery?vm_id=${process#vm_id}.
In st an ce: VM - Powered Off (PowerOffVM_Task_Complete)
Connects to /Automation/Vm/${#logical_event}?vm_id=${process#vm_id}.
In st an ce: VM - Powered On (PowerOnVM_Task_Complete)
Connects to /Automation/vm/${#logical_event}?vm_id=${process#vm_id}.
In st an ce: VM - Provisioned (vm_provisioned)
Connects to /Alert/EmailNotifications/provision_complete_email.
In st an ce: VM - Retired (vm_retired)
Connects to /Alert/EmailNotifications/retirement_emails.
In st an ce: VM - Retirement Warning (vm_retire_warn)
Connects to /Alert/EmailNotifications/vm_retirement_emails.
In st an ce: VM - Start (vm_start)
Class: Policy (Policy)
In st an ce: (.missing)
In st an ce: Host Provision Request Created (MiqHostProvisionRequest_created)
Connects provision request to auto-approval.
In st an ce: Host Provision Request Starting (Miq HostProvisionRequest_starting)
Future use.
In st an ce: Host Provision Request Updated (Miq HostProvisionRequest_Updated)
Future use.
In st an ce: Provision Request Created (MiqProvisionRequest_created)
Connects provision request to profile and state machine.
In st an ce: Provision Request Starting (MiqProvisionRequest_starting)
Connects provision request to profile and state machine.
In st an ce: Provision Request Updated (MiqProvisionRequest_Updated)
Connects provision request to profile and state machine.
In st an ce: Request Approved (request_approved)
Connects to /Alert/EmailNotifications/requestapproved.
In st an ce: Request Created (request_created)
Gets request type and connects to appropriate request instance.
In st an ce: Request Denied (request_denied)
127
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Connects to /Alert/EmailNotifications/requestdenied.
In st an ce: Request Pending (request_pending)
Connects to /Alert/EmailNotifications/requestpending.
In st an ce: Request Starting (request_starting)
Gets request type and connects to appropriate request starting instance.
In st an ce: Request Updated (request_updated)
Gets request type and connects to appropriate request updated instance.
In st an ce: Request (request)
Executes auto_approve method.
In st an ce: Service Template Provision Request Created
(ServiceTemplateProvisionRequest_created)
Connects to profiles and state machines for service template provisioning.
In st an ce: VM Migration Request Created (VmMigrateRequest_created)
Connects request to auto-approval.
In st an ce: VM Migration Request Starting (VmMigrateRequest _starting)
Future use.
In st an ce: VM Migration Request Updated (VmMigrateRequest _Updated)
Future use.
Met h o d : (MiqHostProvision_Auto_Approve)
This method auto-approves the host provisioning request.
Met h o d : (VmMigrateRequest_Auto_Approve)
This method auto-approves the vm migration request.
Met h o d : (get_request_type)
Used to get the incoming request type.
128
FAQs and Flows
C.1. Phase 1: Creat e Provision Request
FAQ s and Flows
Q u est io n
Where do I create a new provisioning profile based on a users LDAP group?
Where can I specify a pre-dialog to present to a
Requester in their LDAP group?
I would like to customize our dialogs. Where are all the dialogs kept?
What happens if I do not specify any profiles for provisioning?
An swer
Navigate to
[/EVMApplications/Provisioning/Profile/Group].
This is where you can create group profiles.
Custom pre-dialogs can be defined in
[/EVMApplications/Provisioning/Profile/Group/<
LDAP Group Name>].
All dialogs are located on each CloudForms
Management Engine Appliance in the
[/var/www/miq/vmdb/db/fixtures] directory.
CloudForms Management Engine searches for a matching LDAP group in the
[/EVMApplications/Provisioning/Profile/Group] class, if an LDAP profile is NOT found then
CloudForms Management Engine will use the
[/EVMApplications/Provisioning/Profile/Group/.m
issing] class instance.
C.2. Phase 2: Request Approval
129
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Q u est io n
Where can I specify auto-approval values on a per virtual machine template basis?
Where can I modify the default Auto-Approval values?
How can I customize the email that is sent when a request is approved?
How can I customize the email that is sent when a request is denied?
How can I customize the email that is sent when a request is not Auto-approved?
If a Request Approval requires manual approval, how does an Approver approve the request?
An swer
Tags can be assigned to templates in the form of
[prov_max_vms, prov_max_cpus, prov_max_memory, prov_max_retirement_days].
These values can be set in the
[/Factory/StateMachines/ProvisionRequestAppr oval/Default] class instance.
The Request Approved email message can be modified in
[/Alert/EmailNotifications/request_approved].
The Request Denied email message can be modified in
[/Alert/EmailNotifications/request_denied].
The Request Pending email message can be modified in
[/Alert/EmailNotifications/request_pending].
Log into CloudForms Management Engine as an approver/admin and Navigate to [Virtual
Machines/Requests] and then click on the request.
C.3. Phase 3: Quot a Validat ion
Q u est io n
Where in CloudForms Management Engine can I set default quota thresholds for users and groups?
An swer
These values can be set in the
[/Factory/StateMachines/ProvisionRequestQuot aVerification/Default] class instance.
130
FAQ s and Flows
Q u est io n
Where in CloudForms Management Engine can I set individual and group quota thresholds?
Where can I customize the way our virtual machines are named?
How can I customize the email that is sent when a request is denied?
An swer
Tags can be assigned to groups or users by navigating to Wrench\Configuration\Access
Control . The following are valid tags that can be assigned to group or individual users:
[quota_max_cpu, quota_max_memory, quota_max_storage].
Virtual machine naming conventions can be altered using the methods in the
[/EVMApplications/Provisioning/Naming] class.
The Request Denied email message can be modified in the
[/Alert/EmailNotifications/request_denied.
C.4 . Phase 4 : Provisioning
Fig u re C.1. T arg et T yp e: Clo n in g a T emp lat e t o a Virt u al Mach in e
131
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Fig u re C.2. T arg et T yp e: Clo n e t o T emp lat e
Q u est io n
Where can I customize the email message that is sent upon provisioning completion?
Where can I change what is put into the virtual machines Annotation after provisioning?
Where do I set the default VC folder location for provisioning virtual machines?
Where can I modify the virtual machine customization spec mapping?
Where can I modify the Clone_to_Template state_machine?
Where can I modify the Clone_to_VM state_machine?
An swer
This can be customized using the
[/Alert/EmailNotifications/provision_complete_em ail].
These settings can be modified by leveraging the [/Factory/VM/PreProvision] Ruby method.
This can be modified by leveraging the
[/Factory/VM/PreProvision] Ruby method.
This can be modified by leveraging the
[/Factory/VM/PreProvision] Ruby method.
Navigate to the
[/Factory/StateMachines/VMProvision_Template/
Default] class instance.
Navigate to the
[/Factory/StateMachines/VMProvision_VM/clone
_to_vm] class instance.
C.5. Phase 5: Ret irement
132
FAQ s and Flows
Q u est io n
Where can I customize the email message that is sent upon completion of virtual machine retirement?
Where can I customize the email message that is sent during virtual machine retirement warnings?
If I want to customize what gets called during the retirement phase where should I look?
How can I extend the virtual machine retirement date an additional number of days?
An swer
This can be customized using the
[/Alert/EmailNotifications/retirement_emails].
This can be customized using the
[/Alert/EmailNotifications/retirement_emails].
Navigate to the
[/Factory/StateMachines/VMRetirement/Default] class instance.
Create a custom button for virtual machines that launches [/System/Request/vm_retire_extend].
Then navigate to the
[/Alert/EmailNotifications/vm_retire_extend] Ruby method and set the vm_retire_extend_days value.
133
Red Hat CloudForms 3.0 Management Engine 5.2 Lifecycle and Aut omat ion G uide
Inline Method to Create a Provision Request
D.1. Ruby met hod
# CloudForms Management Engine Automate Method
#
$evm .log( "info" , "CloudForms Management Engine Automate Method Building
VM Provisioning Request Started" )
#
prov
= $evm .root
[ 'miq_provision' ]
# arg1 = version
args
= [ '1.1' ]
# arg2 = templateFields
args
<< "name=App"
# arg3 = vmFields
args
<< 'vm_name=CRM_APP|request_type=template'
#args <<
'vm_name=service_test2|request_type=template|placement_host_name=esx.asdf
.com'
#args << 'request_type=template'
# arg4 = requester
args
<<
'owner_email=admin@ asd.com|owner_last_name=Admin|owner_first_name=Admin| user_name=admin'
#args << 'user_name=crm'
# arg5 = tags
args
<< 'crm=true'
# arg6 = WS Values
args
<< nil
# arg7 = emsCustomAttributes
args
<< nil
# arg8 = miqCustomAttributes
args
<< nil
$evm .log( "info" , "Building provisioning request with the following arguments: < #{ args.inspect
} >" )
result
= $evm .execute( 'create_provision_request' , * args)
134
Revision Hist ory
Revision History
Revisio n 1.5- 0 Wed Feb 4 2015
Update product name to Red Hat CloudForms
Clo u d Fo rms Do cs T eam
Revisio n 1.4 - 0 T u e No v 11 2014 Brian Mo ss
BZ #1140911 - Correct name and directory of Windows SmartProxy service
Revisio n 1.3- 0 Fri Ju ly 25 2014 Su yo g Sain kar
BZ #1077438 - Modified heading style for consistency
BZ #1093476 - Included information about the option to configure VLAN
BZ #1092142 - Updated example in the concept in A.5. Provider Properties.
Made QE changes as per Bug 1030778 - Add About this Guide sections
BZ #1062093 - Fix typo BZ #1042691 - Updated references about PXE implementation
BZ #1042691 - Updated references about PXE implementation
Revisio n 1.2- 0 Mo n Feb 24 2014 Brian Mo ss
CloudForms 3.0.2 (CFME 5.2.2) release
BZ #1050951 - Update description of SmartProxy in Terminology section
BZ #1012541 - Clarify instructions for automatic approval of provisioning
BZ #1066160 - Correct description of the max_vms attribute
BZ #1059841 - Fix typo in Requirements for Provisioning a Host section
BZ #1012541 - Clarify language for global default settings
BZ #1049539 - Remove option to type a retirement date
Marking up N/C/M/I as bold in Automate Model
Adding new Author Group file
Revisio n 1.1- 0 Mo n O ct 14 2013 Dan Macp h erso n
Implemented QE Review for BZ #1009624, BZ #1012081, BZ #1012229, BZ #1012749, BZ #1005847,
BZ #1016051, BZ #1016030, BZ #1014504, BZ #1014541, BZ #1014539, BZ #1014538, BZ #1014536,
BZ #1014551, BZ #1012236
Fixing highlighting for automate method
Updating Product and Component for Feedback page
New methods added to the Settings and Ops Guide
Default password added to Quick Start Guide
Revision of some provisioning sections
Revisio n 1.0- 0
Creation of first draft
Fri Au g 23 2013 Dan Macp h erso n
135
广告