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:  

Modify a virtual appliance

List the virtual appliances available to modify

The first step in modifying a virtual appliance is to retrieve a list of available virtual appliances. This can be done by either retrieving all known virtual appliances or by retrieving a list of virtual appliances that exists on an image repository. This example retrieves all virtual appliances. Select the appropriate virtual appliances from the list and save the value of its OID property. This value can be used in the subsequent requests.

  • URL
    • https://myserver:port/{webContext}/VMControl/virtualAppliances
  • HTTP method
    • GET
  • Sample request

    Get the list of all virtual appliances:

    GET https://myserver:port/{webContext}/VMControl/virtualAppliances



    Listing 14. Sample response representation
            
    {
        "candidates": {
            "uri": "/ibm/director/rest/VMControl/virtualAppliances/candidates"
        },
        "virtualAppliances": [
            {
                "properties": {},
                "oid": 28912,
                "name": "Virtual Appliance 1",
                "uri": "/ibm/director/rest/VMControl/virtualAppliances/28912"
            },
            {
                "properties": {},
                "oid": 29731,
                "name": "cap_nim",
                "uri": "/ibm/director/rest/VMControl/virtualAppliances/29731"
            },
            {
                "properties": {},
                "oid": 20495,
                "name": "cap_nim_aixmobb",
                "uri": "/ibm/director/rest/VMControl/virtualAppliances/20495"
            }
        ],
        "uri": "/ibm/director/rest/VMControl/virtualAppliances"
    }
    


Retrieve the OVF descriptor file for the virtual appliance

You can choose your virtual appliance and fetch the OVF descriptor file currently defined for the virtual appliance that needs to be updated. Using the virtual appliance OID from the previous step, create a GET request to the URL specified below.

It is recommended that you specify the Accept-Charset HTTP header to retrieve the OVF file in the format in which it was imported. If Accept-Charset is not specified, VMControl attempts to retrieve it in the UTF-8 format.

  • URL
    • https://myserver:port/{webContext}/VMControl/virtualAppliances/{virtualApplianceOID}.ovf
  • HTTP method
    • GET
  • Sample request

    Get the OVF descriptor file of virtual appliance 28912:

    GET https://myserver:port/{webContext}/VMControl/virtualAppliances/28912.ovf

    • Sample response representation
      The actual OVF file.

Modify a virtual appliance

Finally, it is time to create the modify virtual appliance request. Modify the OVF descriptor file that was retrieved from the previous step to add or remove information. Pass it in as the request body of your PUT request, specifying application/ovf+xml for your Content-Type HTTP header.

Note: VMControl will only validate whether the OVF file is syntactically correct. It is the responsibility of the developer to ensure that the OVF file will allow for the image to be deployed successfully.

The response contains the status of the modify virtual appliance request, including error messages.

  • URL
    • https://myserver:port/{webContext}/VMControl/virtualAppliances/{virtualApplianceOID}
  • HTTP method
    • PUT
  • Sample request

    Modify the virtual appliance with a unique ID of 28912:

    PUT https://myserver:port/{webContext}/VMControl/virtualAppliances/28912

    • Sample request representation
      The updated OVF XML and the Content-Type should be application/ovf+xml


    Listing 15. Sample response
            
    Status Code: 200 OK
    Accept-Ranges: bytes
    Cache-Control: no-store
    Content-Language: en-US
    Content-Length: 966
    Content-Type: application/json; charset=UTF-8
    Date: Wed, 11 Jul 2012 12:24:21 GMT
    Server: Noelios-Restlet-Engine/1.1.4
    
    {
        "MessageID": "DNZEMW440E",
        "MessageText": "DNZEMW440E Update OVF request for virtual appliance: 
    						\"28912\" succeeded."
    }
    
    

5 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