Extend Flex System Manager

Configure advanced IBM PureFlex System management scenarios

IBM® PureFlex™ System with integrated network and storage virtualization and the Kernel-based virtual machine (KVM) hypervisor provides an open and cost-effective virtualization and cloud solution. This article shows PureFlex System administrators how to extend the functionality of Flex System Manager to advanced management scenarios in a KVM virtualization environment. Using the scripting language of your choice, you can also script these scenarios for reuse and repeatability. Downloadable Python script examples show you how.

Share:

Pradeep K. Surisetty (pradeepkumars@in.ibm.com ), KVM Developer, IBM

Pradeep K. Surisetty photoPradeep K Surisetty is a KVM developer in the Linux Technology Center, IBM Systems and Technology Group Labs, India. He has 6 years of experience in virtualization and cloud development. He helps IBM client-facing teams with designing of KVM-based solutions.



Pradipta Kumar (bpradipt@in.ibm.com ), KVM Virtualization and Cloud Management Architect, IBM

Pradipta Kumar photoPradipta Kumar Banerjee is a KVM virtualization and cloud management architect in the IBM Linux Technology Center, IBM Systems and Technology Group Labs, India. He is an IBM Master Inventor and works closely with clients to design virtualized data centers and cloud infrastructure for their work loads.



Ashish Billore (ashish.billore1@in.ibm.com), Cloud OS Development Lead, IBM

Ashish BilloreAshish Billore is a development lead at IBM India Labs. He leads teams responsible for developing products and reusable components for building cloud infrastructures. He designs and develops cloud management applications using technologies such as Java, Eclipse, OSGi, Python, Openstack and web services. He has contributed several patches to the Eclipse open-source platform and presented articles at IBM technology and QSE conferences. He holds a bachelor’s degree in Electronic and Communication Engineering and a master’s degree in Information Technology.



21 January 2014

Also available in Chinese Russian

IBM PureFlex System

IBM Flex System Manager is the management component of IBM PureFlex System, an integrated infrastructure solution that combines compute, storage, networking, virtualization, and management into a single system. IBM PureFlex gives you the flexibility to choose x86 or Power processor-based compute nodes in the same chassis, which can be further customized to meet your requirements.

In IBM PureFlex System, Flex System Manager automates repetitive tasks to reduce the number of manual navigation steps for typical management tasks. Flex System Manager also provides a rich set of APIs and a command-line interface (CLI) that enable advanced management scenarios. You can also script these scenarios for reuse and repeatability. Through concrete examples, this article shows how to use Flex System Manager as the management infrastructure for enabling advanced virtualization- and cloud-management scenarios for the KVM hypervisor.

Prerequisites

To implement the example solution presented in this article, you need IBM PureFlex configured with Flex System Manager advanced or basic version. Red Hat Enterprise Linux (RHEL) 6.2 or higher must be installed and configured properly on System x nodes (x ITEs).

The environment that we use for the article consists of:

For a detailed description of IBM PureFlex System components, consult IBM PureFlex System and IBM Flex System Products and Technology. This IBM Redbooks publication addresses the technology and features of the chassis, compute nodes, management features, connectivity, and storage options.

  • RHEL 6.4.
  • IBM PureFlex System with x ITEs managed by Flex System Manager advanced.
  • IBM Storewize v7000 storage area network (SAN) with storage logical unit numbers (LUNs) connected to the servers by Fibre Channel.

We use Python for the article's scripting examples.


Extending Flex System Manager

We demonstrate how easy it is to extend Flex System Manager (advanced or basic version) by leveraging the CLI. Included with this article (see Download) is set of Python scripts that configure custom KVM management scenarios using the CLI. The scripts run on any Linux host that has SSH access to PureFlex components. Figure 1 shows the main menu for the tool (called flex-pack) that the scripts create for handling advanced management tasks:

Figure 1. Flex-pack tool for advanced management scenarios
Flex-pack tool for advanced management scenarios

