Red Hat Training

A Red Hat training course is available for Red Hat CloudForms

Configuring the Lenovo Physical Infrastructure Provider for Red Hat CloudForms

Red Hat CloudForms 4.7

Adding and configuring the Lenovo physical infrastructure provider in Red Hat CloudForms

Red Hat CloudForms Documentation Team

Lenovo Documentation

Abstract

Adding and configuring the Lenovo physical infrastructure provider in Red Hat CloudForms.
If you have a suggestion for improving this guide or have found an error, please submit a Bugzilla report at http://bugzilla.redhat.com against Red Hat CloudForms Management Engine for the Documentation component. Please provide specific details, such as the section number, guide name, and CloudForms version so we can easily locate the content.

Chapter 1. Overview

The Lenovo® Physical Infrastructure Provider provides IT administrators the ability to integrate the management features of Lenovo XClarity Administrator with the hybrid-cloud management capabilities of Red Hat CloudForms. Lenovo expands the physical-infrastructure management for on-premise cloud configurations by leveraging Lenovo hardware management. It provides the configuration, monitoring, event management, and power monitoring needed to reduce cost and complexity through server consolidation and simplified management.

Key features include:

  • Seamlessly integrates with one or more XClarity Administrator virtual appliances, providing a summary view of the Lenovo infrastructure, relationship views of physical servers and virtual hosts, and configuration of servers using Configuration Patterns. In addition, there is a dashboard view that displays the following:

    • The number of servers, switches, racks, and storage systems being mangaged
    • Widgets that display information about server health, availability, and recently discovered servers
  • Provides a single interface to monitor Lenovo hardware that is managed by multiple instances of XClarity Administrator
  • Automatically discovers hardware that is managed by XClarity Administrator
  • Manage devices for use in on-premise cloud deployments
  • Provides a timeline of server events
  • Uses customizable filters to organize views of managed devices across the data center
  • Generates relationships between physical servers and the virtual hosts (such as ESXI, ovirt, KVM, and Red Hat OpenStack)
  • Manages current system settings (such as BMC, uEFI, and boot order settings) on the managed devices
  • Simplifies system management through custom policies and automation that respond to the health status of hardware devices

Chapter 2. Configuring XClarity Administrator

XClarity Administrator virtual appliances are connected to CloudForms by adding physical-infrastructure providers. Physical-infrastructure providers enable you to manage and interact with devices that are managed by XClarity Administrator. After the physical-infrastructure provider is added, the devices that are managed by the XClarity Administrator are registered in CloudForms. Managed devices can be monitored, configured, and updated using XClarity Administrator. The physical-infrastructure provider surfaces information about these managed devices and the XClarity Administrator instance.

2.1. Setting up XClarity Administrator

For information about downloading and setting up XClarity Administrator, see Installing and setting up Lenovo XClarity Administrator in the XClarity Administrator online documentation.

Note: You can use all available features in XClarity Administrator for free for up to 90 days. After 90 days, you can continue to use XClarity Administrator to manage and monitor your hardware for free; however, you must purchase a full-function-enablement license to continue using XClarity Administrator to configure your hardware using Configuration Patterns and to deploy operating systems. Lenovo XClarity Pro provides entitlement to service and support and the full-function-enablement license for XClarity Administrator. For more information about purchasing Lenovo XClarity Pro, contact your Lenovo representative or authorized business partner.

2.2. Discovering and managing hardware using XClarity Administrator

XClarity Administrator can discover manageable devices in your environment by performing an SLP discovery for devices that are on the same IP subnet as XClarity Administrator. A specified IP address or range of IP addresses also can be used, or information can be imported from a spreadsheet, a process that is known as a bulk import. Discovery options can be accessed by clicking Hardware > Discover and Manage New Devices from the menu bar. Discovered devices can then be managed by XClarity Administrator. During the management process, you are asked for login credentials for the management controller of the target servers and given the option to create a recovery account for the servers. For more information about discovering and managing devices, see the XClarity Administrator online documentation.

