PowerVM

 View Only

Introduction to Virtual IO Server Rules

By RUPESH THOTA posted Thu October 01, 2020 11:05 AM

  

Overview

PowerVM 2.2.4 introduced VIOS Rules support. VIOS Rules is a new device configuration concept for simplifying setup and management of VIOS device attributes.  It creates predefined default device settings based on best practice recommendations, and provides the capabilities of collecting, applying, and verifying device settings in VIOS runtime environment. The settings can be customized based on user requirements. It can also be used and deployed repeatedly on multiple VIOSs.

This feature not only simplifies VIOS device configuration, but also provides consistent setup across multiple VIOSs during install and update, and also reduces the chances of human errors.

VIOS Rules preserve existing system settings during VIOS updates when new default rules are deployed. If VIOS Rules detects that any new rules conflict with existing customer system settings, the new rules will be ignored. 

Currently the VIOS Rules feature is only supported on the command line.

"Factory" Default and Current Rules

There are two rules files in xml format supported by VIOS Rules. One is the default rules file. It contains the “factory” recommended device settings (or default rules) for optimal VIOS operation. It is shipped with the VIOS and has read-only permissions. User can always set the VIOS back to “factory” default settings by deploying the default rules file.

 

There is also the current rules file which reflects the current settings (including any customized settings). It is generated by "rules -o capture" command and contains the current system settings based upon the devices and attributes in default rules file. It can be modified but has to be done via the rules command. The current rules file is not only used to save system settings but can also be manipulated by the user for customizing settings on VIOS.

Use Cases

VIOS Rules can be used in various use case scenarios based on different requirements. A few common use cases are described here. We can see from diagram in Figure 1 that the user utilizes the default rules file to deploy the recommended default rules on VIOS.

The diagram in Figure 2 shows that when a user wants to save a preferred system settings from one VIOS, they need to run "rules -o capture" to capture the current system settings which are saved in the current rules file. Then those customized settings can be repeatedly deployed to multiple VIOSs.

The diagram in Figure 3 indicates that once the user has a base current rules file, they can add new rules, modify or delete the existing rules to customize rules, and then apply it to multiple VIOSs.

 

VIOS Rules



VIOS Rules also support more capabilities for system admins, such as the ability to overwrite the system current settings with a new level default rules file from updates; When EMC PowerPath is installed, system admin is able to set EMC new disks to the vendor’s recommended settings for VIOS; System administrator is also able to validate compliance on a VIOS by running rules command to see the difference between current settings and best practices.

Rules Messages from Install and Updates

In order to not impact existing system settings without user’s permission, VIOS Rules requires the system admin to choose if the VIOS recommended default rules should be applied. Warning messages are sent out as reminders after a VIOS install and update complete.

  1. For a new install VIOS, after license accept, user will see the following messages:

Current system settings are different from the best practice recommendations for a VIOS.

 

To view the differences between system and the recommended settings, run the following:

$rules -o diff -s -d

 

To deploy the VIOS recommended default settings, run the following:

$rules -o deploy -d

          $shutdown –restart

 

The message indicates that current system settings are not compliant with the recommended default rules. User can run the listed commands to find out what differences are, deploy recommended default rules, and reboot system to make the new rules take effect.

  1. After a VIOS is updated and rebooted, user will see the following messages:

The most recent software update has modified the current system rules.

These modifications have not been deployed on the system. To view the

modifications and deploy, run the 'rulescfgset' command.

 

The messages encourage the user to use rulescfgset command to deploy VIOS recommended rules.

VIOS Rules was designed to handle and manage VIOS updates.

The default rules file has accumulative changes for successive updates. If a VIOS is updated from a level that does not support Rules, the current rules file is a copy of the default rules file. Either one of the rules files can be used to deploy the new settings.

Once VIOS is updated from a level that supports Rules, the current rules file saves and contains the previous level system settings. The default rules from new level will be merged into current rules file without overwriting the previous rules. So while new rules are deployed on the system, the previous settings are preserved.

rulescfgset Command

The rulescfgset command is an interactive tool to guide a user through deploying current rules. It identifies if current system settings match the factory default rules. If mismatches are found, current rules are merged and updated with the recommended default setting rules automatically. When a user allows new rules to be applied, the updated current rules are deployed on the system. The new rules do not take effect until the system reboots. If a user does not want to deploy immediately, it returns normally. The rulescfgsetcommand updates current rules, as needed and makes the Virtual I/O Server (VIOS) ready at any time to deploy new rules. Here are 3 examples of runscfgset run:

 

