ManageIQ 6.0 5.2 Management Engine Guide
ManageIQ Management Engine 6.0 5.2 is a software solution that provides insight, control, and automation for managing virtual environments.
advertisement
Assistant Bot
Need help? Our chatbot has already read the manual and is ready to assist you. Feel free to ask any questions about the device, but providing details will make the conversation more productive.
ManageIQ 6.0
Management Engine 5.2
Lifecycle and Automation
Guide
Provisioning, Workload Management, Orchestration
Edition 1
ManageIQ Documentation Team
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Provisioning, Workload Management, Orchestration
Edition 1
ManageIQ Documentation Team
Legal Notice
Copyright © 2014 Red Hat.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section
4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
Java ® is a registered trademark of Oracle and/or its affiliates.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
All other trademarks are the property of their respective owners.
Abstract
This guide provides instructions for provisioning, service creation, and automation in ManageIQ
Management Engine. Information and procedures in this book are relevant to ManageIQ Management
Engine adminitrators.
Table of Contents
Table of Contents
6
6
6
7
8
2. Getting Help and Giving Feedback
8
8
8
10
10
11
11
15
16
16
16
Chapter 3. Provisioning Requests
3.1. Requirements for Provisioning Virtual Machines and Instances
18
18
3.1.1. Requirements for Provisioning Virtual Machines from VMware Providers
3.1.2. Requirements for Provisioning Virtual Machines from Red Hat Enterprise Virtualization
18
19
3.1.3.2. Connecting to a PXE Server
3.1.3.3. Creating System Image Types for PXE
3.1.3.4. Setting the PXE Image Type for a PXE Image
3.1.4.2. Adding an ISO Datastore
3.1.4.3. Refreshing an ISO Datastore
3.1.4.4. Creating System Image Types for ISO
3.1.4.5. Setting the Image Type for an ISO Image
3.1.5. Customization Templates for Virtual Machine and Instance Provisioning
3.1.5.1. Customization Script Additions for Virtual Machine and Instance Provisioning
3.1.5.2. Adding a Customization Template
3.2. Requirements for Provisioning a Host
3.2.1.2. Discovering the Management Interface for an IPMI Host
3.2.1.3. Adding IPMI Credentials to a Discovered Host
3.2.1.4. Adding the Management Interface for an IPMI Host
3.2.2. Customization Templates for Host Provisioning
3.2.2.1. Customization Script Additions
3.2.2.2. Adding a Customization Template
3.4. Provisioning Virtual Machines
3.4.1. Provisioning a Virtual Machine from a Template
3.4.2. Cloning a Virtual Machine (VMware Virtual Machines Only)
3.4.3. Publishing a Virtual Machine to a Template (VMware Virtual Machines Only)
3.5.1. Provisioning an Instance from an Image
20
20
20
40
41
41
41
22
23
23
23
24
24
24
25
26
26
27
28
29
29
29
30
30
31
31
31
32
35
35
1
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
3.6. Customizing Provisioning Dialogs
3.6.1. Customizing Provisioning Dialogs
3.6.2. Adding a Provision Dialog for all Users
3.6.3. Creating a Custom Provision Dialog
3.7.2. Creating a Provisioning Profile Instance
3.7.3. Using Tags to set a Scope for Provisioning
Chapter 4. Working with Requests
4.1. Provisioning Request Approval Methods
48
48
4.2. Working with Provisioning Requests
4.3. Reloading the Status of Provisioning Requests
4.4. Approving a Provisioning Request
48
48
48
48
49
4.5. Denying a Provisioning Request
4.6. Copying a Provisioning Request
4.7. Editing a Provisioning Request
4.8. Deleting a Provisioning Request
4.9. Automatically Approving Requests
4.9.1. Automatically Approving Requests
4.9.2. Enabling Global Defaults for Automatic Approval
49
49
50
50
50
4.9.3. Template Specific Approval Defaults
4.9.4. Assigning Tags to a Template for Auto Approval
4.10. Setting Provisioning Notification Email Addresses
52
52
53
5.1.2. Default Execution Steps in States Instance
5.2.2. Editing the Default Quota
5.2.3. Using Tags for Owner and Group Quotas
5.2.4. Applying a Tag to a User or User Group
5.3.2. Customizing Provisioning States
5.3.3. Editing the Default States Instance
5.3.4. Viewing the Status of a Provisioning Request
5.3.5. Viewing a Provisioned Virtual Machine or Instance
5.3.6. Viewing a Virtual Machine or Instance Summary
56
56
58
58
58
59
59
54
54
54
54
54
54
55
55
56
6.1. About Catalogs and Services
6.3.2. Creating a Catalog Item
6.3.3.2. Adding a Service Dialog
6.3.4.1. Creating a Method to Associate with the Dialog
6.3.4.2. Creating a Method in the Factory/Service Class
6.3.4.3. Creating an Instance in the Factory/Service Class
6.3.4.4. Associating a Method with an Automate Instance
6.3.4.5. Creating a Catalog Bundle
6.3.4.6. Provisioning a Service
62
62
64
64
66
66
67
67
68
60
60
60
60
60
61
62
42
42
43
43
45
45
45
47
2
Table of Contents
7.1. Retiring Virtual Machines
69
69
7.1.1. Retiring Virtual Machines and Instances
7.1.2. Using the ManageIQ Management Engine Console to Retire
7.1.3. Retiring a Virtual Machine Immediately
7.1.4. Setting a Retirement Date for a Virtual Machine or Instance
7.1.5. Removing a Retirement Date for a Virtual Machine or Instance
69
69
69
69
70
70
7.2. Setting Retirement in a Provision Request
7.2.1. Setting Retirement in a Provision Request
7.2.2. Scheduling Retirement in a Provision Request
7.3. Extending Retirement Dates
7.3.1. Creating a Custom Button to Extend Retirement
7.3.2. Changing the Number of Days to Extend Retirement
70
70
71
71
71
8.4. Creating a Schema for a Class
8.5. Editing a Field in a Schema
8.7. Adding an Instance to a Class
8.8.2. Table: Relationship Examples
8.9.2. Installing a Windows SmartProxy for PowerShell
8.10.2. Simulating an Automate Model
8.11. Importing, Exporting, and Resetting the Datastore
8.11.1. Importing, Exporting, and Resetting the Datastore
8.11.2. Exporting All Datastore Classes
8.11.3. Importing Datastore Classes
8.11.4. Resetting Datastore to Default
76
76
77
77
77
78
78
74
75
75
76
76
73
73
73
73
78
78
79
79
80
80
80
9.2. Invoking Automate using a Custom Button
9.3. Creating a Custom Button Group
9.4. Creating a Custom Button
9.6. Deleting a Custom Button
9.8. Initiating Automate from an Event
9.8.1. Initiating Automate from an Event
9.8.2. Creating a Policy for Automate
9.8.3. Creating a Custom Automate Action
A.1. Virtual Machine Properties
A.2. ManageIQ Management Engine Methods for use in Ruby Scripts
81
81
81
81
82
82
83
83
83
83
84
85
86
86
88
89
89
91
3
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
92
94
94
B.3. Namespace: EVMApplications
B.3.2. Namespace: Provisioning
100
100
100
101
102
103
B.4.1. Namespace: StateMachines
105
111
114
118
119
121
C.1. Phase 1: Create Provision Request
126
126
C.2. Phase 2: Request Approval
C.3. Phase 3: Quota Validation
126
127
128
129
131
4
Table of Contents
5
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Preface
1. Document Conventions
This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.
In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The
Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later include the Liberation
Fonts set by default.
1.1. Typographic Conventions
Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.
Mono-spaced Bold
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_bestselling_novel in your current working directory, enter the cat my_next_bestselling_novel 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 Ctrl+Alt+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 mono-spaced bold. For example:
File-related classes include filesystem for file systems, file for files, and dir for directories. Each class has its own associated set of permissions.
Proportional Bold
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 System → Preferences → Mouse from the main menu bar to launch Mouse
Preferences. In the Buttons tab, select the Left-handed mouse check box and click
Close 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 gedit file, choose Applications → Accessories →
Character Map from the main menu bar. Next, choose Search → Find… from the
6
Preface
Character 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 Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the Copy button. Now switch back to your document and choose Edit → Paste from the gedit 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 example.com and your username on that machine is john, type
ssh [email protected].
The
mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount
/home.
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-quote Conventions
Terminal output and source code listings are set off visually from the surrounding text.
Output sent to a terminal is set in mono-spaced roman 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 mono-spaced roman but add syntax highlighting as follows: package org.
jboss .
book .
jca .
ex1 ; import javax.naming.InitialContext; public class ExClient
{ public static void main (String args[]) throws Exception
{
InitialContext iniCtx = new InitialContext();
Object ref = iniCtx.
lookup ( "EchoBean" );
7
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
EchoHome home = (EchoHome) ref;
Echo echo = home.
create ();
System.
out .
println ( "Created Echo" );
System.
out .
println ( "Echo.echo('Hello') = " + echo.
echo ( "Hello" ));
}
}
1.3. Notes 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. Getting Help and Giving Feedback
2.1. Do You Need Help?
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.
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.
2.2. Give us Feedback
If you find a typographical error, or know how this guide can be improved, we would love to hear from you.
Submit a report in Bugzilla against the product ManageIQ Management Engine and the component
Documentation. The following link will take you to a pre-filled bug report for this product:
8
Preface https://bugzilla.redhat.com/ .
Fill out the following template in Bugzilla's Description field. Be as specific as possible when describing the issue; this will help ensure that we can fix it quickly.
Document URL:
Section Number and Name:
Describe the issue:
Suggestions for improvement:
Additional information:
Be sure to give us your name so that you can receive full credit for reporting the issue.
9
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Chapter 1. Introduction to ManageIQ
Red Hat ManageIQ 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.
ManageIQ 3.0 is comprised of a single component, the ManageIQ 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. Architecture
The diagram below describes the capabilities of ManageIQ Management Engine. Its features are designed to work together to provide robust management and maintenance of your virtual infrastructure.
Figure 1.1. Features
The architecture comprises the following components:
The ManageIQ Management Engine Appliance (Appliance) which is supplied as a secure, highperformance, preconfigured virtual machine. It provides support for Secure Socket Layer (SSL) communications.
The ManageIQ Management Engine Server (Server) resides on the Appliance. It is the software layer
10
Chapter 1. Introduction to ManageIQ 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 ManageIQ 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. Requirements
To use ManageIQ 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) [1]
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 ManageIQ 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.
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, ManageIQ
Management Engine does not guarantee that the browser's Back button will produce the desired results. ManageIQ Management Engine recommends using the breadcrumbs provided in the
Console.
1.3. Terminology
The following terms are used throughout this document. Review them before proceeding.
11
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Account Role
A designation assigned to a user allowing or restricting a user to parts and functions of the
ManageIQ Management Engine console.
Action
An execution that is performed after a condition is evaluated.
Alert
ManageIQ 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.
Analysis Profile
A customized scan of hosts, virtual machines, or instances. You can collect information from categories, files, event logs, and registry entries.
Cloud
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.
ManageIQ Management Engine Appliance
A virtual machine on which the virtual management database (VMDB) and ManageIQ
Management Engine server reside.
ManageIQ Management Engine Console
A web-based interface into the ManageIQ Management Engine Appliance.
ManageIQ Management Engine Role
A designation assigned to a ManageIQ Management Engine server that defines what a
ManageIQ Management Engine server can do.
ManageIQ Management Engine Server
The application that runs on the ManageIQ Management Engine Appliance and communicates with the SmartProxy and the VMDB.
Cluster
Hosts that are grouped together to provide high availability and load balancing.
Condition
A test of criteria triggered by an event.
Discovery
Process run by the ManageIQ Management Engine server which finds virtual machine and cloud providers.
Drift
The comparison of a virtual machine, instance, host, cluster to itself at different points in time.
12
Chapter 1. Introduction to ManageIQ
Event
A trigger to check a condition.
Event Monitor
Software on the ManageIQ Management Engine Appliance which monitors external providers for events and sends them to the ManageIQ Management Engine server.
Host
A computer on which virtual machine monitor software is loaded.
Instance/Cloud Instance
A on-demand virtual machine based upon a predefined image and uses a scalable set of hardware resources such as CPU, memory, networking interfaces.
Managed/Registered 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.
Managed/Unregistered VM
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.
Provider
A computer on which software is loaded which manages multiple virtual machines that reside on multiple hosts.
Policy
A combination of an event, a condition, and an action used to manage a virtual machine.
Policy Profile
A set of policies.
Refresh
A process run by the ManageIQ 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.
Resource
A host, provider, instance, virtual machine, repository, or datastore.
Resource Pool
A group of virtual machines across which CPU and memory resources are allocated.
Repository
A place on a datastore resource which contains virtual machines.
13
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
SmartProxy
The SmartProxy is a software agent that acts on behalf of the ManageIQ Management Engine
Appliance to perform actions on hosts, providers, storage and virtual machines.
The SmartProxy can be configured to reside on the ManageIQ Management Engine Appliance or on an ESX server version. The SmartProxy can be deployed from the ManageIQ 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 ManageIQ Management
Engine Appliance. If the SmartProxy is not embedded in the ManageIQ Management Engine server, it communicates with the ManageIQ Management Engine Appliance over HTTPS (SSL) on standard port 443.
SmartState Analysis
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 ManageIQ Management Engine server on hosts and clusters. The data is stored in the VMDB.
SmartTags
Descriptors that allow you to create a customized, searchable index for the resources in your clouds and infrastructure.
Storage Location
A device, such as a VMware datastore, where digital information resides that is connected to a resource.
Tags
Descriptive terms defined by a ManageIQ Management Engine user or the system used to categorize a resource.
Template
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.
Unmanaged Virtual Machine
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 ManageIQ 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.
Virtual Machine
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.
Virtual Management Database (VMDB)
Database used by the ManageIQ Management Engine Appliance to store information about your resources, users, and anything else required to manage your virtual enterprise.
14
Chapter 1. Introduction to ManageIQ
Virtual Thumbnail
An icon divided into smaller areas that summarize the properties of a resource.
1.4. About this 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 on an "as needed" basis. It discusses how to create a request and how to customize the dialogs displayed.
Working with Requests describes manual, automatic, and external request approval processes.
Fulfilling Requests shows 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 operation activities.
Invoking Automate describes the options for initiating an automate workflow.
http://www.mozilla.org/en-US/firefox/organizations/faq/
15
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Chapter 2. ManageIQ Management Engine Lifecycle
This guide discusses lifecycle activities such as provisioning and retirement that are part of the ManageIQ
Management Engine Automate component. ManageIQ 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 Automation Engine server role enabled. Check your server role settings in Configure → Configuration → Server → Server Control.
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 ManageIQ Management Engine.
2.2. Automation
ManageIQ 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 ManageIQ 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 ManageIQ Management
Engine Control and ManageIQ Management Engine Automate to drive the management of this workflow.
16
Chapter 2. ManageIQ Management Engine Lifecycle
Power on only during business hours - An organization which gave a group of self-service users
ManageIQ Management Engine access had a requirement to only allow certain virtual machines to be powered during business hours. This was solved with ManageIQ 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
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Chapter 3. Provisioning Requests
This chapter will discuss using ManageIQ 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. Requirements for Provisioning Virtual Machines and Instances
3.1.1. Requirements for Provisioning Virtual Machines from VMware
Providers
To provision a virtual machine from VMware providers, you will require the following in addition to the
ManageIQ 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:\Documents and
Settings\All Users\Application Data\VMware\VMware VirtualCenter\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.
Note
If you are running a standard Win2008 operating system, this step is unnecessary as Sysprep is included as standard.
18
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
Chapter 3. Provisioning Requests 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. Requirements for Provisioning Virtual Machines from Red Hat
Enterprise Virtualization Manager
Below are the requirements for using
Red Hat Enterprise Virtualization Manager with ManageIQ
Management Engine:
Table 3.1. Red Hat Enterprise Virtualization Manager configuration requirements for
ManageIQ Management Engine
Item
Red Hat Enterprise Virtualization Manager version
3.0
Red Hat Enterprise Virtualization Manager History
Database
Requirements
Red Hat Enterprise Virtualization Manager properly installed with API in default location
(https://server:8443/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 ManageIQ
Management Engine Appliances in
pg_hba.conf.
PostgreSQL set to listen for connections on
*:5432 in postgresql.conf.
Credentials provided during database setup to be used in ManageIQ Management Engine UI.
Storage Supported for ManageIQ Management
Engine Virtual Machine Analysis
NFS - ManageIQ 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 ManageIQ Management Engine
Appliance in each Cluster with this storage type.
ManageIQ 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).
19
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
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
ManageIQ 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
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 Provisioning
PXE is a boot method that allows you to load files from across a network link. ManageIQ 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 PXE Server.
Create a System Image Type.
Associate each PXE image with an image type.
Create a customization template.
3.1.3.2. Connecting to a PXE Server
The following procedure connects to a PXE server and adds its details to ManageIQ Management Engine.
20
Chapter 3. Provisioning Requests
Procedure 3.1. To connect to a PXE server
1. Navigate to
Infrastructure → PXE.
2. Click (
Configuration), then
(
Add a New PXE Server).
3. In
Basic Information, type a Name that will be meaningful in your environment.
4. For Depot Type, select either Network File System (NFS) or Samba. The fields to enter in the dialog depend on the Depot Type.
For NFS, type in the URI, Access URL, PXE Directory, Windows Images Directory and
Customization Directory. When you provision, ManageIQ Management Engine writes a text file to the PXE Directory. 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
Windows Images Directory is where the files are located on your NFS for the provisioning of Windows operating systems. The
Customization Directory is where your Kickstart and Sysprep files are located.
If using a Depot Type of Samba, you will not need Access URL, but you will need a User
ID, and Password, in addition to the items required for NFS.
5. For
PXE Image Menus, type the filename for the PXE Boot menu.
6. Click
Add.
7. Select the new PXE server from the tree on the left, and click (
Configuration), then
( Refresh) to see your existing images.
21
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
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. Creating System Image Types for PXE
The following procedure creates a system image type for PXE servers.
Procedure 3.2. To Create System Image Types
1. Navigate to Infrastructure → PXE.
2. Click the System Image Types accordion.
3. Click
Configuration, then (Add a new System Image Type).
4. In Basic Information, type in a Name and select a Type.
22
Use Host 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
Add.
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.
Chapter 3. Provisioning Requests
3.1.3.4. Setting the PXE Image Type for a PXE Image
The following procedure sets the image type for a chosen PXE image.
Procedure 3.3. To Set the PXE Image Type for a PXE Image
1. Navigate to Infrastructure → PXE.
2. Click the PXE Servers accordion and select the image that you want to set a type for.
3. Click (Configuration), then (Edit this PXE Image).
4. From the Basic Information area, select the correct type. If this PXE image will be used as the
Windows Boot Environment, check Windows Boot Environment. At the time of this writing, only one PXE Image can be identified as the
Windows Boot Environment. Therefore, checking one as the Windows Boot Environment, will remove that from any other PXE image with that check.
5. Click Save.
3.1.4. ISO Provisioning
3.1.4.1. ISO Provisioning
ManageIQ Management Engine also allows ISO provisioning from
Red Hat Enterprise
Virtualization Manager datastores. To use this feature, you will need to do the following before creating a provision request.
Procedure 3.4. To Prepare for an ISO Provision Request
1. Add the ISO Datastore. The Red Hat Enterprise Virtualization Manager system must have already been discovered or added into the VMDB. For more information, see the
Insight
Guide.
2. Refresh the
ISO Datastore.
3. Create a
System Image Type.
23
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
4. Set the ISO Image Type.
5. Create a customization template.
3.1.4.2. Adding an ISO Datastore
The following procedure adds an ISO Datastore from your Red Hat Enterprise Virtualization environment.
Procedure 3.5. To Add an ISO Datastore
1. Navigate to
Infrastructure → PXE.
2. Click the
ISO Datastores accordion.
3. Click
(Configuration), (Add a new ISO Datastore).
4. Select the Red Hat Enterprise Virtualization Manager Provider hosting the ISO Datastore.
5. Click Add.
Result:
The ISO datastore is added to ManageIQ Management Engine.
3.1.4.3. Refreshing an ISO Datastore
The following procedure refreshes the chosen ISO datastore and updates ManageIQ Management
Engine with available ISOs.
Procedure 3.6. To Refresh the ISO Datastore
1. Navigate to
Infrastructure → PXE.
2. Click the
ISO Datastores accordion, and select an ISO datastore.
3. Click
(Configuration), then click (Refresh).
3.1.4.4. Creating System Image Types for ISO
The following procedure creates a system image type for ISO Servers.
Procedure 3.7. To Create System Image Types
1. Navigate to Infrastructure → PXE.
2. Click the System Image Types accordion.
3. Click (Configuration), then (Add a new System Image Type).
4. In Basic Information, type in a Name and select a Type.
24
Chapter 3. Provisioning Requests
Use Host 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 Add.
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. Setting the Image Type for an ISO Image
The following procedure sets the image type for an ISO image.
Procedure 3.8. To Set the Image Type for an ISO Image
1. Navigate to Infrastructure → PXE.
2. Click the
PXE Servers accordion, and select the image that you want to set a type for.
3. Click
(Configuration), then (Edit this ISO Image).
4. From the
Basic Information area, select the correct Type.
25
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
5. Click
Save.
3.1.5. Customization Templates for Virtual Machine and Instance
Provisioning
Add a customization template to provide Kickstart, Cloudinit, 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 Provisioning Dialogs provided by ManageIQ Management Engine.
Note the following additional requirements if you are performing PXE or ISO provisioning:
ISO Provisioning requires that the
Kickstart file be named ks.cfg
ISO Provisioning requires that the new virtual machine must be set to power down after provisioning is complete.
When you get to the Catalog page in the Provisioning Dialogs, be sure to select Provision
Type of ISO or PXE as appropriate.
3.1.5.1. Customization Script Additions for Virtual Machine and Instance
Provisioning
Table 3.2. List of Customization Script Additions for Virtual Machine Provisioning
Custo mizatio n Type
Reason to
Include
Kickstart Takes the values from the
Customize tab in
Provisioning
Dialog and substitutes them into the script.
Script entries
#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
26
Chapter 3. Provisioning Requests password from the
Customize tab in the
Provisioning
Dialog.
Kickstart Sends status of the provision back to
ManageIQ
Management Engine
Server for display in the ManageIQ
Management Engine
Console.
Sysprep Encrypts the root password from the
Customize tab in the
Provisioning
Dialog. The value for the
AdministratorPa
ssword line must be inserted to use the password from the
Provision
Dialog 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>
3.1.5.2. Adding a Customization Template
Procedure 3.9. To Add a Customization Template
1. Navigate to
Infrastructure → PXE.
2. Click the
Customization Templates accordion.
3. Click
(Configuration), (Add a new Customization Template).
4. In Basic Information, type in a Name and Description.
27
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
5. Select the Image Type. This list should include the PXE image types you created.
6. In Type, select Kickstart or Cloudinit for Linux based systems, and Sysprep for Windows based system.
7. In the
Script area, either paste the script from another source or type the script directly into the
ManageIQ Management Engine interface.
8. Click Add.
Note
The default dialogs show all possible parameters for provisioning. To limit the options shown, see
Customizing Provisioning Dialogs.
3.2. Requirements for Provisioning a Host
ManageIQ Management Engine can provision hosts using PXE and Intelligent Platform Management
Interface (IPMI) technologies. To do this, complete the following steps before you provision your first host.
When creating a provisioning request, you may want to limit which hosts, datastores, and templates, a group can choose from. To do this, create a tag value with the exact name of the user group for the
Provisioning Scope Category. 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.
28
Chapter 3. Provisioning Requests
Important
Provisioning requires the
Automation Engine server role enabled. Check your server role settings in Configure → Configuration → Server → Server Control. In addition, set the
Provisioning Scope tag to All, for a provider, a host, and then a data store.
Procedure 3.10. To Provision a Host
1. Make a PXE server accessible to the ManageIQ Management Engine server.
2. Create a customization template for hosts. This customization template must contain host-specific 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 ManageIQ Management Engine
Infrastructure.
3.2.1. IPMI Hosts
3.2.1.1. IPMI Hosts
There are two ways to get the Intelligent Platform Management Interface (IPMI) Host into the VMDB. You can either use the ManageIQ Management Engine's discovery process or add the host using its IP address and credentials.
3.2.1.2. Discovering the Management Interface for an IPMI Host
Procedure 3.11. To Discover the Management Interface for a IPMI Host
1. Navigate to
Infrastructure → Hosts.
2. Click
(Configuration), then (Discover Hosts).
3. In
Discover, check IPMI.
4. Optionally, in
IPMI Credentials, type in a User ID and Password.
Note
You can also add IPMI credentials after the host has been discovered. See
Adding IPMI
Credentials to a Discovered Host.
5. In
Subnet Range, type in a range of IP addresses. For quickest results, use the actual IP address in both fields.
6. Click Discover.
29
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Note
After the host is discovered, you can add credentials for IPMI.
3.2.1.3. Adding IPMI Credentials to a Discovered Host
After discovering an IPMI host, add the credentials using the following procedure.
Procedure 3.12. To Add IPMI Credentials
1. Navigate to Infrastructure → Hosts.
2. Click on the host you want to edit.
3. Click (Configuration), and then (Edit this Host).
4. In the Credentials area, IPMI tab, type in the IPMI credentials a. Use User ID to specify a login ID.
b. Use Password to specify the password for the user ID.
c. Use Verify Password to confirm the password.
5. Click Validate to test the credentials.
6. Click
Save.
3.2.1.4. Adding the Management Interface for an IPMI Host
Procedure 3.13. To Add the Management Interface for the IPMI Host
1. Navigate to Infrastructure → Hosts.
2. Click (Configuration), then (Add a New Host).
3. In Basic Information, type in a Name and the IPMI IP address.
4. In the Credentials area, under IPMI tab, type in the IPMI credentials a. Use User ID to specify a login ID.
5. Click Validate to test the credentials.
6. Click Add.
Result:
b. Use Password to specify the password for the User ID.
c. Use Verify Password to confirm the password.
The IPMI host is added to the ManageIQ Management Engine environment; an operating system can now be provisioned onto it.
30
Chapter 3. Provisioning Requests
3.2.2. Customization Templates 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
ManageIQ Management Engine.
3.2.2.1. Customization Script Additions
Table 3.3. Customization Script Additions
Customization
Type
Kickstart
Reason to
Include
Takes the values from the
Customize tab in
Provisioning
Dialog and substitutes them into the script.
Script entries
#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
Customize tab in the
Provisioning
Dialog.
rootpw --iscrypted <%=
MiqPassword.md5crypt(evm[:root_password])
%>
Kickstart Sends status of the provision back to
ManageIQ
Management Engine for display in the
ManageIQ
Management Engine
Console.
# Callback to EVM during post-install wget --no-check-certificate <%= evm[:callback_url_on_post_install] %>
3.2.2.2. Adding a Customization Template
Procedure 3.14. To Add a Customization Template
31
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
1. Navigate to Infrastructure → PXE.
2. Click the Customization Templates accordion.
3. Click (Configuration), then (Add a New Customization Template).
4. In
Basic Information, type in a Name and Description.
5. Select the Image Type dropdown. This list should include the PXE image types you created.
6. In Type, select Kickstart or Cloudinit for Linux based systems, and Sysprep for Windows based system.
7. In the
Script area, either paste the script from another source or type the script directly into the
ManageIQ Management Engine interface.
8. Click Add.
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 ManageIQ Management Engine Automate method automatically switch the selected template in the provision object.
32
Chapter 3. Provisioning Requests
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 ManageIQ
Management Engine.
Procedure 3.15. To Provision a Host
1. Navigate to
Infrastructure → Hosts.
2. Select a host with IPMI enabled.
3. Click
(Lifecycle), then (Provision Hosts).
4. In
Request Information, type in at least a First 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 ManageIQ Management Engine server is configured to use LDAP, you can use the
Look Up button to populate the other fields based on the email address.
5. On the Purpose page, select the appropriate tags for the provisioned host.
33
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
6. On the Catalog page, select the hosts to provision.
In the Host area, select the hosts you want to provision
In the PXE area, select the PXE server and image.
7. On the Customize page, you can select how you might want to customize the operating system of the new host. These options vary based on the operating system to be provisioned.
Use Credentials to type in a root password
In the IP Address area, select either Static or DHCP and enter any other address information you need. If needed, type in DNS specifications.
Under Customize Template, select a script.
8. On the Schedule page, decide if you want the provisioning to begin as soon as it is approved, or at a specific time.
34
In Schedule Info, choose if you want the provisioning to begin as soon as it is approved, or at a specific time. If you select
Schedule, you will be prompted to enter a date and time.
Check Stateless if you do not want the files deleted after the provision completes. A stateless
Chapter 3. Provisioning Requests provision does not write to the disk so it will need the PXE files on the next boot.
9. Click Submit.
Result:
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.
3.4. Provisioning Virtual Machines
There are three types of provisioning requests available in ManageIQ 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 Virtual Machine from a Template
You can provision virtual machines through various methods. One method is to provision a virtual machine directly from a template stored on a provider.
Procedure 3.16. To Provision a Virtual Machine from a Template
1. Navigate to Infrastructure → Virtual Machines.
2. Click (Lifecycle), and then (Provision).
3. Select a template from the list presented.
4. Click Continue.
5. On the Request tab, enter information about this provisioning request.
35
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
36
In Request Information, type in at least a First 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 ManageIQ Management Engine server is configured to use LDAP, you can use the Look 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 Purpose tab to select the appropriate tags for the provisioned virtual machines.
7. Click the
Catalog tab to select the template to provision from. This tab is context sensitive based on provider.
8. For templates on VMware providers:
Chapter 3. Provisioning Requests a. For
Provision Type, select NetApp, VMware, or PXE.
i. If VMware is selected, check Linked Clone if you want 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 Image to use for provisioning b. Under Count, select the number of virtual machines you want to create in this request.
c. Use VM Naming 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 Provision Type, select either ISO, PXE, or Native Clone.
i. If Native Clone is selected, check Linked Clone if you want 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 Virtualisation. 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 ISO is selected, select an ISO Image to use for provisioning iii. If PXE is selected, select a PXE Server and Image to use for provisioning c. Under Count, select the number of virtual machines you want to create in this request.
d. Use
VM Naming to specify a VM Name and VM Description. When provisioning multiple virtual machines, a number will be appended to the
VM Name.
10. Click the Environment tab to decide where you want the new virtual machines to reside.
a. If provisioning from a template on VMware, you can either let ManageIQ Management Engine decide for you by checking Choose Automatically, or select a specific cluster, resource pool, folder, host, and datastore.
37
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide b. If provisioning from a template on Red Hat, you can either let ManageIQ Management Engine decide for you by checking Choose Automatically, or select a datacenter, cluster, host and datastore.
11. Click the Hardware tab to set hardware options.
a. In VM Hardware, set the number of CPUs, amount of memory, and disk format: thin, preallocated/thick or same as the provisioning template (default).
b. For VMware provisioning, set the VM Limits of CPU and memory the virtual machine can use.
c. For VMware provisioning, set the In
VM Reservation amount of CPU and memory.
12. Click
Network to set the vLan adapter. Additional networking settings that are internal to the operating system appear on the Customize tab.
a. In Network Adapter Information, select the vLan.
13. Click Customize to select how you might want to customize the operating system of the new virtual machine. These options vary based on the
operating system of the template.
38
Chapter 3. Provisioning Requests
14. For Windows provisioning: a. To use a customer specification from the Provider, click Specification. To select an appropriate template, a list will be provided in the custom specification area. The values that are honored by ManageIQ Management Engine will display.
Note
Any values in the specification that do not show in the ManageIQ Management Engine console's request dialogs will not be used by ManageIQ Management Engine. For example, for Windows operating systems, if you have any run once values in the specification, they will not be used in creating the new virtual machines. Currently, for a Windows operating system, ManageIQ 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 will be used.
To modify the specification, check Override Specification Values.
b. Select Sysprep Answer File, 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
Browse to find the file, and then upload. To use an answer file in Customization Specification, simply click on the item. The answer file will automatically upload for viewing. You cannot make modifications to it.
15. For Linux provisioning: a. Under
Credentials, enter a Root Password for the root user to access the instance.
b. Enter a
IP Address Information for the instance. Leave as DHCP for automatic IP assignment from the provider.
c. Enter any DNS information for the instance if necessary.
39
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide d. Select a Customize Template for additional instance configuration. Select from the
Kickstart scripts stored on your appliance.
16. Click the
Schedule tab to decide if you want the provisioning to begin as soon as it is approved, or at a specific time.
a. In Schedule Info, choose if you want the provisioning to begin as soon as it is approved, or at a specific time. If you select Schedule, you will be prompted to enter a date and time.
b. In
Lifespan, select if you want to power on the virtual machines after they are created, and if you want to set a retirement date. If you select a retirement period, you will be prompted for when you want a retirement warning.
17. Click Submit.
Result:
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.
3.4.2. Cloning a Virtual Machine (VMware Virtual Machines Only)
Procedure 3.17. To Clone a Virtual Machine
1. Navigate to Infrastructure → Virtual Machines, and check the virtual machine you want to clone.
2. Click
(Lifecycle), and then (Clone selected item).
3. Fill in the options as shown in
To Provision from a template using the provided dialogs. Be sure to check the Catalog Tab.
4. Schedule the request on the Schedule tab.
5. Click Submit.
40
Chapter 3. Provisioning Requests
3.4.3. Publishing a Virtual Machine to a Template (VMware Virtual
Machines Only)
Procedure 3.18. To Publish a Virtual Machine to a Template
1. Navigate to Infrastructure → Virtual Machines, and check the virtual machine you want to publish as a template.
2. Click (Lifecycle), and then (Publish selected VM to a Template).
3. Fill in the options as shown in To Provision from a template using the provided dialogs. Be sure to check the
Catalog tab.
4. Schedule the request on the
Schedule tab.
5. Click Submit.
3.5. Provisioning Instances
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, ManageIQ Management Engine executes the request.
3.5.1. Provisioning an Instance from an Image
Procedure 3.19. To Provision an Instance from an Image
1. Navigate to Clouds → Instances.
2. Click ( Lifecycle), then click (Provision Instances).
3. Select an image from the list presented.
4. Click Continue.
5. On the Request tab, enter information about this provisioning request. In Request
Information, 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 auto-approval, quota, provision complete, retirement, request pending approval, and request denied. The other information is optional. If the ManageIQ Management Engine Server is configured to use LDAP, you can use the
Look 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 Purpose tab to select the appropriate tags for the provisioned instance.
7. Click the Catalog tab for basic instance options.
41
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide a. To change the image to use as a basis for the instance, select it from the list of images.
b. Select the Number of VMs to provision.
c. Type a
VM Name and VM Description.
8. Click the
Environment tab to select the instance's Availability Zone. If no specific availability zone is require, select the Choose Automatically checkbox.
9. Click the Hardware tab to set provider options such as hardware flavor and security settings.
a. Select a flavor from the Instance Type list.
b. Select a Guest Access Key Pair for access to the instance.
c. In Security Groups, select which security group suits your allowed port and IP address requirements. Otherwise, leave at the default group.
d. If provisioning from an Amazon EC2 provider, select the
CloudWatch monitoring level.
Leave as Basic for the default EC2 monitoring.
e. In Public IP Address, select the public IP address that suits your requirements.
10. Click the Customize tab to set additional instance options.
a. Under Credentials, enter a Root Password for the root user access to the instance.
b. Enter a IP Address Information for the instance. Leave as DHCP for automatic IP assignment from the provider.
c. Enter any
DNS information for the instance if necessary.
d. Select a
Customize Template for additional instance configuration. Select from the
Cloudinit scripts stored on your appliance.
11. Click the Schedule tab to set the provisioning and retirement date and time.
a. In Schedule Info, choose whether the provisioning begins upon approval, or at a specific time. If you select
Schedule, you will be prompted to enter a date and time.
b. In
Lifespan, 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 Submit.
Result:
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.
3.6. Customizing Provisioning Dialogs
3.6.1. Customizing Provisioning Dialogs
The default set of provisioning dialogs shows all possible options. However, ManageIQ Management
42
Chapter 3. Provisioning Requests
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
Procedure 3.20. To Add a Provision Dialog for All Users
1. Navigate to
Automate → Customization.
2. Click the
Provisioning Dialogs accordion.
3. Click the type of dialog you want to create:
Host Provision, VM Provision or VM Migrate.
4. Select one of the default dialogs.
5. Click (Configuration), and then (Copy this Dialog).
6. Type a new Name and Description for the dialog.
7. In the Content 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 Add.
Result:
If you are using Provisioning Profiles, you can specify a specific file that holds the customizations.
To do this, you must create an instance mapping to this file in the ManageIQ 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. Creating a Custom Provision Dialog
43
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Procedure 3.21. To Create a Custom Provision Dialog
1. Navigate to
Automate → Customization.
2. Click on the
Provisioning Dialogs accordion.
3. Click on the type of dialog you want to create, Host Provision, VM Provision or VM
Migrate.
4. Select one of the default dialogs.
5. Click (Configuration), and then
(Copy this Dialog).
6. Rename the dialog as shown in the examples below.
Type of provision
Provision Virtual Machine from a template
Clone a Virtual Machine
Publish a Virtual Machine to a template
Dialog name
miq_provision_dialogs_ groupname_template
Example: miq_provision_dialogs_ EvmGroupuser_self_service _template miq_provision_dialogs_ groupname_clone_to
_vm
Example: miq_provision_dialogs_ EvmGroupuser_self_service _clone_to_vm miq_provision_dialogs_ groupname_clone_to
_template
Example: miq_provision_dialogs_ EvmGroupuser_self_service _clone_to_template
7. Make any changes you need.
8. In the Content 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 ensure the field does not get turned back on by a workflow model, use
:display_override => :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 to true, the field must have a value for the provision request to be submitted.
9. Click
Add.
Result:
Enter the name of the new dialog into the dialog name field in the appropriate ManageIQ 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.
44
Chapter 3. Provisioning Requests
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 ManageIQ Management Engine groups. To use provisioning profiles, you will need to:
Create a Provisioning Profile instance for the LDAP or ManageIQ 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.
3.7.2. Creating a Provisioning Profile Instance
45
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Procedure 3.22. To Create a Provisioning Profile Instance
1. Navigate to Automate → Explorer.
2. Using the tree located in the accordion, select
EVMApplications → Provisioning → Profile
→ VM provisioning Group (VM).
3. Click (Configuration), (Add a New Instance).
4. Make the name of the tag identical to the name of the LDAP or ManageIQ Management Engine group you are creating the instance for, replacing spaces in the group name with underscores. For example, change
ManageIQ-test group to ManageIQ-test_group. This is how ManageIQ
Management Engine knows which instance to use.
5. In the dialog name field, type in the name of the customized dialog file. This file must reside on the
ManageIQ Management Engine Appliance in the /var/www/miq/vmdb/db/fixtures directory.
As a best practice, you should name the file in the format
miq_provision_dialogs-
groupname.rb. Red Hat recommends putting this file on all ManageIQ Management Engine
Appliances. For instructions on how to create a custom dialog file, see
Customizing
Provisioning Dialogs.
46
Chapter 3. Provisioning Requests
Note
Be sure that the custom dialog file exists. If it does not, an error will appear when the user clicks on the Provisioning button in the ManageIQ Management Engine console.
6. After making all required changes, click Add.
3.7.3. Using Tags to set a Scope for Provisioning
When creating a provisioning request, you may want to limit which hosts, datastores, and templates, a group can choose from. To do this, create a tag value with the exact name of the user group for the
Provisioning Scope Category. 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.
47
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Chapter 4. Working with Requests
4.1. Provisioning Request Approval Methods
In this chapter, you will learn about the different approval methods. The request can be approved manually in the ManageIQ Management Engine console, set for automatic approval by setting options in the
Automate Explorer, 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 ManageIQ
Management Engine Console, how to approve a request, and how to set automatic approval parameters.
4.2. Working with Provisioning Requests
After a provisioning request is sent, if you have proper authority, you can copy, edit, delete, approve, or deny a request.
4.3. Reloading the Status of Provisioning Requests
Procedure 4.1. To Reload the Status of a Provisioning Request
1. Navigate to Services → Requests.
2. Click
(Reload the current display).
4.4. Approving a Provisioning Request
After a user creates provisioning request, administrators have the ability to approve the request and allow
ManageIQ Management Engine to complete virtual machine or instance creation.
Procedure 4.2. To Approve a Provisioning Request
1. Navigate to
Services → Requests.
2. Click on the request you want to approve.
3. Type in a Reason for the approval.
4. Click (Approve this request).
4.5. Denying a Provisioning Request
48
Chapter 4. Working w ith Requests
Procedure 4.3. To Deny a Provisioning Request
1. Navigate to
Services → Requests.
2. Click on the request you want to deny.
3. Type in a
Reason for the denial.
4. Click (Deny this request).
4.6. Copying a Provisioning Request
Procedure 4.4. To Copy a Provisioning Request
1. Navigate to Services → Requests.
2. Click on the request you want to copy.
3. Click (Copy original provision request).
4. Make changes to the request.
5. Click Submit.
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. Editing a Provisioning Request
Procedure 4.5. To Edit a Provisioning Request
1. Navigate to Services → Requests.
2. Click on the request you want to edit.
3. Click
(Edit the original provision request).
4. Make changes to the request.
5. Click
Submit.
4.8. Deleting a Provisioning Request
Procedure 4.6. To Delete a Provisioning Request
1. Navigate to Services → Requests.
49
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
2. Click on the request you want to delete.
3. Click (Delete this request).
4. Click OK to confirm.
4.9. Automatically Approving Requests
4.9.1. Automatically Approving Requests
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 Defaults for Automatic Approval
To enable a global set of default approval values, edit the defaults instance by navigating to
Automate
→ Explorer, then Datastore → Factory → StateMachines → VM Provision Approval State
Machine (ProvisionRequestApproval) 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.
Procedure 4.7. To enable global defaults for automatic approval
1. Navigate to
Automate → Explorer.
2. From the tree in the accordion menu, select
Datastore → Factory → StateMachines → VM
Provision Approval State Machine (ProvisionRequestApproval) → Default.
50
3. Click (Configuration), then (Edit this instance).
Chapter 4. Working w ith Requests
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_memory to set the maximum memory allowed to approve automatically the provisioning request.
Use max_retirement_days 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. After making all required changes, click Save.
Result:
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 no user intervention.
51
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
4.9.3. Template Specific Approval Defaults
ManageIQ 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 Automate 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.
Category Display Name
(Name)
Use
Sample Values
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)
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 Tags to a Template for Auto Approval
Procedure 4.8. To Assign Tags to a Template for Auto Approval
1. Navigate to Infrastructure → Virtual Machines.
2. Click the Templates accordion, and select the templates that you want to tag.
3. Click (Policy), and then (Edit Tags).
4. Select a customer tag from the first dropdown, and then a value for the tag.
Result:
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.
52
Chapter 4. Working w ith Requests
4.10. Setting Provisioning Notification Email Addresses
ManageIQ 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 [email protected] as a default.
Procedure 4.9. To Change the Email Address for Provisioning Notifications
1. Navigate to
Automate → Explorer.
2. Choose the following Namespace:
Datastore → Alert.
3. Select the
Email Notifications (EmailNotifications) class.
4. Select an instance within the chosen class.
5. Navigate to Configuration → Edit Selected Instance.
6. Type the desired email addresses in the to_email_address and from_email_address fields.
7. Click Save.
53
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Chapter 5. Fulfilling Requests
5.1. Fulfilling a Request
5.1.1. Fulfilling a Request
After a request has been approved, ManageIQ 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 Automate → Explorer, then listed under Factory → StateMachines → VMProvision State Machine (VMProvision_VM) →
Provision VM from Template (template) instance. The value for each state shows where the instance resides in the Datastore accordion. The default set of execution steps is shown below. For more information on state machines, see State Machines.
5.1.2. Default Execution Steps in States Instance
Table 5.1. Default Execution Steps in States Instance
Step
Customize Request
Acquire IP Address
Acquire MAC Address
Register DNS
Register CMDB
Register AD
PreProvision
Provision
CheckProvisioned
PostProvision
Register DHCP
Activate CMDB
Email owner
Description
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. Quotas
5.2.1. Quotas
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.
54
Chapter 5. Fulfilling Requests
5.2.2. Editing the Default Quota
Procedure 5.1. To Edit the Default Quota
1. Log in as a user with administrator or super administrator rights to the ManageIQ Management
Engine console.
2. Navigate to
Automate → Explorer.
3. From the accordion menu, click Datastore → Factory → StateMachines → VM Provision
Quota Verification State Machine → Default.
4. Click (Configuration), (Edit this instance).
Set the values for Owner Max CPUs Allowed, Owner -- Max Memory Allowed, or
Owner -- Max Storage Allowed to be the maximums for a specific owner.
Set the values for
Group Max CPUs Allowed, Group -- Max Memory Allowed, or
Group -- Max Storage Allowed to be the maximums for a specific user group.
5. After making all required changes, click Save.
5.2.3. Using Tags for Owner and Group Quotas
ManageIQ 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 Configuration Set Ownership button. If a virtual machine or instance has an owner, the value is displayed in the Lifecycle 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.
Category Display Name
(Name)
Use
55
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Quota Max CPU
(quota_max_cpu)
Quota Max Memory
(quota_max_memory)
Quota Max Storage
(quota_max_storage)
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
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 Tag to a User or User Group
Procedure 5.2. To Apply a Tag to a User or User Group
1. Click
Configure → Configuration.
2. Click the
Access Control accordion, and select the user or group that you want to tag.
3. Click
(Policy), then click (Edit Tags).
4. Select the appropriate customer tag to assign, then the value.
5. Click
Save.
5.3. State Machines
5.3.1. State Machines
A State Machine 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 ManageIQ Management Engine Automate State machine:
Table 5.2. State Machines Components
Component
On_Entry
On_Exit
On_Error
Default Value
Description
Method to run when entering the State.
Method to run when exiting the State.
Method to run if an error is encountered when running the state.
Runs after the On_Entry method completes (The actual state being processed).
56
Chapter 5. Fulfilling Requests
Max Retries
Max Time
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.
The following image shows a simple state machine pertaining to approving a provision request. This instance can be found in Datastore → Factory → StateMachines → VM Provision Approval
State Machine (Provision Request Approval) → Default.
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 validate_request method, which is processed during the On_Entry portion of the ValidateRequest 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 validate_request 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.
57
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
5.3.2. Customizing Provisioning States
The steps followed when provisioning a virtual machine or cloud instance are completed based on instances from the Datastore → Factory → StateMachines → VMProvision class. Depending on your environment you may want to remove, change, or add steps to the provisioning process. For example, if you are not integrating with IPAM or a CMDB, then you will want to remove those execution steps.
5.3.3. Editing the Default States Instance
Procedure 5.3. To Edit the Default States Instance
1. Navigate to Automate → Explorer.
2. From the accordion menu, click Datastore → Factory → StateMachines → VMProvision
State Machine (VMProvision_VM) → Provision VM from Template (template).
3. Click (Configuration), then (Edit this instance).
4. For each step that you want to remove, clear the entries in the Value, On Entry, On Exit, and
On Error columns.
5. After making all required changes, click Save.
5.3.4. Viewing the Status 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.
Procedure 5.4. To View the Status of a Provisioning Request
1. Navigate to Services → Requests. The list of requests is shown.
2. Click on a specific request for more information. Once the provisioning begins, if the request was
58
Chapter 5. Fulfilling Requests supposed to create more than one virtual machine or instance, a field will appear called
Provisioned VMs. Click on the number that appears next to it for information on each of the individual provisions.
5.3.5. Viewing a Provisioned Virtual Machine or Instance
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
Lifecycle area of the respective summary.
Procedure 5.5. To View a Virtual Machine or Instance Summary
From Services → Workloads, click the virtual machine or instance that you want to view.
5.3.6. Viewing a Virtual Machine or Instance Summary
From
Services → Workloads, click the virtual machine or instance that you want to view.
59
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Chapter 6. Catalogs and Services
6.1. About Catalogs and Services
Through the use of catalogs, ManageIQ 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. Terminology
Terminology
Catalog Bundle
A grouping of Templates.
Catalog Item
A single Template or a group of Templates (catalog bundle).
Dialog Tabs
Part of a Service Dialog.
Element
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.
Provisioning Dialogs
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 Catalog
A catalog item or Catalog bundle that is available for provisioning.
Service Dialogs
Made up of fully customizable tabs, items, and values for use with Service provisioning.
Template
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. Catalogs
6.3.1. Catalogs
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.
60
Chapter 6. Catalogs and Services
You will need to complete the following steps to create and provision a service catalog.
1. Create Catalog Items for each virtual machine or instance that will be part of the service.
2. Create a
Service dialog. For example, create a dropdown with three options small, medium, and large.
3. Create a method for the Service Dialog 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
Automate model.
4. Create an instance in the Factory/StateMachines/ServiceProvision class that calls the method.
5. Associate method with Automate instance
6. Create a
Catalog Bundle, adding each of the catalog items to it. Select the Service Dialog you created. Use the instance created in the Factory/StateMachines/ServiceProvision class as the
Entry Point. Check Display in Catalog box.
7. Provision a service
6.3.2. Creating a Catalog Item
Create a catalog item for each virtual machine or cloud instance that will be part of the service.
Procedure 6.1. To Create a Catalog Item
1. Navigate to Services → Catalogs.
2. Click the Catalog Items accordion.
3. Click (Configuration), and then (Add a New Catalog Item).
4. Select the Catalog Item Type 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 Catalog Item Type is Redhat.
5. In the Basic Info subtab: a. Type a Name/Description.
b. Check Display in Catalog to edit Catalog, Dialog, and Entry Point(NS/Cls/Inst) options.
i.
Provisioning Entry Point (NS/Cls/Inst) requires you to select an Automate instance to run upon provisioning.
ii. Retirement Entry Point (NS/Cls/Inst) requires you to select an Automate instance to run upon retirement.
61
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
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 Details subtab, write a Long Description for the catalog item.
7. In the Request 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 Add.
6.3.3. Service Dialogs
6.3.3.1. Service Dialogs
When provisioning a service, input will be needed from the requester. Service Dialogs are used to take input from the user. This input is connected to a method in the Automate model that defines how the users input is translated into the provision request. Before creating a
Service Dialog, be sure to plan what items you need the user to input.
6.3.3.2. Adding a Service Dialog
Procedure 6.2. To Add a Service Dialog
1. Navigate to Automate → Customization.
2. Click the Service Dialogs accordion.
3. Click (Configuration), and then (Add a new Dialog).
4. In Dialog Information, type in a Label and Description. 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 Add.
6. Select the dialog you just created.
7. Click (Configuration), and then (Edit this Dialog).
8. Add a tab to the dialog.
a. Click (Add), then (Add a New Tab to this Dialog).
b. Type in a Label and Description for this tab.
9. Add a box to this tab.
a. Click (Add), then (Add a New Box to this Tab).
b. Type in a Label and Description for this box.
10. Add an element to this box. Elements are controls that accept input.
62
Chapter 6. Catalogs and Services a. Click
(Add), then (Add a New Element to this Box).
b. Type in a Label, Name, and Description 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
dialog_service_type
c. Select a Type for an element type. All Type options have a Required and Default
Value field. Check Required or set Required to true 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.
Table 6.1. Element Types
Element Types
Check Box
Date Control
Date/Time Control
Drop Down Dynamic List
Drop Down List
Radio Button
Tag Control
Text Area Box
Text Box
Additional Info
Check Default Value if you want this check box checked by default.
Use Date Control 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
Date/Time Control option.
Use
Date/Time Control to create a field where users can select a date and time.
Only one Date Control or Date/Time
Control element can be present in a dialog.
Use
Drop Down Dynamic List if you want the list options to be created using automate methods. Use
Entry Point
(NS/Cls/Inst) to select an automate instance. Check
Show Refresh Button
to allow users to refresh the list options manually.
Use Drop Down List to create a list of options for the user to choose from.
This element type serves the same purpose as
Drop Down List but displays options using radio buttons.
Select a
Category of tags you want assigned to the virtual machines associated with this service dialog. Check
Single
Select if only one tag can be selected.
Provides text area for users to type in some text. You can also leave a message to users by typing in the Default Value field or leave it as blank.
This element type serves the same purpose as
Text Area Box with the option to check Protected so the text is shown as
63
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide asterisks (*), instead of plain text.
11. Click Save.
6.3.4. Methods
6.3.4.1. Creating a Method to Associate with the Dialog
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 Automate 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 Service category with the appropriate value. Then, added as a catalog item and combined into a catalog bundle.
The Service Dialog captures the selection of small, medium or large application in a dropdown called
service_type. When referring to a value captured in an element in a dialog, the name of the element should be prefixed with dialog_. For example, service_type becomes
dialog_service_type when used in the method.
The method will set the memory sizes for each of the catalog items based on the
service_type
selection.
#
# ManageIQ Management Engine Automate Method
#
$evm .log( "info" , "ManageIQ 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" , "===========================================" )
#############################################################
#### 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}]")
64
Chapter 6. Catalogs and Services
#############################################################
#### 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 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
#
65
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
#
#
$evm .log( "info" , "ManageIQ Management Engine Automate Method
ConfigureChildDialog Ended" ) exit MIQ_OK
6.3.4.2. Creating a Method in the Factory/Service Class
Procedure 6.3. To Create a Method in the Factory/Service Class
1. Navigate to
Automate → Explorer.
2. Click the
Datastore accordion, and select a Factory → Service class.
3. Click the
Methods tab.
4. Click
(Configuration), then (Add a New Method).
5. Type in a
Name and Display Name.
6. In the Data field, type in the method contents.
7. Click Validate and wait for your data entry to be successfully validated.
8. Click Add.
6.3.4.3. Creating an Instance in the Factory/Service Class
Procedure 6.4. To Create an Instance in the Factory/Service Class
1. Navigate to Automate → Explorer.
2. Click the
Datastore accordion, and select a Factory → Service class.
3. Click the
Instances tab.
4. Click
(Configuration), then (Add a new Instance).
5. Type in a
Name and Display Name.
6. In the
Fields area, type in the method's name in Value.
7. Click Add.
Result:
The instance is created so that it can be called from the ServiceProvision 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 Point. This method must be called before the provision job begins.
66
Chapter 6. Catalogs and Services
6.3.4.4. Associating a Method with an Automate Instance
Procedure 6.5. To Associate the Method with an Automate Instance
1. Navigate to Automate → Explorer.
2. From the accordion menu, click Datastore → Factory → StateMachines → Service
Provision State Machine class.
3. Either create a new instance or select the clone_to_service instance.
4. Click (Configuration), then (Edit Selected Instance).
5. In the
configurechilddialog value, put the path to the method.
6. Click
Save or Add if you are adding this to a new instance.
Result:
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. Creating a Catalog Bundle
Procedure 6.6. To Create a Catalog Bundle
1. Navigate to Services → Catalogs.
2. Click the
Catalog Items accordion.
3. Click
(Configuration), and then (Add a New Catalog Bundle).
4. In
Basic Info, type in a name and description
5. Click
Display in Catalog.
6. Select the appropriate dialog name.
7. Select the path to the appropriate Automate/Factory/StateMachines/ServiceProvision instance.
8. Click on the Resources tab, then select the catalog items you want added to the bundle from the
Add a Resource dropdown.
9. Click Add.
Result:
A catalog bundle is created and visible in the
Service Catalog accordion.
67
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
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
Catalog Bundle. To set the entry point, go into each Catalog Item and check Display in
Catalog. Then, you will see the Entry Point field.
6.3.4.6. Provisioning a Service
Procedure 6.7. To Provision a Service
1. Navigate to Services → Catalogs.
2. Click the Service Catalogs accordion, and select the service to provision.
3. Click Order. The dialog appears.
4. Select the options in the
Service dialog.
Result:
The parameters are passed to the children based on the method tied to the choices made in the dialog.
68
Chapter 7. Retirement
Chapter 7. Retirement
7.1. Retiring Virtual Machines
7.1.1. Retiring Virtual Machines and Instances
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, ManageIQ 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 ManageIQ 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 ManageIQ Management Engine, the virtual machine or instance will be stopped.
ManageIQ Management Engine provides a number of ways to retire a virtual machine or instance.
By using the allocated buttons in the ManageIQ Management Engine console.
When creating a provision request, a retirement date can be set up.
7.1.2. Using the ManageIQ Management Engine Console to Retire
Through the ManageIQ Management Engine console, you can retire a virtual machine on a specific date or immediately.
7.1.3. Retiring a Virtual Machine Immediately
Procedure 7.1. To Immediately Retire a Virtual Machine
1. Navigate to
Services → Workloads.
2. Select the virtual machine or instance that you want to retire.
3. Click
(Lifecycle), then (Retire this VM/Instance).
Result:
The virtual machine or instance is immediately stopped, and will be shut down if an attempt is made to restart it.
7.1.4. Setting a Retirement Date for a Virtual Machine or Instance
Procedure 7.2. To Set a Retirement Date for a Virtual Machine or Instance
1. Navigate to Services → Workloads.
2. Select the virtual machine that you want to set a retirement date for.
69
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
3. Click (Lifecycle), then (Set/remove retirement date).
4. Select a date using the calendar control.
5. Click
Save
Result:
The retirement date is set, and displays in the virtual machine or instance summary screen.
7.1.5. Removing a Retirement Date for a Virtual Machine or Instance
Procedure 7.3. To Remove a Retirement Date for a Virtual Machine or Instance
1. Navigate to
Services → Workloads.
2. Select the virtual machine or instance that you want to remove the retirement date from.
3. Click
(Lifecycle), then click (Set Retirement Date).
4. Click (Remove Retirement Date).
7.2. Setting Retirement in a Provision Request
7.2.1. Setting Retirement in a Provision Request
If you are using ManageIQ 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 Retirement 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
Schedule 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.
70
Chapter 7. Retirement
7.3. Extending Retirement Dates
ManageIQ Management Engine Automate 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. Creating a Custom Button to Extend Retirement
Procedure 7.4. To Create a Custom Button to Extend Virtual Machine Retirement
1. Navigate to Automate → Customization.
2. Click the Buttons accordion.
3. From the Object Types 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
(Configuration), then (Add a new Button).
6. Type in a button text and button hover text, and select the image you want to use.
7. In Object Details, select Request from the /System/Process/ dropdown. By default, the message is create. Do not change it.
8. In Request, type vm_retire_extend .
9. Click
Add.
7.3.2. Changing the Number of Days to Extend Retirement
Procedure 7.5. To Change the Number of Days to Extend Retirement
1. Navigate to Automate → Explorer.
71
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
2. Click
Datastore → Alert → Email Notifications → vm_retire_extend instance.
3. Click
(Configuration), then (Edit this Instance).
4. In the Data area, change the vm_retire_extend_days attribute to the new value.
5. Click Save.
72
Chapter 8. Automate Model
Chapter 8. Automate Model
8.1. About Automate
This chapter discusses the Automate feature set. ManageIQ Management Engine Automate enables realtime, bi-directional process integration and adaptive automation for management events and administrative or operational activities.
8.2. Automate 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.
ManageIQ Management Engine Applications includes automation activities specifically used with
ManageIQ 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 ManageIQ Management Engine such as
Configuration Management Database (CMDB), Simple Network Management
Protocol (SNMP), and IP Address Management (IPAM). 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 ManageIQ 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 ManageIQ Management Engine. However, you can link to these methods using relationships.
8.3. Creating a Class
Procedure 8.1. To Create a Class
73
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
1. Navigate to Automate → Explorer, navigate to the namespace you want to add a class to.
2. Click (Configuration), then (Add a new Class).
3. Type in a unique Name and Description.
4. If you want to use the schema from a class that has already been created, select it from the
Inherits From dropdown. If the class that the new class inherits from changes, the new class will also change.
5. Click Add.
Result:
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. Creating a Schema for a Class
This procedure shows you how to create a schema.
Procedure 8.2. To Create a Schema for a Class
1. Navigate to Automate → Explorer, and click the class you want to define a schema for.
2. Click on the
Schema tab.
3. Click
(Configuration), then (Edit selected Schema).
4. Click (Click to add a new field) to create a new field.
5. Type in a Name for the new field.
6. From Type, select Assertion, Attribute, Method, Relationship, or State.
7. If applicable, select a Data Type and set a Default Value.
8. Type in a user friendly Display Name and Description.
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
Collect and Message as required. Collect is used to rollup values from resolved relationships. For example, a relationship can resolve to a large object tree. Use collect to specify how to pull out data from those child objects into the current object. If you give collect a name value, it will store the method result in an attribute of the current object with that name.
11.
On Entry, On Exit, On Error, Max Retries, and Max Time are fields used mostly for state machines. Leave blank if not applicable. See State Machines.
74
Chapter 8. Automate Model
12. Click
(Add this 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.
Result:
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. Editing a Field in a Schema
This procedure shows you how to edit schema fields.
Procedure 8.3. To Edit a Field in a Schema
1. Navigate to Automate → Explorer.
2. Click the class you want to define a schema for.
3. Click the
Schema tab.
4. Click
(Configuration), then (Edit selected Schema).
5. Make required changes to any of the definitions for the field.
6. To remove a field, click (Click to delete this field from the schema).
7. Click Save when you are finished editing the schema.
Result:
Once the schema is created, you can add instances and methods to the class.
8.6. Editing Schema Sequence
This procedure shows you how to change schema sequence.
Procedure 8.4. To Edit a Schema Sequence
1. Navigate to Automate → Explorer.
2. Click the class you want to change the schema sequence for.
3. Click the Schema tab.
75
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
4. Click (Configuration), then (Edit Sequence).
5. In the Class Schema Sequencing area, click the field you want to change the sequence for.
To move a field up in the order of resolving an instance, click
up).
(Move selected field
To move a field down in the order of resolving an instance, click
field down).
6. Click Save when you are finished editing the sequence.
8.7. Adding an Instance to a Class
This procedure shows you how to create an instance.
(Move selected
Procedure 8.5. To Add an Instance to a Class
1. Navigate to Automate → Explorer.
2. Click the class you want to define a schema for.
3. Click the Instances tab.
4. Click (Configuration), then (Add a new Instance).
5. In the Main Info area, type in a Name, Display Name and Description.
6. In the Fields 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
Add.
8.8. Relationships
8.8.1. Relationship Syntax
Relationships are used to connect to other instances in the Automation Datastore. 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. Table: Relationship Examples
Example
/Integration/IPAM/AcquireMACAddress#${#ae_me ssage}
Explanation
Goes to Integration Namespace, IPAM Class, substituting the value of ae_message for the
76
ssage}
/FACTORY/METHOD/vm_allowed?
vm_id=${process#vm_id}
/Factory/Method/VM_SCAN?
vm_id=${process#vm_id}
Chapter 8. Automate Model 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. Methods
8.9.1. Methods
Methods are pieces of code associated with a class or object to perform a task. ManageIQ 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
ManageIQ Management Engine Appliance in the ManageIQ Management Engine Zone where you are running Automation.
8.9.2. Installing a Windows SmartProxy 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 ManageIQ Management Engine Console.
Procedure 8.6. To Install a Windows SmartProxy for PowerShell
1. Click Configure → Configuration.
2. Click the Settings accordion, and click Zones.
3. Click the zone where the ManageIQ Management Engine server is located.
4. Click on the ManageIQ Management Engine server that you want to apply the maintenance to.
5. Click the Maintenance tab.
6. Click on the Product Update with a component of SmartProxy and platform of Windows.
7. Click
Download. The file is downloaded to the computer where you are accessing the ManageIQ
Management Engine Console.
8. Open a command prompt, and navigate to the directory where you downloaded the file.
9. Run:
C:\Downloads\>filename -h ipaddress install
77
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
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 ManageIQ Management Engine host.
Result:
The SmartProxy is installed as a service onto the Windows computer in the
/Program Files/Red Hat
directory. To start up the Windows SmartProxy, go to
Services in the Control Panel,
Administrative Tools. Start the Red Hat SmartProxy Service. The service is set to automatically start when you restart the computer.
8.9.3. Creating a Method
This procedure shows you how to create a method.
Procedure 8.7. To Create a Method
1. Navigate to
Automate → Explorer, navigate to the class where you want to create a method.
2. Click the
Methods tab.
3. Click
(Configuration), (Add a New Method).
4. In the Main Info area, type in a Name and Display Name.
5. For Location, select inline. Once selected, you will be presented with a Data area in which to write or copy the script.
6. Click Validate to check the syntax.
7. Click Add.
Result:
The
Factory 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. Simulation
8.10.1. Simulation
After your model is designed, use the simulate page to test it. It allows you to see the results in tree and
XML view.
8.10.2. Simulating an Automate Model
This procedure shows you how to simulate an automate model.
Procedure 8.8. To Simulate an Automate Model
78
Chapter 8. Automate Model
1. Navigate to Automate → Simulation.
2. In Object Details, select a type of object from /System/Process/ that will initiate the model.
The
Message should be create. Type in the name of the Request where you are starting from.
3. Select the Type of item you want to run the simulation on. Then, select a specific one to use as the example.
4. Check
Execute Methods if you want to perform the model and not just simulate it.
5. Type in the
Attribute/Value Pairs fields if applicable.
6. Click
Submit.
Result:
Click on the Tree View or XML View tabs to see results.
8.11. Importing, Exporting, and Resetting the Datastore
8.11.1. Importing, Exporting, and Resetting the Datastore
The
Automate Model can be exported and imported as an XML file. ManageIQ 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.
79
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
8.11.2. Exporting All Datastore Classes
This procedure shows you how export datastore classes as an XML file.
Procedure 8.9. To Export All Datastore Classes
1. Navigate to
Automate → Import/Export.
2. Click
(Export all Datastore classes and instances to a file).
3. Follow your browsers prompts to save the file.
Result:
The datastore is exported as an XML file.
8.11.3. Importing Datastore Classes
This procedure shows you how to import datastore classes.
Procedure 8.10. To Import Datastore Classes
1. Navigate to Automate → Import/Export.
2. Export the datastore so that you have a backup.
3. Click
Browse to navigate to the location of the file to import.
4. Click
Upload.
Result:
The datastore is imported from the XML file.
8.11.4. Resetting Datastore to Default
This procedure shows you how reset datastore to default.
Procedure 8.11. To Reset the Datastore to the Default
1. Navigate to Automate → Import/Export.
2. Export the datastore so that you have a backup.
3. Click
(Reset all Datastore custom classes and instances to default).
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 OK.
80
Chapter 9. Invoking Automate
Chapter 9. Invoking Automate
9.1. Automate Examples
This chapter describes the ways to invoke an Automate workflow. Automation can be initiated through an alert, an event, a ManageIQ 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 ManageIQ 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/Process namespace.
9.2. Invoking Automate using a Custom Button
One of the ways to invoke an Automate model is to map an instance from the
/System/Process/Request class to a custom button. Before creating the button, you need to have an instance in the /System/Process/Request 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. Creating a Custom Button Group
This procedure shows you how to create a custom button group.
Procedure 9.1. To Create a Custom Button Group
1. Navigate to
Automate → Customization.
2. Click the
Buttons accordion.
3. From the Object Types tree, select the type of object you want to create the button group for.
4. Click (Configuration), (Add a new Button Group).
5. Type in a Button Group Text and Button Group Hover Text, and select the Button
Group Image 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
Add.
Result:
The button group will show in the object type you added the button to.
81
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
9.4. Creating a Custom Button
This procedure shows you how to create a custom button.
Procedure 9.2. To Create a Custom Button
1. Navigate to Automate → Customization.
2. Click the Buttons accordion.
3. From the Object Types tree, select the type of object you want to create the button for.
4. Click Unassigned Buttons.
5. Click (Configuration), then (Add a new Button).
Note
If
(Add a new Button) 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 Action, type in a Button Text and Button Hover Text, and select the Button Image you want to use.
7. Select a
Dialog if applicable.
8. In
Object Details, select Request from the /System/Process/ dropdown. By default, the message is create. Do not change it.
9. Type in a Request name for the /System/Process/Request instance.
10. Type in the Attribute/Value Pairs fields if applicable.
11. Under Visibility, select which Account Roles you want to have access to this button.
12. Click Add when you have confirmed that the button accomplishes the task you want.
Result:
The button will show in the object type you added the button to.
9.5. Editing a Custom Button
This procedure shows you how to edit a custom button.
Procedure 9.3. To Edit a Custom Button
1. Navigate to Automate → Customization.
2. From the Object Types dropdown, select the type of object you want to edit the button for.
82
Chapter 9. Invoking Automate
3. Click the button you want to edit.
4. Click
(Configuration), (Edit this Button).
5. Modify as required.
6. Click Save.
9.6. Deleting a Custom Button
This procedure shows you how to delete a custom button.
Procedure 9.4. To Delete a Custom Button
1. Navigate to
Automate → Customizations, then select the Buttons accordion.
2. From the
Object Type tree in the accordion menu, select the type of object you want to remove the button from.
3. Click (Configuration). then click (Remove this button).
4. Click OK to confirm that you want to delete this button.
9.7. Using a Custom Button
This procedure shows you how to use custom buttons to invoke a cluster, host, datastore, provider, virtual machine or instance.
Procedure 9.5. To Use a Custom Button
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.
Result:
The automate model is invoked for the specified item.
9.8. Initiating Automate from an Event
9.8.1. Initiating Automate from an Event
You can also use a ManageIQ 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/Process class, but then go to the Event that initiated the Automate model in the
/System/Process/Event Class. If you create your own custom action, it will start from the
/System/Process class and then go to the /System/Process/Request Class 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/Process/Event Class for the following Events that you can select as part of a Policy:
83
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
9.8.2. Creating a Policy for Automate
This procedure shows you how to create a policy for automate.
Procedure 9.6. To Create a Policy for Automate
1. Navigate to Control → Explorer.
2. Click the Policies accordion, and select Control Policies.
3. Select VM Control Policies.
4. Click (Configuration), then (Add a New Control Vm Policy).
5. Type in a Description.
6. Uncheck Active if you do not want this policy processed even when assigned to a resource.
7. Click Add. You are brought to the page where you add conditions and events to your new policy.
8. Click (Configuration), then (Edit this Policy's Event assignments).
Check the events you want to use to send to an Automate Model.
Click Save.
From the
Events area, click on the Description of the Event you want to assign an action to.
Click
(Edit Actions for this Policy Event).
9. Select
Raise Automation Event, and click
(Move selected Actions into this
Event).
84
Chapter 9. Invoking Automate
10. Click
Save.
Result:
You can now assign this policy to a Policy Profile. 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/Process/Request class, then you can create your own custom action. Be sure to have an instance in the
/System/Process/Request class for it to map to.
9.8.3. Creating a Custom Automate Action
This procedure shows you how to create a custom Automate action.
Procedure 9.7. To Create a Custom Automate Action
1. Navigate to Control → Explorer accordion.
2. Click the Actions accordion.
3. Click (Configuration), then (Add a new Action).
4. Type in a Description for the Action.
5. Select Invoke a Custom Automation from Action Type.
6. In Custom Automation,
For Message, type create.
For Request, type in the name of the instance of the /System/Process/Request Class in the second.
7. Type in the
Attribute/Value Pairs fields if applicable.
8. Click Add when you are finished.
Result:
The action is created and can be added to a policy.
85
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Objects
A.1. Virtual Machine Properties
When using these items in a method, prefix them with vm.. For example: vm.storage_id.
Table A.1. Virtual Machine Properties
Friendly Name or Description Raw Column Name
Allocated Disk Storage
Autostart
Blackbox Exists
Blackbox Validated
Boot Time
Busy
Cluster
Configuration XML
Connection State
CPU Affinity
CPU Limit
CPU Reserve 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
Created on Time
Currently Used Space cpu_reserve_expand cpu_shares cpu_shares_level ems_created_on used_storage_by_state
Datastore Path
Date Created
Date Updated v_datastore_path created_on updated_on
Description
Ems
Evm Owner
Evm Owner Email description ems_id evm_owner_id evm_owner_email
Evm Owner Name evm_owner_name
ManageIQ Management Engine Unique ID (Guid) 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 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
86
Last Sync Time
Location
Memory Limit
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 last_sync_on location memory_limit 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
Objects
87
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Vdi Connection Dns Name
Vdi Connection Logon Server
Vdi Connection Name
Vdi Connection Remote Ip Address
Vdi Connection Session Name
Vdi Connection Session Type
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) vdi_connection_dns_name vdi_connection_logon_server vdi_connection_name vdi_connection_remote_ip_address vdi_connection_session_name vdi_connection_session_type 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. ManageIQ Management Engine Methods for use in
Ruby Scripts
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.rebootGuest.
Method
start stop suspend unregister collect_running_processes shutdownGuest standbyGuest
Description
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
88
rebootGuest on the guest.
Reboot the guest operating system. Requires
VMware tools (or vendors tools) installed on the guest.
Objects
A.3. Factory Methods for VMs
Use the
Automate → Explorer page to see the referenced examples.
Method
log_vm_event vm_email_owner vm_email_remedy vm_scan vm_stop_and_unregister vm_post_retire
Description
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 Properties
When using these items in a method, prefix them with host, such as host.ems_id.
Friendly Name or Description Raw Column 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 all_enabled_ports v_annotation
Authentication_status connection_state cpu_usagemhz_rate_average_avg_over_time_pe riod cpu_usagemhz_rate_average_high_over_time_pe riod cpu_usagemhz_rate_average_low_over_time_per iod custom_1 Custom Attribute 1
Custom Attribute 2
Custom Attribute 3
Custom Attribute 4
Custom Attribute 5
Custom Attribute 6
Custom Attribute 7
Custom Attribute 8 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
89
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Derived memory usage high over time period
Derived memory usage low over time period
Ems
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 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 derived_memory_used_high_over_time_period 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_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
90
Objects
VMM Vendor
VMM Version vmm_vendor vmm_version
A.5. Provider Properties
When using these items in a method, prefix them with ems, such as ems.emstype.
Friendly Name or Description Raw Column Name
Aggregate VM CPUs
Aggregate VM Memory
CPU Ratio aggregate_vm_cpus aggregate_vm_memory v_cpu_vr_ratio
CPU Usage MHZ Rate Average High Over Time
Period
CPU Usage MHZ Rate Average Low Over Time
Period cpu_usagemhz_rate_average_high_over_time_pe riod" cpu_usagemhz_rate_average_low_over_time_per iod
CPU Usage MHZ Rate Average Over Time Period cpu_usagemhz_rate_average_avg_over_time_pe riod
Date Created
Date Updated
Derived Memory Usage Rate Average High Over
Time Period created_on updated_on derived_memory_used_high_over_time_period
Derived Memory Usage Rate Average Low Time
Period
Derived Memory Usage Rate Average Over Time
Period derived_memory_used_low_over_time_period derived_memory_used_avg_over_time_period
Distributed Resource Scheduler Automation Level drs_automation_level
Distributed Resource Scheduler Enabled
Distributed Resource Scheduler Migration
Threshold drs_enabled drs_migration_threshold
EMS ID
EVM Zone
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 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
91
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Total Number of Logical CPUs
Total Number of Physical CPUs
Total Vms
Unique Identifier aggregate_logical_cpus aggregate_physical_cpus total_vms uid_ems
A.6. Storage Properties
When using these items in a method, prefix them with storage, such as storage.name.
Table A.2. Storage Properties
Friendly Name or
Description
Raw Column Name
Date Created
Date Updated
Disk Files Percent of Used
Free Space
Free Space Percent of Total
Id
Last Analysis Time
Last Perf Capture On created_on updated_on v_disk_percent_of_used free_space v_free_space_percent_of_total id last_scan_on last_perf_capture_on
Location
Multiple Host Access location multiplehostaccess
Name name
Non-VM Files Percent of Used v_debris_percent_of_used
Other VM Files Percent of Used v_vm_misc_percent_of_used v_provisioned_percent_of_total Provisioned Space Percent of
Total
Reserved
Size of Non-VM Files
Size of Other VM Files
Size of VM Memory Files reserved v_total_debris_size v_total_vm_misc_size v_total_vm_ram_size
Size of VM Snapshot Files v_total_snapshot_size
Snapshot Files Percent of Used 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 v_total_provisioned total_space total_unmanaged_vms
Total VMs
Uncommitted
Used Space
Used Space Percent of Total v_total_vms uncommitted v_used_space v_used_space_percent_of_total
92
VM Memory Files Percent of
Used v_memory_percent_of_used
Objects
93
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
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)
Instance: (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.
Instance: (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.
94
Automate Model signature - used to stamp the email with a custom signature.
Instance: (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.
Instance: (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.
Instance: (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.
Instance: (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.
Instance: (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
95
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide 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.
Instance: (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.
Instance: (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.
Instance: (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.
Instance: (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.
96
Automate Model
Instance: (vm_retirement_emails)
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.
Method: (MiqHostProvisionRequest_Approved)
This method is used to email the provision requester that the Host provisioning request has been approved.
Method: (MiqHostProvisionRequest_Complete)
This method sends an email when the host_provisioned event is raised.
Method: (MiqProvisionRequest_Approved)
This method is used to email the provision requester that the VM provisioning request has been approved.
Method: (MiqProvisionRequest_Denied)
This method is used to email the provision requester and approver that the VM provisioning request has been denied.
Method: (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.
Method: (MiqProvision_Complete)
This method sends an email when the vm_provisioned event is raised.
Method: (ServiceProvision_Complete)
This method sends an email when the service_provisioned event is raised.
Method: (ServiceTemplateProvisionRequest_Approved)
This method is used to email the provision requester that the Service provisioning request has been approved.
Method: (VmMigrateRequest_Approved)
This method is used to email the provision requester that the VM Migrate request has been approved.
Method: (VmMigrateTask_Complete)
This method sends an email when the VmMigrateTask-Complete event is raised.
Method: (vm_retire_extend)
97
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
This method is used to add 14 days to retirement date when target VM has a retires_on value and is not already retired.
Method: (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)
Instance: (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.
Instance: (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.
Instance: (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.
Instance: (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.
98
Automate Model signature - used to stamp the email with a custom signature.
Instance: (Parse_Alerts)
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.
Instance: (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.
Instance: (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.
Method: (EMS_Cluster_Alert)
This method is used to send Email Alerts based on Cluster.
Method: (Ext_Management_System_Alert)
This method is used to send Email Alerts based on Provider.
Method: (Host_Alert)
This method is used to send Email Alerts based on Host.
Method: (MIQ_Server_Alert)
This method is used to send Email Alerts based on ManageIQ Management Engine Server.
Method: (Parse_Alerts)
This method is used to parse incoming Email Alerts.
99
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Method: (Storage_Alert)
This method is used to send Email Alerts based on Datastore.
Method: (VM_Alert)
This method is used to send Email Alerts based on Virtual Machine.
B.2. Namespace: Automation
Class: Host Lifecycle Management (HostLifecycle)
Instance: Host Discovery (Discovery)
For internal use. Do not modify.
Instance: Host Migrate (Migrate)
For internal use. Do not modify.
Instance: Host Provisioning (Provisioning)
For internal use. Do not modify.
Instance: VM Retirement (Retirement)
For internal use. Do not modify.
Class: VM Lifecycle Management (VMLifecycle)
Instance: VM Discovery (Discovery)
For internal use. Do not modify.
Instance: VM Migrate (Migrate)
For internal use. Do not modify.
Instance: VM Provisioning (Provisioning)
For internal use. Do not modify.
Instance: VM Retirement (Retirement)
For internal use. Do not modify.
Class: VM Management (vm)
Instance: (.missing)
For internal use. Do not modify.
B.3. Namespace: EVMApplications
B.3.1. Namespace: Operations
Class: Intelligent Workload Management (Intelligent_Workload_Management)
100
Automate Model
Instance: (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.
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.
Instance: 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.
Instance: 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.
Method: (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.
Method: (Host_Evacuation)
When a VM encounters high CPU % Ready, VMotions VM to a more suitable host.
Method: (VM_Placement_Optimization)
When a VM encounters high CPU % Ready, VMotion VM to a more suitable host.
B.3.1.1. Namespace: Profile
Class: VM Migrate Group (VmMigrate)
Instance: (.missing)
Default instance used when no group is found for the user creating a migrate request.
Instance: (EVMGroup-super_administrator)
101
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Instance used when the user is part of the Super Administrator Group. Configurable items: pre_dialog_name dialog_name state_machine
Instance: (EVMGroup-user_self_service)
Instance used when the user is part of the User Self Service Group. Configurable items: pre_dialog_name dialog_name state_machine
Instance: (Super_Admin) pre_dialog_name dialog_name state_machine
Method: (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)
Instance: (default)
Calls the vmname method.
Method: 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 miq). 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)
Instance: (best_fit_cluster)
Calls the best_fit_cluster method.
Instance: best_fit_default (best_fit)
102
Automate Model
Calls the /factory/method/host_and_storage_least_utilized method.
Instance: (best_fit_least_utilized)
Calls the least_utilized method.
Instance: (best_fit_with_scope)
Calls the best_fit_with_scope method.
Instance: (best_fit_with_tags)
Calls the best_fit_with_tags method.
Instance: (best_placement_with_scope)
Calls the best_placement_with_scope method.
Method: (best_fit_cluster)
Used to find the cluster with best fit.
Method: (best_fit_with_scope)
Used to find all hosts, datastores that have the tag category prov_scope = 'all'|| prov_scope =
<group-name>
Method: (best_fit_with_tags)
Used to find all hosts, datastores that match the required tag.
Method: (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>
Method: (least_utilized)
Used to find all hosts, datastores that are the least utilized.
Class: vLANs in Virtual Center (Network)
Empty
B.3.2.1. Namespace: Profile
Class: Host Provisioning Group (Host)
Instance: (.missing)
Default instance used when no group is found for the user creating a host provision request.
Instance: (EVMGroup-super_administrator)
Instance used when the user is part of the Super Administrator Group. Configurable items: pre_dialog_name dialog_name state_machine
103
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Method: (get_deploy_dialog)
Dynamically choose dialog based on Category:environment chosen in pre-dialog.
Class: Service Provisioning Group (service)
Instance: (.missing)
Default instance used when no group is found for the user creating a provision request.
Class: VM Provisioning Group (VM)
Instance: (.missing)
Default instance used when no group is found for the user creating a provision request.
Instance: (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
Instance: (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
Method: (get_deploy_dialog)
104
Dynamically choose dialog based on Category:environment chosen in pre-dialog.
Method: (vm_dialog_name_prefix)
This is the default method to determine the dialog prefix name to use.
B.4. Namespace: Factory
Class: Host(Host)
Instance: (CheckProvisioned)
Calls the check_provisioned method.
Instance: (CustomizeRequest)
Calls the CustomizeRequest and vm_email_owner method.
Instance: (PostProvision_Host)
Calls the PostProvision_Host method.
Instance: (PreProvision_Host)
Calls the PreProvision_Host method.
Instance: (Provision)
Calls the Provision method.
Method: (CustomizeRequest)
This method is used to Customize the provisioning request.
Method: (PostProvision_Host)
This method is used to perform post provisioning tasks.
Method: (PreProvision_Host)
This method is used to customize the provisioning request.
Method: (Provision)
Launches the provisioning job.
Method: (checkprovisioned)
This method checks to see if the host has been provisioned.
Class: Methods
Instance: host_and_storage_least_utilized
Calls the host_and_storage_least_utilized method.
Instance: log_Vm_event
Calls the log_vm_event method.
Automate Model
105
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Instance: Vm_allowed
Calls the vm_allowed2 method.
Instance: 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.
Instance: Stop VM, Unregister and Email Owner (Vm_Post_Retire)
Calls the vm_stop_and_unregister and vm_email_owner methods.
Instance: Vm_scan
Calls the vm_scan method.
Method: host_and_storage_least_utilized
Built in method to find least used host and storage.
Method: log_vm_event
Used to log VM events.
Method: vm_allowed
Parse a text file for VM names.
Method: vm_allowed2
Parse .csv file for VM names.
Method: vm_email_remedy
Used to send an email to Remedy.
Method: vm_scan
Used to launch a SmartState Analysis on a VM.
Method: 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
Instance: 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.
Instance: (eccq_insert)
Inserts a record into Service-Now's eccq queue.
Instance: (eccq_insert1)
106
Automate Model
Inserts a record into Service-Now's eccq queue.
Class: Service (Service)
Instance: (CatalogBundleInitialization)
Executes ConfigureParentProvisioningService.
Instance: (CatalogItemInitialization)
Executes ConfigureChildProvisioningService.
Instance: (CheckProvisioned)
Executes check_provisioned.
Instance: (ConfigureChildDialog)
Executes configurechilddialog.
Instance: Provision (provision)
Executes provision method.
Method: (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.
Method: (CatalogItemInitialization)
This method first looks in the options hash for :child_options and :child_tags then sets the options/tags for the appropriate task.
Method: Check_Provisioned(CheckProvisioned)
Checks to see if the service has been provisioned.
Method: (ConfigureChildDialog)
Configures the child dialogs for the service.
Method: Provision (provision)
Launches the provisioning job.
Class: VM Migrate (VMMigrate)
Instance: (BestHost)
Executes BestHost.
Instance: (BestStorage)
Executes BestStorage.
Instance: (CheckMigration)
Executes CheckMigration.
Instance: (Migrate)
107
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
108
Executes Migrate.
Instance: (PostMigration)
Executes PostMigration.
Instance: (PreMigration)
Executes PreMigration.
Method: (BestHost)
Future Use.
Method: (BestStorage)
Future Use.
Method: (CheckMigration)
Checks to see if the VM has been migrated.
Instance: (Migrate)
Launches the migration job.
Instance: (PostMigration)
Steps to run after migration.
Instance: (PreMigration)
Steps to run before migration.
Class: Virtual Machine (VM)
Instance: (CheckPoweredOff)
Executes check_powered_off.
Instance: (CheckProvisioned)
Executes check_provisioned.
Instance: (CheckUnregisteredFromVC)
Executes check_unregistered_from_vc.
Instance: (CustomizeRequest)
Executes CustomizeRequest.
Instance: (DeleteFromVC)
Executes delete_from_vc.
Instance: (DeleteFromVMDB)
Executes delete_from_vmdb.
Instance: (PostProvision)
Executes PostProvision.
Instance: (PostProvision_Clone_to_VM)
Executes PostProvision._Clone_to_VM.
Instance: (PowerOff)
Executes power_off.
Instance: (PreDeleteFromVC)
Executes PreDeleteFromVC.
Instance: (PreProvision)
Executes PreProvision.
Instance: (PreProvision_Clone_to_Template)
Executes PreProvision_Clone_to_Template.
Instance: (PreProvision_Clone_to_VM)
Executes PreProvision_Clone_to_VM.
Instance: (Provision)
Executes provision.
Instance: (UnregisterFromVC)
Executes unregister_from_vc.
Instance: (VdiAddVmToDesktopPool)
Executes vdi_add_vm_to_desktop_pool.
Instance: (VdiWaitForHostname)
Executes vdi_wait_for_hostname.
Method: CheckPoweredOff (check_powered_off)
Checks to see if the VM has been deleted from the VC.
Method: CheckProvisioned (check_provisioned)
Checks to see if the vm has been provisioned.
Method: CheckUnregisteredFromVC (check_unregistered_from_vc)
Checks to see if the VM is unregistered from the VC.
Method: (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.
Automate Model
109
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Method: DeleteFromVCCheck (delete_from_vc_check)
Checks to see if the VM has been deleted from the VC.
Method: DeleteFromVC (delete_from_vc)
Deletes the VM from the VC.
Method: DeleteFromVMDB (delete_from_vmdb)
Removes the VM from the VMDB database.
Method: (PostProvision)
Used to customize the provisioning object prior to provisioning.
Method: (PostProvision_Clone_to_VM)
Used to customize the provisioning object prior to provisioning.
Method: PowerOff (power_off) powers-off the VM on the VC.
Method: (PreDeleteFromVC) runs prior to deleting the VM from VC.
Method: (PreProvision)
Used to apply PreProvision customizations as follows:
Customization Spec
VLAN
VM Description/Annotations
Target VC Folder
Resource Pool
Method: (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
Method: (PreProvision_Clone_to_VM)
Used to apply PreProvision customizations during the cloning to a VM:
Customization Spec
VLAN
VM Description/Annotations
110
Automate Model
Target VC Folder
Resource Pool
Method: Provision (provision)
Launches the provisioning job.
Unknown: Scan (scan)
Performs SmartState analysis on a VM.
Method: UnregisterFromVC (unregister_from_vc)
Unregisters the VM from the VC.
Method: 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.
Method: VDI wait for hostname (vid_wait_for_hostname)
Waits for the VM's hostname, then starts the VM.
B.4.1. Namespace: StateMachines
Class: Host Provision State Machine (HostProvision)
Instance: Provision Host from PXE (host_pxe_install)
Steps to complete to provision a Host using PXE.
Method: (update_provision_status)
Updates provisioning status.
Class: Service Provision Request Approval (ServiceProvisionRequestApproval)
Instance: Default (Default)
Validates or approves request.
Method: (approve_request)
Executed when the provisioning request is auto-approved.
Method: (pending_request)
Executed when the provisioning request is NOT auto-approved.
Method: (validate_request)
Validates the request.
Class: Service Provision State Machine (ServiceProvision_Template)
Instance: clone_to_service (clone_to_service)
Steps to complete to clone a service to a service template.
Method: (update_provision_status)
111
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Updates provisioning status.
Class: VM Migration State Machine (VMMigrate)
Instance: (default)
Steps to complete to migrate a Virtual Machine.
Method: (update_migration_status)
Updates provisioning status.
Class: VM Provision Approval State Machine (ProvisionRequestApproval)
Instance: 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.
max_retirement_days: maximum number of days until retirement allowed for autoapproval.
Method: (approve_request)
Executed when the provisioning request is auto-approved.
Method: (pending_request)
Executed when the provisioning request is NOT auto-approved.
Method: (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)
Instance: 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
112
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
Method: (rejected)
Runs when the provision request quota validation has failed.
Method: (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.
Class: VM Provision State Machine (VMProvision_Template)
Instance: Clone VM to Template (clone_to_template)
Steps to complete for cloning a Virtual Machine to a template.
Method: (update_provision_status)
Updates provisioning status. Calls Service Now if applicable.
Class: VM Provision State Machine (VMProvision_VM)
Instance: Clone VM (clone_to_vm)
Steps to complete for cloning a Virtual Machine.
Instance: Provision VM from Template (template)
Steps to complete for creating a Virtual Machine from a template.
Method: (update_provision_status)
Updates provisioning status. Calls Service Now if applicable.
Class: VM Retirement State Machine (VMRetirement)
Instance: Default
Steps to complete for retiring a Virtual Machine.
Method: (update_retirement_status)
Updates retirement status.
Automate Model
113
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
B.5. Namespace: Integration
Class: BMC Remedy (Remedy)
Integration with Remedy
Instance: (Remedy_Change_Query_Service)
Executes (Remedy_Change_Query_Service).
Instance: (Remedy_ReassignRFC)
Executes (Remedy_ReassignRFC).
Instance: (Remedy_SearchCommentbyParentId)
Executes (Remedy_SearchCommentbyParentId).
Instance: (Remedy_SubmitComment)
Executes (Remedy_SubmitComment).
Method: (Remedy_Change_Query_Service)
Query Remedy Change Management Work Details.
Method: (Remedy_ReassignRFC)
Reassign Service Request in Remedy.
Method: (Remedy_SearchCommentbyParentId)
Search Remedy Comments by Parent ID.
Method: (Remedy_SubmitComment)
Submit Comments to Remedy.
Class: Configuration Management Database (CMDB)
For future use.
Instance: Activate CI (Activate)
For future use.
Instance: Called when Specified Instance is Missing (.missing)
For future use.
Instance: Deactivate CI (Deactivate)
For future use.
Instance: Register CI (Register)
For future use.
Instance: Unregister CI (Unregister)
For future use.
114
Automate Model
Class: Event (Event)
For SNMP traps.
Instance: Event - Error (Error)
For SNMP traps categorized as an Error.
Instance: Event - Information (Information)
For SNMP traps categorized as Informational.
Instance: Event - Warning (Warning)
For SNMP traps categorized as a Warning.
Method: (EVMSNMP)
For future use.
Class: HP Operations Manager (HPOM)
Used to send HPOM Alerts.
Instance: (HPOM_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.
Instance: (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.
Instance: (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.
115
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide signature - used to stamp the email with a custom signature.
Instance: (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.
Instance: (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.
Instance: (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.
Instance: (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.
Method: (HPOM_EMS_Cluster_Alert)
This method is used to send HPOM Alerts based on Cluster
Method: (HPOM_Ext_Management_System_Alert)
This method is used to send HPOM Alerts based on Provider.
116
Automate Model
Method: (HPOM_Host_Alert)
This method is used to send HPOM Alerts based on Host.
Method: (HPOM_MIQ_Server_Alert)
This method is used to send HPOM Alerts based on ManageIQ Management Engine Server.
Method: (HPOM_Storage_Alert)
This method is used to send HPOM Alerts based on Datastore.
Method: (HPOM_VM_Alert)
This method is used to send HPOM Alerts based on Virtual Machine.
Method: (Parse_HPOM_Alerts)
This method is used to parse incoming HPOM Alerts.
Class: IP Address Management (IPAM)
IPAM methods reside in this class.
Instance: Acquire IP Address (AcquireIPAddress)
Executes acquire_ip_address method.
Instance: Acquire MAC Address (AcquireMacAddress)
Executes acquire_mac_address method.
Instance: Called when Specified Instance is Missing (.missing)
Default instance.
Instance: Register ActiveDirectory (RegisterAD)
Executes register_ad method.
Instance: Register DNS (RegisterDNS)
Executes register_dns method.
Instance: Release DHCP (ReleaseDHCP)
Executes release_dhcp method.
Instance: Release IP Address (ReleaseIPAddress)
Executes release_ip_address method.
Instance: Release MAC Address (ReleaseMacAddress)
Recommended to be used for customer specific IPAM release of MAC address.
Instance: (ipam_release_ip_from_file)
Executes ipam_release_ip_from_file method.
Method: Acquire IP Address (acquire_ip_address)
117
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Used to acquire an IP Address from an IPAM Server.
Method: Acquire MAC Address (acquire_mac_address)
Used to acquire a MAC Address.
Method: Register ActiveDirectory (register_ad)
Used to register a VM in Active Directory.
Method: Register DHCP (register_dhcp)
Used to register a VM in DHCP.
Method: Register DNS (register_dns)
Used to register a VM in DNS.
Method: Release DHCP (release_dhcp)
Used to release IP Address from DHCP.
Method: Unregister DHCP (unregister_dhcp)
Used to unregister a VM from DHCP.
Method: (ipam_release_ip_from_file)
Used to release an IP Address from an ASCII file living on an appliance.
Class: VMware SRM(SRM)
Integration with VMware SRM
Instance: (querySRM)
Executes querySRM method.
Method: (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
Instance: (RunProgramInGuest)
Executes (RunProgramInGuest) method.
Method: (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.
118
Automate Model
Class: IPAM Database (IPAM_DB)
Class for IPAM Database instances.
Instance: (sample-10.0.0.10)
Class: (IPAM_Methods)
Instance: (IPAM_Acquire_from_MIQ)
Contains parameters and runs (IPAM_Acquire_from_MIQ) method.
Instance: (IPAM_Import)
Contains parameters and runs (IPAM_Import) method.
Instance: (IPAM_Release_from_MIQ)
Contains parameters and runs (IPAM_Release_from_MIQ) method.
Method: (IPAM_Acquire_from_MIQ)
Acquires IP Address information from ManageIQ Management Engine Automate Model.
Method: (IPAM_Import)
Imports IPAM .csv file into ManageIQ Management Engine Automate.
Method: (IPAM_Release_from_MIQ)
Releases IP Address information from ManageIQ Management Engine Automate Model.
Method: 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.
Instance: (InspectME)
Calls InspectMe method.
Method: (CheckMulticast)
For future use.
Method: (ConfigureChildDialog)
Sample method to configure/set child dialog values.
Method: (InspectMe)
Returns all properties of specified object.
Method: (PowerOn_DHOB)
119
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Powers On During Hours of Business is triggered using a Custom Button and allows vms to be powered on only during business hours
Method: (PreProvision_sample1)
Used to customize the provisioning object prior to provisioning.
Method: (auto_tag)
Used to Auto Tag vms based on a CA ASCII file content extracted from VM SmartState Analysis.
Method: (clone)
Run from "VM Lifecycle - Clone (vm_clone)".
Method: (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.
Method: (extend_retirement_date)
Add 14 days to retirement date when target vm has a retires_on value and is not already retired.
Method: (group_specific_quotas)
Allows for specific quotas based on LDAP group membership.
Method: (print_profiles)
Launched from "VM Lifecycle - Created (vm_created)".
Method: (vdi_reboot)
Reboots the VDI endpoint for a VM.
Method: (vm2clone)
Clone a VM to a new VM using the perl CLI.
Method: (vm2template)
Convert a VM to template using the perl CLI.
Method: (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
120
Automate Model
Method: (vmname_sample2)
This method names the vm using the following: location}#{os_type}#{domain}$n{4}
Method: (vmname_sample3)
This method names the vm based on tag category chosen in dialog.
Method: (workload_manager)
For future use.
Class: (Service_Now_Methods)
Sample methods for use with Service-now.
Method: (Create_CI)
Used to create a CMDB in Service-now.
Method: (Create_CI_For_Host)
Used to create a CMDB in Service-now.
Method: (Create_Incident)
Used to create an incident in Service-now.
Method: (Tag_By_Application)
Used to tag vms by application.
B.7. Namespace: System
Class: Automation Requests (Requests)
Instance: (Cluster_Workload_Management)
Connects to /System/Event/Alert_Cluster_Workload_Management.
Instance: Default for Undefined Requests (.missing)
Default instance.
Instance: Host - EVM Provisioning Application (UI_Host_Provision_Info)
Connects request to
/EVMApplications/Provisioning/Profile/Host/${/#user.normalized_ldap_group}#${process#message}.
Instance: (Host_Evacuation)
Connects to /System/Event/Alert_Host_Evacuation.
Instance: (InspectME)
Connects request to /Sample/Methods/InspectME.
121
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Instance: VM - EVM Provisioning Application (UI_Provision_Info)
Connects request to Group Profile
Instance: (VM_Alert_CPU_Ready)
Connects to VM_Alert CPU_Ready event.
Instance: (vm_retire_extend)
Connects to alert for retirement extension.
Class: Automation Starting Point(Process)
Instance: EVM Automation (Automation)
Connects to an instance in the Automation class.
Instance: EVM Events (Event)
Connects to instance in System/Event class.
Instance: EVM Requests (Request)
Connects to instance in System/Request class.
Method: (parse_automation_request)
Used to parse incoming automation requests.
Class: Event (Event)
Instance: Alert Cluster Workload Management (Alert_Cluster_Workload_Management)
Connects to
/EVMApplications/Operations/Intelligent_Workload_Management/Cluster_Workload_Management.
Instance: Alert Host Evacuation (Alert_Host_Evacuation)
Connects to /EVMApplications/Operations/Intelligent_Workload_Management/Host_Evacuation.
Instance: Request Approved (request_approved)
Connects to /System/Policy/request_approved.
Instance: Request Created (request_created)
Connects to /System/Policy/request_created.
Instance: 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.
Instance: Request Denied (request_denied)
Connects to /System/Policy/request_denied.
122
Automate Model
Instance: Request Pending (request_pending)
Connects to /System/Policy/request_pending.
Instance: Request Starting (request_starting)
Connects to /System/Policy/request_starting.
Instance: Request Updated (request_updated)
Connects to /System/Policy/request_updated.
Instance: VM - Alert - CPU ready (VM_Alert_CPU_Ready)
Connects to
/EVMApplications/Operations/Intelligent_Workload_Management/VM_Placement_Optimization.
Instance: VM - Analysis Aborted (vm_scan_abort)
Connects to /Automation/Vm/${#vm_scan}?vm_id=${process#vm_id}&status=error.
Instance: VM - Analysis Complete (vm_scan_complete)
Connects to /Automation/Vm/${#vm_scan}?vm_id=${process#vm_id}&status=ok.
Instance: VM - Clone Complete (CloneVM_Task_Complete)
Connects to /Automation/Vm/${#logical_event}?vm_id=${process#dest_vm_id}.
Instance: VM - Create Complete (CreateVM_Task_Complete)
Connects to /Automation/Vm/${#logical_event}?vm_id=${process#vm_id}.
Instance: VM - Creation (vm_create)
Connects to /Automation/VMLifecycle/Discovery?vm_id=${process#vm_id}.
Instance: VM - Powered Off (PowerOffVM_Task_Complete)
Connects to /Automation/Vm/${#logical_event}?vm_id=${process#vm_id}.
Instance: VM - Powered On (PowerOnVM_Task_Complete)
Connects to /Automation/vm/${#logical_event}?vm_id=${process#vm_id}.
Instance: VM - Provisioned (vm_provisioned)
Connects to /Alert/EmailNotifications/provision_complete_email.
Instance: VM - Retired (vm_retired)
Connects to /Alert/EmailNotifications/retirement_emails.
Instance: VM - Retirement Warning (vm_retire_warn)
Connects to /Alert/EmailNotifications/vm_retirement_emails.
Instance: VM - Start (vm_start)
Class: Policy (Policy)
123
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Instance: (.missing)
Instance: Host Provision Request Created (MiqHostProvisionRequest_created)
Connects provision request to auto-approval.
Instance: Host Provision Request Starting (Miq HostProvisionRequest_starting)
Future use.
Instance: Host Provision Request Updated (Miq HostProvisionRequest_Updated)
Future use.
Instance: Provision Request Created (MiqProvisionRequest_created)
Connects provision request to profile and state machine.
Instance: Provision Request Starting (MiqProvisionRequest_starting)
Connects provision request to profile and state machine.
Instance: Provision Request Updated (MiqProvisionRequest_Updated)
Connects provision request to profile and state machine.
Instance: Request Approved (request_approved)
Connects to /Alert/EmailNotifications/requestapproved.
Instance: Request Created (request_created)
Gets request type and connects to appropriate request instance.
Instance: Request Denied (request_denied)
Connects to /Alert/EmailNotifications/requestdenied.
Instance: Request Pending (request_pending)
Connects to /Alert/EmailNotifications/requestpending.
Instance: Request Starting (request_starting)
Gets request type and connects to appropriate request starting instance.
Instance: Request Updated (request_updated)
Gets request type and connects to appropriate request updated instance.
Instance: Request (request)
Executes auto_approve method.
Instance: Service Template Provision Request Created
(ServiceTemplateProvisionRequest_created)
Connects to profiles and state machines for service template provisioning.
Instance: VM Migration Request Created (VmMigrateRequest_created)
Connects request to auto-approval.
124
Instance: VM Migration Request Starting (VmMigrateRequest _starting)
Future use.
Instance: VM Migration Request Updated (VmMigrateRequest _Updated)
Future use.
Method: (MiqHostProvision_Auto_Approve)
This method auto-approves the host provisioning request.
Method: (VmMigrateRequest_Auto_Approve)
This method auto-approves the vm migration request.
Method: (get_request_type)
Used to get the incoming request type.
Automate Model
125
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
FAQs and Flows
C.1. Phase 1: Create Provision Request
Question
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?
Answer
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/<LD
AP Group Name>].
All dialogs are located on each ManageIQ
Management Engine Appliance in the
[/var/www/miq/vmdb/db/fixtures] directory.
ManageIQ Management Engine searches for a matching LDAP group in the
[/EVMApplications/Provisioning/Profile/Group] class, if an LDAP profile is NOT found then
ManageIQ Management Engine will use the
[/EVMApplications/Provisioning/Profile/Group/.mis
sing] class instance.
C.2. Phase 2: Request Approval
126
FAQs and Flow s
Question
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?
Answer
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/ProvisionRequestApprov al/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 ManageIQ Management Engine as an approver/admin and Navigate to [Virtual
Machines/Requests] and then click on the request.
C.3. Phase 3: Quota Validation
Question
Where in ManageIQ Management Engine can I set default quota thresholds for users and groups?
Where in ManageIQ Management Engine can I set individual and group quota thresholds?
Answer
These values can be set in the
[/Factory/StateMachines/ProvisionRequestQuotaV erification/Default] class instance.
Tags can be assigned to groups or users by navigating to Wrench\Configuration\Access
Control . The following are valid tags that can be
127
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
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?
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
Figure C.1. Target Type: Cloning a Template to a Virtual Machine
128
FAQs and Flow s
Figure C.2. Target Type: Clone to Template
Question
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?
Answer
This can be customized using the
[/Alert/EmailNotifications/provision_complete_emai l].
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/D efault] class instance.
Navigate to the
[/Factory/StateMachines/VMProvision_VM/clone_t o_vm] class instance.
C.5. Phase 5: Retirement
129
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Question
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?
Answer
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.
130
Inline Method to Create a Provision Request
Inline Method to Create a Provision Request
D.1. Ruby method
# ManageIQ Management Engine Automate Method
#
$evm .log( "info" , "ManageIQ 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 <<
'[email protected]|owner_last_name=Admin|owner_first_name=Admin|user_na me=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)
131
ManageIQ 6.0 Management Engine 5.2 Lifecycle and Automation Guide
Revision History
Revision 1.0.0-22 Thu May 22 2014 Shikha Nansi
Made QE changes as per Bug 1030778 - Add About this Guide sections
Revision 1.0.0-21 Thu Apr 10 2014 Suyog Sainkar
BZ#1062093 - Fix typo BZ#1042691 - Updated references about PXE implementation
BZ#1042691 - Updated references about PXE implementation
Revision 1.0.0-20 Mon Feb 24 2014 Brian Moss
ManageIQ 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
Brian Moss Revision 1.0.0-19 Fri Jan 24 2014
BZ 1012541 - Clarify language for global default settings
Revision 1.0.0-18 Wed Jan 8 2014
BZ 1049539 - Remove option to type a retirement date
Brian Moss
Brian Moss Revision 1.0.0-17
Updates for minor release
Revision 1.0.0-16
Preparing
Tue Dec 3 2013
Mon Nov 4 2013
Revision 1.0.0-15
Retrying build after build failure
Sun Nov 3 2013
Revision 1.0.0-14 Fri Nov 1 2013
Marking up N/C/M/I as bold in Automate Model
Dan Macpherson
Dan Macpherson
Dan Macpherson
Revision 1.0.0-13
Adding new Author Group file
Thu Oct 31 2013
Wed Oct 30 2013 Revision 1.0.0-12
Finalizing
Revision 1.0.0-11
Finalizing
Revision 1.0.0-10
Bumping to version 3.0
Thu Oct 17 2013
Tue Oct 15 2013
Dan Macpherson
Dan Macpherson
Dan Macpherson
Dan Macpherson
Revision 1.0.0-9 Mon Oct 14 2013 Dan Macpherson
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
132
Revision 1.0.0-8 Fri Oct 11 2013
Fixing highlighting for automate method
Revision 1.0.0-7 Fri Oct 11 2013
Updating Product and Component for Feedback page
Revision 1.0.0-6 Thu Sep 26 2013
New methods added to the Settings and Ops Guide
Default password added to Quick Start Guide
Revision 1.0.0-5 Thu Sep 19 2013
Revision of some provisioning sections
Revision 1.0.0-4
Minor changes
Wed Sep 18 2013
Wed Sep 18 2013 Revision 1.0.0-3
Generation of new Beta
Revision 1.0.0-1
Creation of first draft
Fri Aug 23 2013
Dan Macpherson
Dan Macpherson
Dan Macpherson
Revision History
Dan Macpherson
Dan Macpherson
Dan Macpherson
Dan Macpherson
133
advertisement
Key Features
- Provisioning
- Workload Management
- Orchestration
- Automate
- Lifecycle Management
- Service level resource enforcement
- Resource Management
- Configuration and Change Management
- Enforced closed loop change management
Questions & Answers
O O K
What does ManageIQ Management Engine do?
O O K
What is ManageIQ Management Engine?
Who is this document relevant to?
What is the purpose of ManageIQ Management Engine?
Frequently Answers and Questions
What is ManageIQ Management Engine?
What are the key features of ManageIQ Management Engine?
What are the benefits of using ManageIQ Management Engine?
Related manuals
advertisement
Table of contents
- 5 Table of Contents
- 10 Preface
- 10 1. Document Conventions
- 10 1.1. Typographic Conventions
- 11 1.2. Pull-quote Conventions
- 12 1.3. Notes and Warnings
- 12 2. Getting Help and Giving Feedback
- 12 2.1. Do You Need Help?
- 12 2.2. Give us Feedback
- 14 Chapter 1. Introduction to ManageIQ
- 14 1.1. Architecture
- 15 1.2. Requirements
- 15 1.3. Terminology
- 19 1.4. About this Guide
- 20 Chapter 2. ManageIQ Management Engine Lifecycle
- 20 2.1. Provisioning
- 20 2.2. Automation
- 22 Chapter 3. Provisioning Requests
- 22 3.1. Requirements for Provisioning Virtual Machines and Instances
- 22 3.1.1. Requirements for Provisioning Virtual Machines from VMware Providers
- 23 3.1.2. Requirements for Provisioning Virtual Machines from Red Hat Enterprise Virtualization Manager
- 24 3.1.3. PXE Provisioning
- 24 3.1.3.1. PXE Provisioning
- 24 3.1.3.2. Connecting to a PXE Server
- 26 3.1.3.3. Creating System Image Types for PXE
- 27 3.1.3.4. Setting the PXE Image Type for a PXE Image
- 27 3.1.4. ISO Provisioning
- 27 3.1.4.1. ISO Provisioning
- 28 3.1.4.2. Adding an ISO Datastore
- 28 3.1.4.3. Refreshing an ISO Datastore
- 28 3.1.4.4. Creating System Image Types for ISO
- 29 3.1.4.5. Setting the Image Type for an ISO Image
- 30 3.1.5. Customization Templates for Virtual Machine and Instance Provisioning
- 30 3.1.5.1. Customization Script Additions for Virtual Machine and Instance Provisioning
- 31 3.1.5.2. Adding a Customization Template
- 32 3.2. Requirements for Provisioning a Host
- 33 3.2.1. IPMI Hosts
- 33 3.2.1.1. IPMI Hosts
- 33 3.2.1.2. Discovering the Management Interface for an IPMI Host
- 34 3.2.1.3. Adding IPMI Credentials to a Discovered Host
- 34 3.2.1.4. Adding the Management Interface for an IPMI Host
- 35 3.2.2. Customization Templates for Host Provisioning
- 35 3.2.2.1. Customization Script Additions
- 35 3.2.2.2. Adding a Customization Template
- 36 3.3. Provisioning a Host
- 39 3.4. Provisioning Virtual Machines
- 39 3.4.1. Provisioning a Virtual Machine from a Template
- 44 3.4.2. Cloning a Virtual Machine (VMware Virtual Machines Only)
- 45 3.4.3. Publishing a Virtual Machine to a Template (VMware Virtual Machines Only)
- 45 3.5. Provisioning Instances
- 45 3.5.1. Provisioning an Instance from an Image
- 46 3.6. Customizing Provisioning Dialogs
- 46 3.6.1. Customizing Provisioning Dialogs
- 47 3.6.2. Adding a Provision Dialog for all Users
- 47 3.6.3. Creating a Custom Provision Dialog
- 49 3.7. Provisioning Profiles
- 49 3.7.1. Provisioning Profiles
- 49 3.7.2. Creating a Provisioning Profile Instance
- 51 3.7.3. Using Tags to set a Scope for Provisioning
- 52 Chapter 4. Working with Requests
- 52 4.1. Provisioning Request Approval Methods
- 52 4.2. Working with Provisioning Requests
- 52 4.3. Reloading the Status of Provisioning Requests
- 52 4.4. Approving a Provisioning Request
- 52 4.5. Denying a Provisioning Request
- 53 4.6. Copying a Provisioning Request
- 53 4.7. Editing a Provisioning Request
- 53 4.8. Deleting a Provisioning Request
- 54 4.9. Automatically Approving Requests
- 54 4.9.1. Automatically Approving Requests
- 54 4.9.2. Enabling Global Defaults for Automatic Approval
- 56 4.9.3. Template Specific Approval Defaults
- 56 4.9.4. Assigning Tags to a Template for Auto Approval
- 57 4.10. Setting Provisioning Notification Email Addresses
- 58 Chapter 5. Fulfilling Requests
- 58 5.1. Fulfilling a Request
- 58 5.1.1. Fulfilling a Request
- 58 5.1.2. Default Execution Steps in States Instance
- 58 5.2. Quotas
- 58 5.2.1. Quotas
- 59 5.2.2. Editing the Default Quota
- 59 5.2.3. Using Tags for Owner and Group Quotas
- 60 5.2.4. Applying a Tag to a User or User Group
- 60 5.3. State Machines
- 60 5.3.1. State Machines
- 62 5.3.2. Customizing Provisioning States
- 62 5.3.3. Editing the Default States Instance
- 62 5.3.4. Viewing the Status of a Provisioning Request
- 63 5.3.5. Viewing a Provisioned Virtual Machine or Instance
- 63 5.3.6. Viewing a Virtual Machine or Instance Summary
- 64 Chapter 6. Catalogs and Services
- 64 6.1. About Catalogs and Services
- 64 6.2. Terminology
- 64 6.3. Catalogs
- 64 6.3.1. Catalogs
- 65 6.3.2. Creating a Catalog Item
- 66 6.3.3. Service Dialogs
- 66 6.3.3.1. Service Dialogs
- 66 6.3.3.2. Adding a Service Dialog
- 68 6.3.4. Methods
- 68 6.3.4.1. Creating a Method to Associate with the Dialog
- 70 6.3.4.2. Creating a Method in the Factory/Service Class
- 70 6.3.4.3. Creating an Instance in the Factory/Service Class
- 71 6.3.4.4. Associating a Method with an Automate Instance
- 71 6.3.4.5. Creating a Catalog Bundle
- 72 6.3.4.6. Provisioning a Service
- 73 Chapter 7. Retirement
- 73 7.1. Retiring Virtual Machines
- 73 7.1.1. Retiring Virtual Machines and Instances
- 73 7.1.2. Using the ManageIQ Management Engine Console to Retire
- 73 7.1.3. Retiring a Virtual Machine Immediately
- 73 7.1.4. Setting a Retirement Date for a Virtual Machine or Instance
- 74 7.1.5. Removing a Retirement Date for a Virtual Machine or Instance
- 74 7.2. Setting Retirement in a Provision Request
- 74 7.2.1. Setting Retirement in a Provision Request
- 74 7.2.2. Scheduling Retirement in a Provision Request
- 75 7.3. Extending Retirement Dates
- 75 7.3.1. Creating a Custom Button to Extend Retirement
- 75 7.3.2. Changing the Number of Days to Extend Retirement
- 77 Chapter 8. Automate Model
- 77 8.1. About Automate
- 77 8.2. Automate Model
- 77 8.3. Creating a Class
- 78 8.4. Creating a Schema for a Class
- 79 8.5. Editing a Field in a Schema
- 79 8.6. Editing Schema Sequence
- 80 8.7. Adding an Instance to a Class
- 80 8.8. Relationships
- 80 8.8.1. Relationship Syntax
- 80 8.8.2. Table: Relationship Examples
- 81 8.9. Methods
- 81 8.9.1. Methods
- 81 8.9.2. Installing a Windows SmartProxy for PowerShell
- 82 8.9.3. Creating a Method
- 82 8.10. Simulation
- 82 8.10.1. Simulation
- 82 8.10.2. Simulating an Automate Model
- 83 8.11. Importing, Exporting, and Resetting the Datastore
- 83 8.11.1. Importing, Exporting, and Resetting the Datastore
- 84 8.11.2. Exporting All Datastore Classes
- 84 8.11.3. Importing Datastore Classes
- 84 8.11.4. Resetting Datastore to Default
- 85 Chapter 9. Invoking Automate
- 85 9.1. Automate Examples
- 85 9.2. Invoking Automate using a Custom Button
- 85 9.3. Creating a Custom Button Group
- 86 9.4. Creating a Custom Button
- 86 9.5. Editing a Custom Button
- 87 9.6. Deleting a Custom Button
- 87 9.7. Using a Custom Button
- 87 9.8. Initiating Automate from an Event
- 87 9.8.1. Initiating Automate from an Event
- 88 9.8.2. Creating a Policy for Automate
- 89 9.8.3. Creating a Custom Automate Action
- 90 Objects
- 90 A.1. Virtual Machine Properties
- 92 A.2. ManageIQ Management Engine Methods for use in Ruby Scripts
- 93 A.3. Factory Methods for VMs
- 93 A.4. Host Properties
- 95 A.5. Provider Properties
- 96 A.6. Storage Properties
- 98 Automate Model
- 98 B.1. Namespace: Alert
- 104 B.2. Namespace: Automation
- 104 B.3. Namespace: EVMApplications
- 104 B.3.1. Namespace: Operations
- 105 B.3.1.1. Namespace: Profile
- 106 B.3.2. Namespace: Provisioning
- 107 B.3.2.1. Namespace: Profile
- 109 B.4. Namespace: Factory
- 115 B.4.1. Namespace: StateMachines
- 118 B.5. Namespace: Integration
- 122 B.5.1. Namespace: MIQ_IPAM
- 123 B.6. Namespace: Sample
- 125 B.7. Namespace: System
- 130 FAQs and Flows
- 130 C.1. Phase 1: Create Provision Request
- 130 C.2. Phase 2: Request Approval
- 131 C.3. Phase 3: Quota Validation
- 132 C.4. Phase 4: Provisioning
- 133 C.5. Phase 5: Retirement
- 135 Inline Method to Create a Provision Request
- 135 D.1. Ruby method
- 136 Revision History