Skip to main content

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

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

All information submitted is secure.

  • Close [x]

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.

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

All information submitted is secure.

  • Close [x]

developerWorks Community:

  • Close [x]

IBM Systems Director VMControl resource lifecycle management: part 2

Remote virtual appliance lifecycle management using the VMControl REST APIs

Piyush Jain (piyushjain@in.ibm.com), Staff Software Engineer, IBM  
author photo
Piyush Jain is a Staff Software Engineer at IBM currently working on VMControl under IBM Systems Director, a critical product in IBM's product portfolio. He has an overall experience of around 6 years and holds a bachelor's degree in Information Technology Engineering from IET Alwar, Rajasthan India. You can contact him at piyushjain@in.ibm.com
(An IBM developerWorks Contributing Author)
Nicholas Schambureck (nschambu@us.ibm.com), Advisory Software Engineer, IBM
Photo of Nick
Nick Schambureck is an Advisory Software Engineer and Team Leader for the IBM Systems Director VMControl command-line interface and REST API team. He has been working with the project since its inception.
Poornima Soundararajan (poornima.s@in.ibm.com), Staff Software Engineer, IBM
Photo of Poornima
Poornima Soundararajan is working as a Staff Software Engineer for the IBM Systems Director VMControl advanced manager. Poornima has more than 7 years of experience in Java/J2EE technologies.
Aparna Khare (apakhare@in.ibm.com), System Software Engineer, IBM
Photo of Aparna
Aparna Khare is working as a System Software Engineer for the IBM Systems Director VMControl advanced manager. Aparna has 4 years of experience in Java/J2EE technologies.

Summary:  IBM® Systems Director is a platform management solution that is used to manage physical and virtual systems in a multisystem environment. It supports various virtualization technologies and multiple operating systems across IBM and non-IBM platforms. IBM Systems Director VMControl™ is an advanced manager of IBM Systems Director, a free-to-own set of platform management tools. This tutorial is part of a series on VMControl resource lifecycle management. This tutorial explains the virtual appliance lifecycle using the VMControl Representational State Transfer (REST) application programming interfaces (APIs).

View more content in this series

Date:  25 Jan 2013
Level:  Intermediate PDF:  A4 and Letter (491 KB | 29 pages)Get Adobe® Reader®

Activity:  20680 views
Comments:  

Create an image repository

The first step in managing virtual appliances and workloads in an IBM Systems Director VMControl environment is creating an image repository.

  • Kernel-based virtual machine (KVM) allows the creation of image repositories based on Network File System (NFS)-based storage or storage area network (SAN) storage.
  • On IBM AIX®, the two options are Network Installation Management (NIM) image repositories and Virtual I/O Server (VIOS) image repositories. One or a combination of both types can be set up in an AIX environment, but only the VIOS image repositories can be created through VMControl.
  • IBM i or IBM Power Systems running Linux® uses one or more VIOS image repositories.
  • NIM repositories and IBM z/VM® repositories are created outside of IBM Systems Director VMControl and included through the discovery process.

Additional set up may be required before attempting to create an image repository. Follow the setup instructions in the IBM Systems Director information center before attempting to create a repository through the VMControl REST APIs.

List known operating systems

This example creates a VIOS image repository on an IBM Power Systems™ server.

The first step is to retrieve a list of VIOS operating systems that can be used in the creation of an image repository. Select the appropriate operating system from the list and save the value of its object ID (OID) property. This value will be used in the next request.

VIOS image repositories require the IBM Systems Director Common Agent to be installed on VIOS. This means that of the operating systems in the following list, only v525400 is a valid operating system for creating an image repository.

  • URL
    • https://myserver:port/{webContext}/resources/OperatingSystem?Props=ManagementSoftware
  • HTTP method
    • GET
  • Sample request

    Get the list of all operating system resources:

    GET https://myserver:port/{webContext}/resources/OperatingSystem?Props=ManagementSoftware



    Listing 1. Sample response representation
            
    {
    
        "resources": [
            {
                "uri": "/ibm/director/rest/resources/OperatingSystem/3009",
                "OID": 14311,
                "ObjectType": "OperatingSystem",
                "Name": "v525400",
                "ResourceDefinition": "/ibm/director/rest/resourcedefinitions/Operating
    		System/com.ibm.usmi.systems.endpoint.SystemsManageableEndpointFactory",
                "Properties": {
                    "ManagementSoftware": [
                        "IBM-IBM Director Agent-v6.3.2",
                        "IBM-IBM Director Platform Agent-v6.3.2"
                    ]
                },
                "RelatedServices": "/ibm/director/rest/resources/OperatingSystem/3009/
    								relatedservices"
            },
            {
                "uri": "/ibm/director/rest/resources/OperatingSystem/13386",
                "OID": 13386,
                "ObjectType": "OperatingSystem",
                "Name": "rhel60pae201",
                "ResourceDefinition": "/ibm/director/rest/resourcedefinitions/Operating
    		System/com.ibm.usmi.systems.endpoint.SystemsManageableEndpointFactory",
                "Properties": {
                    "ManagementSoftware": [
                        "IBM-IBM Director Platform Agent-v6.3"
                    ]
                },
                "RelatedServices": "/ibm/director/rest/resources/OperatingSystem/13386/
    								relatedservices"
            },
            {
                "uri": "/ibm/director/rest/resources/OperatingSystem/18072",
                "OID": 18072,
                "ObjectType": "OperatingSystem",
                "Name": "rhel60e201c",
                "ResourceDefinition": "/ibm/director/rest/resourcedefinitions/Operating
    		System/com.ibm.usmi.systems.endpoint.SystemsManageableEndpointFactory",
                "Properties": {
                    "ManagementSoftware": [
                        "IBM-IBM Director Platform Agent-v6.3.1"
                    ]
                },
                "RelatedServices": "/ibm/director/rest/resources/OperatingSystem/18072/
    								relatedservices"
            }
        ]
    
    }
    