In Figure 1, you can see the tasks that you can perform via flex-pack. The menu entries and their functions are:

  • Configure Energy Policy for System Pool Hosts: For a specific system pool among the configured system pools, specify an energy-savings policy, such as power save, balanced, or performance.
  • Configure Security Policy for System Pool Hosts: For a specific system pool among the configured system pools, specify a security policy — either firewall or mandatory access-control policy.
  • Configure Resource Controls for VM: Specify resource (CPU, memory, network, I/O) controls for a specific VM (either running or offline).
  • Configure Network Switch policy for VM: Set network switch policy for selected VMs.
  • Group VMs of Host in System Pool into a Workload: Create a workload from existing VMs.
  • Configure Auto-NUMA bindings for VM: Bind VM to NUMA nodes.
  • Refresh Environment: Refresh flex-pack.

Using the flex-pack tool

Download and unpack flex-pack to any Linux machine that has access to all PureFlex components (Flex System Manager, switches, x ITEs, and so on), preferably on an x ITE.

In the flex-pack folder:

  • Main_disp.py is the main flex-pack script.
  • README helps you set up the tool.
  • Environment.json.template is a template for providing your PureFlex environment details.
  • scripts/README shows various options for changing resources for a VM or host.

Copy Environment.json.template to a file named Environment.json. Open Environment.json in a text editor and add your environment-specific information. Here's an example:

{

"FSM" : {"encrypted": "no", "hostos":"FSM", "hostosip":"10.10.1.1", "user":"USERID", "password":"pwd1"},

"KVM1" : {"encrypted": "no", "hostos":"kvm1", "hostosip":"10.10.1.2", "user":"root", "password":"pwd"},

"KVM2" : {"encrypted": "no", "hostos":"kvm2", "hostosip":"10.10.1.3", "user":"root", "password":"pwd"}

}

The hostos values are the machine names listed in Flex System Manager. The hostip and password values are the machine credentials. The initial encrypted value should initially be no.

Enter python main_disp.py [options] at the command line to display the available options for running main_disp.py. The displayed options are:

Options:
  -h, --help         show this help message and exit
  -d, --debug        Write to debug log (flex_debug.log)
  -b, --build        Re-build persistent environment 
  -s, --simulate     Run simulation mode
  -m FSM_MODE, --mode=FSM_MODE     FSM Adv or Basic mode (basic|adv)

Command examples:

  • Run with basic usage: python main_disp.py
  • Enable enhanced logging: python main_disp.py -d
  • Rebuild persistent environment: python main_disp.py -b
  • Run in simulation mode: python main_disp.py -s

Usage Example 1: Setting up a security policy for a system pool

Follow the steps in Figures 2 through 4 to set up a security policy for a system pool:

Figure 2. Select Configure Security Policy for System Pool Hosts
Select Configure Security Policy for System Pool Hosts
Figure 3. Select system pool
Select system pool
Figure 4. Change security policy for the pool and receive confirmation
Change security policy for the pool and receive confirmation

Usage Example 2: Configure resources for a VM

Memory and CPU can be changed for a specific VM running on the hypervisor, as shown in the steps in Figures 5 through 10.

Figure 5. Select the Configure Resource Controls for VM option
Select the Configure Resource Controls for VM option
Figure 6. Read the Information screen to decide if you want to make permanent or temporary changes
Read the Information screen to decide if you want to make permanent or temporary changes
Figure 7. Select the hypervisor and VM
Select the hypervisor and VM
Figure 8. Select a resource to change (CPU or memory)
Select a resource to change (CPU or memory)
Figure 9. Select the VM
Select the VM
Figure 10. Edit the vCPU shares, period, and quota values for the selected VM
Edit the vCPU shares, period, and quota values for the selected VM

The usage examples in the scripts/README file show all the resource options that can be changed for a VM or hypervisor.


Conclusion

Our flex-pack example demonstrates how to extend the scope of Flex System Manager via its command-line interface and script advanced management scenarios. With further work, other advanced capabilities (such as VM ready, VM clone, and VM snapshot) can be added to the flex-pack tool.


Download

DescriptionNameSize
flex-packflex-pack-dw.tgz381KB

Resources

Learn

Get products and technologies

Discuss

  • Get involved in the developerWorks community. Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups, and wikis.

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Cloud computing on developerWorks


  • Bluemix Developers Community

    Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.

  • developerWorks Labs

    Experiment with new directions in software development.

  • DevOps Services

    Software development in the cloud. Register today to create a project.

  • Try SoftLayer Cloud

    Deploy public cloud instances in as few as 5 minutes. Try the SoftLayer public cloud instance for one month.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Cloud computing
ArticleID=960482
ArticleTitle=Extend Flex System Manager
publish-date=01212014