Example1: It shows when rulescfgset identified mismatch, the message is displayed. However, since user chooses to not deploy the merged new settings. It gives more information of how to run rules command for user reference

 

# rulescfgset

The most recent software update introduces the concept of Rules. Rules can be created, modified, listed, deleted and deployed for specific system settings.

See IBM documentation for more details on rules.  The software update includes the best practice settings from IBM as factory default rules. Do you want to deploy default rules on top of the current system settings now [y/N]?

       

The 'rules' command allows user to view, manage and deploy the system rules.

Options:

    rules -o deploy

        Deploys the current rules including modifications.

    rules -o deploy -d

        Deploys the factory default rules.

    rules -o diff -d -s

        Displays the differences between the factory default rules and the

        current system settings.

    rules -o list

        Lists rules that will be deployed.

    rules -o list -d

        Lists the factory default rules.

    rules -o modify -l deviceName -a attribute=value

    rules -o modify -t class/subclass/type -a attribute=value

        Modifies the rules to deploy.

    rules -o add -l deviceName -a attribute=value

    rules -o add -t class/subclass/type -a attribute=value

        Adds a new rule to the rules file to deploy

    rules -o delete -l deviceName -a attribute

    rules -o delete -t class/subclass/type -a attribute

        Deletes a rule from the rules file to deploy

 

Example 2:  It shows when rulescfgset identified the mismatch, the message is displayed and user chose to deploy the new settings on top of current system settings. When the command is done, message indicates that the deployment successfully completed.

 

# rulescfgset 

The most recent software update introduces the concept of Rules. Rules can be created, modified, listed, deleted and deployed for specific system settings.

See IBM documentation for more details on rules.  The software update includes the best practice settings from IBM as factory default rules. Do you want to deploy default rules on top of the current system settings now [y/N]? Y  

The new device settings have been deployed successfully

 

Example3: It shows that rulescfgset does not find any mismatch, no further action is needed.

 

           # rulescfgset

Current system settings are up to date

Rules Command

VIOS Rules develop a set of rules operations to manage VIOS device settings with rules.

 

rules –o deploy

Deploy rules file, with “-d” option to deploy the recommended default rules.

$rules –o deploy

$rules –o deploy –d

 

rules –o list

View and list the contents of the rules files, which could be default, current rules files, system settings or the file user specified.

$rules –o list –d

$rules –o list –s

 

rules –o capture

Capture the current system settings and saved as current rules file in XML format

$rules –o capture

 

rules –o import

Import a user specified rules file to VIOS which potentially changes the current rules file

$rules –o import –f /tmp/user.xml

 

rules –o diff

Find the mismatch number or list of devices and attributes between 2 objects.  The object could be current rules file, default rules file, user specified rules file, or system settings.

$rules –o diff –s –d

$rules –o diff –d –n

 

rules –o add

Add a new rule entry to the VIOS current or user specified rules file

$rules –o add –l hdisk0 –a reserve policy=single path

$rules –o add –t disk/fcp/mpioapdisk –a reserve_policy=single_path

 

rules –o modify

Modify a rule from the current or user specified rules file

$rules –o modify -l hdisk0 –a reserve_policy=no_reserve

$rules –o modify -t /disk/fcp/mpioapdisk=no_reserve

 

rules –o delete

Delete a rule from the current or user specified rules files

$rules –o delete -l hdisk0 –a reserve_policy

$rules –o delete -t disk/fcp/mpioapdisk –a reserve_policy

 

For additional information, please refer to IBM knowledge center:

http://www.ibm.com/support/knowledgecenter/8284-22A/p8hcg/p8hcg_rules.htm

Managing EMC Devices

The default rules file delivered by VIOS does not contain any rules for EMC devices. Once EMC software is installed, the specific EMC rules will be merged into VIOS default rules file.

During merge, while adding new rules from EMC devices, the existing system settings are preserved. This is similar to VIOS updates handling, if a mismatch is found, a warning message will be sent.

User can choose run "rulescfgset" or "rules -o deploy" to deploy the settings for EMC new installed/updated devices. After either of them is done, user needs to reboot system for new settings taking effect.

EMC de-install will simply remove EMC rules from the default rules and current rules files.

If user already knows what is needed for new installed/updated EMC devices setup, and the reminder message is not needed each time, the user can choose to disable notification by using the following commands:

Run “#chdev –l viosrules0 –a motd=no” to disable the messages

Run “#chdev –l viosrules0 –a motd=yes” to enable the messages

Contacting the PowerVM Team

Have questions for the PowerVM team or want to learn more?  Follow our discussion group on LinkedIn IBM PowerVM or IBM Community Discussions

0 comments
94 views

Permalink