Red Hat Training

A Red Hat training course is available for Red Hat CloudForms

Configuring the Lenovo Physical Infrastructure Provider

Red Hat CloudForms 4.6

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 Lenovo 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
  • Provides a single interface to monitor Lenovo hardware that is managed by multiple instances of Lenovo XClarity Administrator
  • Automatically discovers hardware that is managed by Lenovo 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 physical servers

Chapter 2. Configuring Lenovo XClarity Administrator

Lenovo 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 Lenovo XClarity Administrator. After the physical-infrastructure provider is added, the servers that are managed by the Lenovo XClarity Administrator are registered in CloudForms. Managed devices can be monitored, configured, and updated using Lenovo XClarity Administrator. The physical-infrastructure provider surfaces information about these managed devices and the Lenovo XClarity Administrator instance.

2.1. Setting up Lenovo XClarity Administrator

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

Note: You can use all available features in Lenovo XClarity Administrator for free for up to 90 days. After 90 days, you can continue to use Lenovo XClarity Administrator to manage and monitor your hardware for free; however, you must purchase a full-function-enablement license to continue using Lenovo 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 Lenovo 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 Lenovo XClarity Administrator

Lenovo XClarity Administrator can discover manageable devices in your environment by performing an SLP discovery for devices that are on the same IP subnet as Lenovo 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 Lenovo 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 Lenovo XClarity Administrator online documentation.

Note:

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

Chapter 3. Managing physical-infrastructure providers

3.1. Adding a physical-infrastructure provider

Lenovo 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 Lenovo 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 Lenovo XClarity Administrator instance that you want to connect to CloudForms.

To connect to a specific Lenovo 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 Lenovo XClarity Administrator instance.
    2. Enter “443” for the API port.
    3. Enter the username and password used to log in to the Lenovo XClarity Administrator instance.
  7. Click Validate to confirm that you can connect to the Lenovo XClarity Administrator instance.
  8. Click Add.

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

  1. Discover Lenovo 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 (Lenovo 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 Lenovo XClarity Administrator instance.
    6. Click Validate to confirm that you can connect to the Lenovo 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.

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. Select the physical-infrastructure provider to be viewed.
  3. From the overview section, select Topology 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.
    • 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.

  1. Navigate to Compute > Physical Infrastructure > Providers.
  2. Select the physical-infrastructure provider to be viewed.
  3. Click Physical Servers in the Relationships section.

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. Select the physical-infrastructure provider to be viewed.
  3. Click Physical Servers with Host button in the Relationships section.

You should see a list of physical servers that are associated with hosts as shown below.

host relationships

Chapter 5. Managing physical servers

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

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 Lenovo 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 Lenovo 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.

Chapter 6. Troubleshooting Physical Infrastructure Provider Problems

Chapter 7. Automating tasks based on events

You can use CloudForms to automatically perform specific tasks when certain events occur on servers that are managed by Lenovo 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.

7.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.

7.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.

7.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 Lenovo 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.

7.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.

7.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.

7.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.

7.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.

7.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.

7.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.

7.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