Note:

  • Ensure that the devices that you intend to manage are supported by XClarity Administrator. For information about supported devices, see Supported devices in the XClarity Administrator online documentation.
  • Ensure that firmware for all devices that you intend to manage using XClarity Administrator are at the required levels. For more information about supported firmware levels, see Supported firmware in the XClarity Administrator online documentation.

Chapter 3. Managing physical-infrastructure providers

3.1. Adding a physical-infrastructure provider

XClarity Administrator virtual appliances are connected to CloudForms by adding physical-infrastructure providers. Physical-infrastructure providers enable you to manage and interact with devices that are managed by XClarity Administrator.

Note: You must be logged in to CloudForms as a user with permission to add providers. The default user is admin, password smartvm.

Complete the following steps for each XClarity Administrator instance that you want to connect to CloudForms.

To connect to a specific XClarity Administrator instance:

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click Configuration, then click Add a New Infrastructure Provider.
  3. Enter a Name for the provider (for example, Physical Infrastructure Manager).
  4. From the Type list, select "Lenovo XClarity".
  5. Accept the default Zone.
  6. In the credentials area, provide the following:

    1. Enter the hostname, IPv4 address, or IPv6 address of the XClarity Administrator instance.
    2. Enter “443” for the API port.
    3. Enter the username and password used to log in to the XClarity Administrator instance.
  7. Click Validate to confirm that you can connect to the XClarity Administrator instance.
  8. Click Add.

To discover and then connect to a range of XClarity Administrator instances:

  1. Discover XClarity Administrator instances:

    1. Navigate to Compute > Physical Infrastructure > Providers.
    2. Click Configuration, then click Discover Physical Infrastructure Providers.
    3. From the Type list, select “Lenovo XClarity Administrator.”
    4. Enter the IP address range starting with From Address and ending with To Address.
    5. Enter the port.
    6. Click Start to begin the discovery process.
  2. Update credentials for each discovered physical-infrastructure provider (XClarity Administrator instance):

    1. Navigate to Compute > Physical Infrastructure > Providers.
    2. Select the providers to be edited.
    3. Click the Configuration button in the menu.
    4. Click Edit selected infrastructure providers.
    5. Enter the username and password used to log in to the XClarity Administrator instance.
    6. Click Validate to confirm that you can connect to the XClarity Administrator instance.
    7. Click Save. A flash message is displayed, confirming your changes were performed successfully.

After adding the physical-infrastructure providers, you can view all available providers by navigating to Compute > Physical Infrastructure > Providers as shown below.

providers

3.2. Refreshing physical-infrastructure providers

CloudForms regularly polls the physical-infrastructure providers to retrieve the latest data, including managed devices, relationships, and power states. You can manually retrieve the latest data by completing the following steps.

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Select a physical-infrastructure provider to be refreshed.
  3. Click Configuration, then click Refresh Relationships and Power States.
  4. Click OK.

3.3. Removing a physical-infrastructure provider

You can delete a physical-infrastructure provider by completing the following steps.

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Select the physical-infrastructure provider to be removed.
  3. Click Configuration, then click Remove Infrastructure Providers from Inventory.
  4. Click OK.

3.4. Editing a physical-infrastructure provider

You can modify system settings for a physical-infrastructure provider by completing the following steps.

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Select the physical-infrastructure provider to be modified.
  3. Click the Configuration button in the menu.
  4. Click Edit selected infrastructure providers.
  5. Make the required changes, and revalidate credentials if necessary.
  6. Click Save. A flash message is displayed, confirming your changes were performed successfully.

3.5. Changing the password of the XClarity Administrator instance through its physical-infrastructure provider

Within CloudForms, you can change the password of an XClarity Administrator instance through the physical-infrastructure provider with which it is associated. Changing the password this way also changes the password in CloudForms so that they match.

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be modified.
  3. Click on the Authentication button in the top menu and select Change password. The Change Password for Physical Infrastructure Provider page is displayed.
  4. Enter the current password for the XClarity Administrator instance in the Current Password field.
  5. Enter the new password in the New Password and Confirm New Password fields.
  6. Click Save.

Chapter 4. Viewing relationships

4.1. Viewing relationships between physical servers and virtual hosts