List customization for creating a repository

Customization parameters are unique, platform-specific properties that allow a user to customize the action that the user is performing. Customization parameters are available in many different types, but are all specified in a similar fashion. Using the operating system OID from the previous step, create a GET request to the URL specified below. The result will be a list of customization properties that can be used to create a repository.

The following example shows the customization parameters for creating a repository in a typical Power Systems environment. Customization parameters for other platforms (KVM, z/VM, and so on) will be different.

Note: For more information about customization parameters, refer to the VMControl programming topics section of the IBM Systems Director 6.3.x SDK information center.

  • URL
    • https://myserver:port/{webContext}/VMControl/repositories/customization?operatingSystem=14311
  • HTTP method
    • GET
  • Sample request

    Get the customization parameters available when creating a new repository using the operating system with a unique OID of 14311:

    GET https://myserver:port/{webContext}/VMControl/repositories/customization?operatingSystem=14311



    Listing 2. Sample response representation
    View Listing 2

Create a repository

The next step is to request an image repository to be created. Create repository is an asynchronous operation. The first step is to populate the JSON for your request. Using the above listed customization, create a JSON string with the name/value pair for the customization property named, repositorystorage in order to select the storage where the repository will be created.

The response will contain two URLs. The URL in the location header points to the temporary holding place for the repository. As the repository is not yet created, the name chosen in the request is used as a placeholder for ID. The URL in the message points to the job activation record for the create repository task. The job activation record will contain the status of the create repository request, including percentage complete and any status or error messages.

  • URL
    • https://myserver:port/{webContext}/VMControl/repositories
  • HTTP method
    • POST
  • Sample request

    Create a new image repository using the operating system with a unique ID of 14311:

    POST https://myserver:port/{webContext}/VMControl/repositories



    Listing 3. Sample request representation
            
    {
        "repository":{
            "name":"createRepos",
            "description":"Newly Created Repository",
            "operatingSystem":"14311",
            "properties":[{
                    "name":"repositorystorage",
                    "value":"1"
                }
            ]
        }
    }
    



    Listing 4. HTTP response:
            
    Status Code: 201 OK
    Accept-Ranges: bytes
    Cache-Control: no-store
    Content-Language: en-US
    Content-Length: 168
    Content-Type: application/json; charset=UTF-8
    Date:  Wed, 11 Jul 2012 08:23:35 GMT
    Location: https://9.9.9.9:8422/ibm/director/rest/VMControl/repositories/createRepos
    Server: Noelios-Restlet-Engine/1.1.4
    
    {
      "MessageText": "DNZEMW429I New job activation for creating the repository was 
    	started.\nRefer to the following URI for job activation status: 
    	/ibm/director/rest/jobs/324/activations/1",
      "MessageID": "DNZEMW429I"
    }
    


Monitor the create repository job

The final step in creating a repository is to monitor its progress to completion. The recommended method to monitor repository creation is through the job activation record. As seen above, this URL is returned in the message text in the response from the POST request. The job activation record can be monitored by polling the URL, but the recommended method is to use the Java™ Message Service (JMS) provider.

IBM Systems Director server includes a JMS provider to communicate events and other important messages with interested client applications. It allows for asynchronous communication between two or more applications. Job activation records can be monitored asynchronously through the Director.jobs.activation JMS topic.

For more information on JMS, refer to the JMS Messaging Overview page of the IBM Systems Director 6.3.x SDK information center.

2 of 8 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX, Linux
ArticleID=855964
TutorialTitle=IBM Systems Director VMControl resource lifecycle management: part 2
publish-date=01252013
author1-email=piyushjain@in.ibm.com
author1-email-cc=nissler@us.ibm.com
author2-email=nschambu@us.ibm.com
author2-email-cc=
author3-email=poornima.s@in.ibm.com
author3-email-cc=nissler@us.ibm.com
author4-email=apakhare@in.ibm.com
author4-email-cc=nissler@us.ibm.com