CloudForms shows relationships between virtual host systems and physical servers and the virtual hosts for each physical-infrastructure provider. The topology view provides a graphical representation of the relationships, allowing you to easily navigate between connected nodes (see the following figure).

topology widget

To display the topology view for a specific physical-infrastructure provider, complete the following steps.

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. Once the page loads, ensure that the summary view is being used.
  4. Click on Topology in the Overview table to display the Topology page. From this page, you can perform the following actions:

    • Hide or show all physical server by clicking Physical Servers.
    • Hide or show all hosts by clicking Hosts.
    • Hide or show all VMs by clicking VMs.
    • Hide or show nodes in the graph that have a particular health state by clicking on one of the following states: Valid, Warning, Critical, or Unknown.
    • Double-click or right-click a node in the graph to navigate to the summary pages for that node.

4.2. Viewing server relationships

You can view a list of all physical servers that are managed by a specific physical-infrastructure provider.

4.2.1. From the physical-infrastructure provider summary view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the summary view is being used.
  4. Click on Physical Servers in the Relationships table.

4.2.2. From the physical-infrastructure provider dashboard view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the dashboard view is being used.
  4. Click on the number of servers that is displayed displayed in the Servers card.

4.3. Viewing virtual-host relationships

You can view a list of physical servers that are associated with hosts that are managed by a specific physical-infrastructure provider.

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the summary view is being used.
  4. Click on Physical Servers with Host in the Relationships table.

A list of physical servers that are associated with hosts are displayed as shown below.

host relationships

4.4. Viewing storage relationships

You can view a list of all storage systems that are managed by a specific physical-infrastructure provider.

4.4.1. From the physical-infrastructure provider summary view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the summary view is being used.
  4. Click on Physical Storages in the Relationships table.

4.4.2. From the physical-infrastructure provider dashboard view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the dashboard view is being used.
  4. Click on the number of storage systems that is displayed in the Storages card.

4.5. Viewing switch relationships

You can view a list of all switches that are managed by a specific physical-infrastructure provider.

4.5.1. From the physical-infrastructure provider summary view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the summary view is being used.
  4. Click on Physical Switches in the Relationships table.

4.5.2. From the physical-infrastructure provider dashboard view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the dashboard view is being used.
  4. Click on the number of switches that is displayed in the Switches card.

4.6. Viewing chassis relationships

You can view a list of chassis that are managed by a specific physical-infrastructure provider.

4.6.1. From the physical-infrastructure provider summary view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the summary view is being used.
  4. Click on Physical Chassis in the Relationships table.

4.6.2. From the physical-infrastructure provider dashboard view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the dashboard view is being used.
  4. Click on the number of chassis that is displayed in the Chassis card.

4.7. Viewing rack relationships

You can view a list of all racks that are managed by a specific physical-infrastructure provider.

4.7.1. From the physical-infrastructure provider summary view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the summary view is being used.
  4. Click on Physical Racks in the Relationships table.

4.7.2. From the physical-infrastructure provider dashboard view

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Click on the physical-infrastructure provider to be viewed.
  3. After the page loads, ensure that the dashboard view is being used.
  4. Click on the number of racks that is displayed in the Racks card.

Chapter 5. Managing physical servers

After the Lenovo physical-infrastructure provider is added, the servers that are managed by XClarity Administrator are registered in CloudForms. You can then view and manage those servers.

Note: It may take a few seconds or so for the servers to appear after adding a physical-infrasturcture provider.

5.1. Viewing a Physical Server

To view a list of all physical servers that are managed by all physical-infrastructure providers, navigate to Compute > Physical Infrastructure > Servers. The Physical Servers page is displayed (see the following figure).

Tip: You can sort the table columns to make it easier to find specific servers. In addition, you can choose the types of servers to display by selecting server types from the Filters drop-down list or entering text (such as a name or IP address) in the Search field.

physical servers

5.2. Viewing the timeline for a physical server

A timeline is a tool that enables you to track the state of a physical server over a period of time. This includes power activity, device additions and removals, and firmware changes. The timeline is useful to identify critical failures, identify behavior patterns, audit user actions, and troubleshoot problems.

Note: Timelines are available only for physical servers that have associated events.

To view the timeline with events for a specific physical server, complete the following steps

  1. Navigate to Compute > Physical Infrastructure > Servers.
  2. Select the physical server that has events.
  3. Click the Monitoring > Timelines from the top menu.
  4. Select the event types and the period in the options filter. Filters can be used to focus attention on specific messages of interest in a specific time interval.
  5. Click Apply. The timeline is displayed with events that match the specified filters. You can click an event to view the event details.

5.3. Powering on and off a physical server

You can perform power operations on the physical servers by completing the following steps.

  1. Navigate to Compute > Physical Infrastructure > Servers.
  2. Select the physical server.
  3. Click Power from the top menu, and then click one of the following power actions:

    • Power on - Powers on the server.
    • Power off - Shuts down the operating system and powers off the server.
    • Power off immediately - Powers off the server.
    • Restart - Shuts down the operating system and restarts the server.
    • Restart immediately - Restarts the server.
    • Restart to System Setup - Restarts the server back to default BIOS/UEFI (F1) Setup.
    • Restart Management Controller - Restarts the baseboard management controller in the sever.

physical server power

5.4. Locating a physical server

You can change the Location LED state on a physical server to locate the sever in the data center.

  1. Navigate to Compute > Physical Infrastructure > Servers.
  2. Select the physical server.
  3. Click Identify from the top menu, and then click the appropriate action: Blink LED, Turn On LED, or Turn Off LED.

physical server identify led

5.5. Provisioning physical servers using configuration patterns

You can use configuration patterns in XClarity Administrator to quickly provision or preprovision multiple servers from a single set of defined configuration settings. Configuration patterns act as templates for configuring logical storage, I/O adapters, boot order, and other baseboard management controller and Unified Extensible Firmware Interface (UEFI) settings.

A physical-infrastructure provider can discover configuration patterns that are defined on the associated XClarity Administrator instance. A configuration pattern can then be applied to a single or multiple physical servers.

Note: Configuration patterns can be assigned only to physical servers that do not have a pattern assigned to them.

physical server provision

You can deploy a configuration pattern to one or more physical server by completing the following steps.

  1. Navigate to Compute > Physical Infrastructure > Servers to display the Physical Servers page.
  2. Click a server (to display the server details page) or select multiple servers that you want to provision.
  3. Click Lifecycle > Provision Physical Server from the top menu to display the Add Physical Server page.
  4. On the Request tab, enter an email address into the E-Mail field.
  5. On the Catalog tab, select the configuration pattern that you want to deploy from the Configuration Pattern drop-down menu, and then click Submit. The Requests page is displayed.
  6. Click the request that was created to deploy the configuration pattern from the Requests table. The Apply Configuration Pattern page is displayed.
  7. Click the check mark button.
  8. Enter the reason for performing this action in the Reason field.
  9. Click Submit to deploy the configuration pattern to the specified server. You can monitor the status of the action in the Requests table.

5.6. Viewing network devices that are associated with a physical server

From the Physical Server Summary page, you can access details about network devices such as network interface cards.

  1. Access the Physical Servers page, as described in the Section 5.1, “Viewing a Physical Server” section, and then select a physical server. The Physical Server Summary page is displayed.
  2. Click on the Network Devices count in the Properties table. A list of network devices is displayed.
  3. Select a network device from the list. The Network Device Summary page is displayed.

network device summary

5.7. Viewing storage devices that are associated with a physical server

From the Physical Server Summary page, you can access details about storage devices, such as RAID cards.

  1. Access the Physical Servers page, as described in the Section 5.1, “Viewing a Physical Server” section, and then select a physical server. The Physical Server Summary page is displayed.
  2. Click on the Storage Devices count in the Properties table. A list of storage devices is displayed.
  3. Select a storage device from the list. The Storage Device Summary page is displayed.

storage device summary

5.8. Adding physical server widgets to the dashboard

You can add widgets that display information about physical servers to the default dashboard.

  1. Navigate to Cloud Intel > Dashboard.
  2. Click on the + button from the top menu, and select one of the following widgets:

    • Physical Server Availability
    • Physical Server Health
    • Recently Discovered Physical Servers

The widget is now displayed on the default dashboard.

5.9. Creating a user that belongs to the physical infrastructure usergroup

You can use the physical infrastructure usergroup to manage physical infrastructures. Users that belong to this group have a default dashboard that contains physical server widgets. The physical server widgets show useful information, such as server health, availability, and recently discovered servers.

To gain the benefits of this usergroup, you must create a new user that belongs to the physical infrastructure group.

  1. Follow the steps described in the Creating a User section in the CloudForms General Configuration documentation. For the group, choose EvmGroup-physical_infrastructure.

After the user is created, log in as the new user, and the default dashboard containing physical server widgets is displayed.

Chapter 6. Managing physical chassis

After the Lenovo physical-infrastructure provider is added, the physical chassis that are managed by XClarity Administrator are registered in CloudForms. You can then view and manage the chassis.

6.1. Viewing physical chassis

To view a list of all physical chassis that are managed by all physical-infrastructure providers, navigate to Compute > Physical Infrastructure > Chassis. The Physical Chassis page is displayed (see the following figure).

Tip: You can sort the table columns to make it easier to find a specific chassis.

physical chassis

6.2. Locating a physical chassis

You can change the Location LED state on a physical chassis to locate a chassis in the data center.

  1. Navigate to Compute > Physical Infrastructure > Chassis.
  2. Select the physical chassis. The Physical Chassis Summary page is displayed.
  3. Click on Identify in the top menu, and then click on the appropriate action: Blink LED, Turn On LED, or Turn Off LED.

physical chassis identify led

Chapter 7. Managing physical racks

After the Lenovo physical-infrastructure provider is added, the physical racks that are managed by XClarity Administrator are registered in CloudForms. You can then view and manage the racks.

7.1. Viewing physical racks

To view a list of all physical racks that are managed by all physical-infrastructure providers, navigate to Compute > Physical Infrastructure > Racks. The Physical Racks page is displayed (see the following figure).

Tip: You can sort the table columns to make it easier to find a specific rack.

physical racks

Chapter 8. Managing physical storage systems

After the Lenovo physical-infrastructure provider is added, the physical storage systems that are managed by XClarity Administrator are registered in CloudForms. You can then view and manage the storage systems.

8.1. Viewing physical storage systems

To view a list of all physical storage systems that are managed by all physical-infrastructure providers, navigate to Compute > Physical Infrastructure > Storages. The Physical Storages page is displayed (see the following figure).

Tip: You can sort the table columns to make it easier to find a specific storage system.

physical storage

Chapter 9. Managing physical switches

After the Lenovo physical-infrastructure provider is added, the physical switches that are managed by XClarity Administrator are registered in CloudForms. You can then view and manage the switches.

9.1. Viewing physical switches

To view a list of all physical switches that are managed by all physical-infrastructure providers, navigate to Compute > Physical Infrastructure > Switches. The Physical Switches page is displayed (see the following figure).

Tip: You can sort the table columns to make it easier to find a specific switch.

physical switches

9.2. Restarting physical switches

You can restart a physical switch that is managed by the physical-infrastructure provider.

  1. Navigate to Compute > Physical Infrastructure > Switches.
  2. Select a physical switch. The Physical Switches Summary page is displayed.
  3. Click on Power in the top menu, and then click on Restart.

physical switch restart

Chapter 10. Automating tasks based on events

You can use CloudForms to automatically perform specific tasks when certain events occur on servers that are managed by XClarity Administrator through a Lenovo physical-infrastructure provider. To create an automation task, you must create and configure a custom domain. To automatically invoke the task when a certain event occurs, you must create, configure and assign a custom policy.

For more information about the CloudForms automation function, see Scripting Actions in CloudForms website.

10.1. Creating an automated task

To create an automated task, you must first create and configure a custom domain.

A domain is a collection of tasks that can be automated. The tasks are run in a sequence that is defined by the domain priority. A task in a domain with a higher priority overrides the same task in a lower-priority domain. In this way, CloudForms provides core domains and allows you to override automated tasks using your own custom domains.

Each domain contains a set of namespaces. A namespace is a container that organizes and categorizes tasks. A namespace can contain child namespaces as well as classes.

A class is a template for a specific task. A class uses a schema to populate a class instance with default values. A class instance can contain attributes, calls to methods, and relationships.

The methods define the task that you want to perform. It uses Ruby code to run the various operations.

As an example, the following steps describe how to create an automated task for performing a power action (such as powering on, power off, or restarting the server) on the physical server which is first detected by the Lenovo physical-infrastructure provider.

Note: You must be logged in to CloudForms as a user with permission to create domains. The default user is admin, password smartvm.

10.1.1. Step 1. Create a custom domain.

  1. Navigate to Automation > Automate > Explorer.
  2. Click Configuration > Add a New Domain from the top menu.
  3. Enter a domain name (for example, Lenovo).
  4. Select Enable to enable the domain.
  5. Click Add.

10.1.2. Step 2. Add the LenovoXclarity and Event Handler class to the custom domain.

  1. Copy the LenovoXclarity class to the custom domain.

    1. Select the ManageIQ core domain.
    2. Navigate to ManageIQ > System > Event > EmsEvent > LenovoXclarity.
    3. Click Configuration > Copy this Class from the top menu.
    4. Select the custom domain from the To Domain drop-down menu.
    5. Click Copy.
  2. Copy the Event Handler class to the custom domain.

    1. Select the ManageIQ core domain.
    2. Navigate to ManageIQ > System > Event Handlers.
    3. Select the instance that you wish (for example, event_action_policy).
    4. Click Configuration > Copy this Instance from the top menu.
    5. Select the custom domain from the To Domain drop-down menu.
    6. Click Copy.
    7. Select the event_action_policy method.
    8. Click the Configuration icon, and then click the Copy this method icon.
    9. Click Copy.
  3. Create a new instance of the LenovoXclarity class.

    1. Select the ManageIQ core domain.
    2. Navigation to name of the custom domain (for example, Lenovo), and click System > Event > EmsEvent >LenovoXclarity.
    3. Click Configuration > Add a new Instance from the top menu.
    4. Enter a name for the new class instance (for example, FQXHMTS0003G, which is the event that is generated when inventory data cannot be retrieved from a device).

      Important: The class-instance name must be the same as the name of the event that triggers the task to be invoked. CloudForms matches the class instance with the event by this name. To find the event name, see Messages in the XClarity Administrator online documentation.

    5. Add the path to the event handlers copied in the field’s rel3.

      There are three available policy operations:

      • Physical Server Reset
      • Physical Server Start
      • Physical Server Shutdown

        There are three available policy events:

      • physical_server_reset
      • physical_server_start
      • physical_server_shutdown

        The policy actions and the policy events must match. For example, use the following path to the policy operation Physical Server Shutdown:

        /System/event_handlers/event_action_policy?target=physical_server&policy_event=physical_server_shutdown&param=

      The policy_event value is matched with the policy operation applied.

    6. Click Add.

10.1.3. Step 3. Create a namespace.

  1. Select the custom domain (Lenovo) .
  2. Click Configuration > Add a New Namespace from the top menu.
  3. Enter a unique name for the namespace (for example, Functions).
  4. Click Add.

10.1.4. Step 4. Create a class.

  1. Select the namespace that you created in the previous step (for example, Functions).
  2. Click Configuration > Add a New Class from the top menu.
  3. Enter a unique name for the class (for example, Power_actions).
  4. Click Add.

10.1.5. Step 5. Create a method for the class.

  1. Create a method.

    1. Select the class that you created (for example, Power_actions).
    2. Click the Methods tab.
    3. Click Configuration > Add a new method from the top menu.
    4. Select “inline” for the type.
    5. Enter a name for the method (for example, power_off).
    6. Enter the following script in the Data field:

      server = $evm.vmdb('PhysicalServer').first
      $evm.log(:info, "Powering Server #{server.name} OFF")
      server.power_off
      exit MIQ_OK
    7. Click Validate to verify the syntax.
    8. Click Add.
  2. Add a schema to the class.

    1. Select the class that you created (for example, Power_actions).
    2. Select the Schema tab.
    3. Click Configuration > Edit selected Schema from the top menu.
    4. Click the + icon to add a field to the schema.
    5. Enter “execute” for the name.
    6. Select “Method” for the type.
    7. Select “String” for the data type.
    8. Enter “Power_actions” for the default value.
    9. Click the check mark icon.
    10. Click Save.
  3. Add the method to the class.

    1. Select the Instances tab.
    2. Enter the name of the method that you created earlier (for example, power_off).
    3. Click Add.

10.2. Invoking an automated task when an event occurs

To automatically invoke the task when a certain event occurs, you must create, configure and assign a custom policy.

As an example, the following steps describe how to perform a specific automated task when CloudForms receives certain events (that you define).

Note: You must be logged in to CloudForms as a user with permission to create policies. The default user is admin, password smartvm.

10.2.1. Step 1. Create and configure a policy.

  1. Navigate to Control > Explorer.
  2. Click Policies > All Policies > Control Policies > Physical Infrastructure Control Policies.
  3. Click Configuration > Add a new Physical Server Control Policy from the top menu.
  4. Enter a description (for example, Lenovo_Policy).
  5. Click Add.

10.2.2. Step 2. Create a custom action.

  1. Create a custom action.

    1. Navigation to Action > All Actions.
    2. Click Configuration > Add a new action from the top menu.
    3. Enter a description (for example, Power_Off_Server).
    4. For Action Type select Invoke a custom Automation.
    5. Enter a message (for example, create).
    6. Fill the Request field with Call_Instance.
    7. Specify the following attributes in the order give:

      • Specify the Namespace attribute, and set the value to the new domain and namespace (<domain_name>/<namespace>) (for example, Lenovo/Functions).
      • Specify the Class attribute, and set the value to the class (for example, Power_actions).
      • Specify the Instance attribute, and set the value to the instance (for example, Physical_Server_PowerOff).
    8. Click Add.
  2. Configure the policy that you created.

    1. Select the new policy (for example, Lenovo_Policy).
    2. Click Configuration > Edit this policy’s Event assignments from the top menu.
    3. Find Physical Server operation, and select the Physical Server Shutdown option.
    4. Click Save.
    5. Select the new policy event.
    6. Click Configuration > Edit Actions for this policy Event from the top menu.
    7. From the Order of Actions if All Conditions are True field, select the custom action that you created in the previous step (for example, Power_Off_Server).
    8. Click Save.

10.2.3. Step 3. Create and assign a policy profile.

  1. Create a policy profile.

    1. Click Policy Profiles > All Policy Profiles.
    2. Click Configuration > Add a new Policy Profile from the top menu.
    3. Enter a description for the policy (for example, Lenovo_Policy_Profile).
    4. Select your policy and drag it to the right.
    5. Click Add.
  2. Assign the policy profile to the Lenovo physical-infrastructure providers:

    1. Navigate to Compute > Physical Infrastructure > Providers.
    2. Select the physical-infrastructure providers to which you want to assign the policy profile.
    3. Click Policy > Manage Policies form the top menu.
    4. Select the policy profile that you just created (for example, Lenovo_Policy_Profile).
    5. Click Save.

provider assign profile

Chapter 11. Creating an alert to monitor physical server health

Note: For this alert to work correctly, you must first configure the SMTP settings in CloudForms by following instructions in the Outgoing SMTP Email Settings section in the CloudForms Configuration documentation.

In CloudForms, there is a configurable alert for physical servers that sends an alert email when a server that is assigned to the alert is in an unhealthy state. This alert can be used to notify IT administrators that a server is in an unhealthy state, so that they can investigate and resolve potential issues before the issues lead to downtime.

To enable this alert, you must create a physical server alert profile, assign servers to the profile, and then configure the alert that is associated with the profile.

11.1. Step 1. Create a physical server alert profile

  1. Navigate to Control > Explorer.
  2. Click Alert Profiles > Physical Server Alert Profiles.
  3. Click Configuration > Add a New Physical Server Alert Profile from the top menu.
  4. Enter a description into the Description field.
  5. Select Physical server has critical health state from the Available Physical Server Alerts list, and click on the > button to add it to the Profile Alerts list on the right.
  6. Click Add.

11.2. Step 2. Assign servers to the alert profile

  1. Click Alert Profiles > Physical Server Alert Profiles > ProfileName, where ProfileName is the name of the physical server alert that was previously created.
  2. Click Configuration > Edit assignments for this Alert Profile.
  3. Choose Selected Servers from the Assign To dropdown menu.
  4. Select the checkboxes next to the servers that you want to assign to the profile from the Selections list.
  5. Click Save.

11.3. Step 3. Configure the alert associated with the alert profile

  1. Click Alert Profiles > Physical Server Alert Profiles > ProfileName > Physical server has critical health state, where ProfileName is the name of the physical server alert profile that was previously created.
  2. Click Configuration > Edit this Alert from the top menu.
  3. Select the Active checkbox to enable the alert.
  4. Optionally, increase the notification frequency by selecting a new value from the Notification Frequency dropdown menu. The default frequency is one hour.
  5. Ensure that the Send an E-mail checkbox is selected.
  6. Optionally, enter a value into the From field. By default, the cfadmin@cfserver.com address is used.
  7. Enter the email address that you want to retrieve the alert notification in the Add field, and then click the + button. The email address is displayed in the To field.
  8. Click Save.

The assigned servers are checked hourly, and a notification is sent through email if the any of the assigned servers have a critical health state.

Chapter 12. Creating a policy to power on servers that are powered off

In CloudForms, there is a control policy for physical servers that automatically powers a server back on when it is powered off.

To enable this policy, you must assign the physical infrastructure profile to a server.

  1. Navigate to Compute > Physical Infrastructure > Servers to display the Physical Servers page.
  2. Click a server (to display the Physical Server Summary page), or select multiple servers that you want to provision.
  3. Click Policy > Manage Policies from the top menu. The Physical Server Policy Assignment page is displayed.
  4. Select the Physical Infrastructure Profile checkbox.
  5. Click Save.

The policy is now assigned to the server.

Chapter 13. Updating physical server firmware using Ansible playbooks

In CloudForms, physical server firmware can be updated using an Ansible playbook.

Note: An Ansible Tower provider that points to an Ansible Tower instance must be added to CloudForms. See the Adding an Ansible Tower Provider section in the CloudForms Managing Providers documentation.

  1. Within Ansible Tower, create a job template for the config.yml playbook. Specify update_firmware as the job tag and any extra variables that are required by the playbook. Ensure that the option to prompt on launch is enabled. You can use this playbook to upgrade firmware on a physical server. You can get this playbook from the web at https://galaxy.ansible.com/lenovo/lxca-config.
  2. Follow the steps that are described in the Executing an Ansible Tower Job Template from a Service Catalog section in the CloudForms Managing Providers documentation. Use the job template that you created in the previous step.

Chapter 14. Provisioning physical servers using Ansible playbooks

In CloudForms, XClarity Administrator configuration patterns can be used to provision physical servers through the use of an Ansible playbook. Configuration patterns act as templates for configuring logical storage, I/O adapters, boot order, and other baseboard management controller and Unified Extensible Firmware Interface (UEFI) settings.

Note: An Ansible Tower provider that points to an Ansible Tower instance must be added to CloudForms. See the Adding an Ansible Tower Provider section in the CloudForms Managing Providers documentation.

  1. Within Ansible Tower, create a job template for the config.yml playbook. Specify apply_configpatterns as the job tag and any extra variables that are required by the playbook. Ensure that the option to prompt on launch is enabled. You can use this playbook to apply a configuration pattern to a physical server. You can get this playbook from the web at https://galaxy.ansible.com/lenovo/lxca-config.
  2. Follow the steps that are described in the Executing an Ansible Tower Job Template from a Service Catalog section in the CloudForms Managing Providers documentation. Use the job template that you created in the previous step.