Multi-disk management for IBM Systems Director VMControl: Part 2

Multi-disk management for capturing a virtual appliance and revision control

IBM Systems Director is a platform management solution that is used to manage physical and virtual systems. IBM Systems Director provides systems management personnel with a single pane of glass, helping reduce IT management complexity and cost. VMControl is a advanced plug-in installed on top of IBM Systems Director to provide the virtualization capabilities. This tutorial talks about the multi-disk management and revision control for capturing virtual appliances using the VMControl Representational State Transfer (REST) application programming interfaces (APIs) and command line interface (CLI).

Share:

Piyush Jain (piyushjain@in.ibm.com), Staff Software Engineer, IBM  

Piyush JainPiyush Jain is a staff software engineer at IBM. He is currently working on VMControl under IBM Systems Director. He has six years of experience overall and holds a bachelor's degree in information technology engineering from the Institute of Engineering and Technology (IET) Alwar, Rajasthan, India.



14 May 2013

Also available in Chinese

Before you start

Learn what to expect from this tutorial, and how to get the most out of it.

About this series

The IBM Systems Director VMControl advanced manager simplifies the management of virtual environments across multiple virtualization technologies and hardware platforms. VMControl is a leading multi-platform virtualization management solution that is included with IBM Systems Director Editions. VMControl has the support for three types of interfaces (GUI, CLI and REST APIs). This series has the following topics:

  • Multi-disk management for virtual servers: This tutorial addresses the problems faced by the end user while performing operations related to multi-disk management of a virtual server. End users with little knowledge on the customization table parameters finds it difficult to add or remove disk, to or from the virtual servers.
  • Multi-disk management for creating virtual appliances and revision control: This tutorial addresses the problems faced by the end user while performing multi-disk management to create virtual appliances and revision control while capture. End users with little knowledge on the customization table parameters finds it difficult to perform multi-disk capture and version control of a virtual appliance during the capture process.
  • Multi-disk management for deploying workloads: This tutorial addresses the problems faced by the end user while performing multi-disk management to deploy a workload. End users with little knowledge on the customization table parameters finds it difficult to perform modifications and mapping of the disk during deployment.

This series will help all the VMControl exploiters to understand the VMControl multi-disk management functionality through REST and CLI.

About this tutorial

Multi-disk management and revision control for capturing virtual appliances includes the following major operations both using REST APIs and the command line interface:

  • Capture a virtual appliance along with the disk
  • Capture a virtual appliance and perform revision control

This is the flow diagram for multi-disk management and revision control for capturing virtual appliances using IBM Systems Director VMControl

Figure 1. Multi Disk management for capture virtual appliance
Multi-disk management
Figure 2. Revision Control for capture virtual appliance
Revision Control

Objectives

The main objective of this tutorial is to help exploiters understand the capture virtual appliance with multi-disk and revision control. It will help the exploiters with some real-world examples for capturing a virtual appliance with disks and revision control.

Prerequisites

You should have IBM Systems Director V6.x.x installed on your system before proceeding. This tutorial assumes that you are familiar with using IBM Systems Director. It also assumes that you have a reasonable understanding of JSON and how to make HTTP GET, POST, PUT, and DELETE calls using your favorite HTTP client and fare understanding of smcli command of VMControl. This tutorial also assumes that you have basic understanding of the virtual appliance resource of VMControl.

System requirements

You should have the following components on your system:

  • Installed and configured copy of IBM Systems Director
  • IBM Systems Director VMControl advanced manager activated
  • HTTP Client to run remote requests
  • Putty to run the CLI commands

Multi-disk management while capturing a virtual appliance through REST APIs

List the customization of creating a virtual appliance:

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 capturable object identifier (OID), create a GET request to the URL specified below. The result will be a list of customization properties related to capturing the specified candidate virtual server in to the specified repository.

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

Typical customization parameters used for capturing include disk capturing options, network descriptions, operating system type and virtual appliance version information. Our example specifies all of these, except the virtual appliance version information.

The "capturedisks" parameter table will provide options to capture disks attached to the virtual server as well as the option to capture the data on those disks.

  • URL
    • https://myserver:port/{webContext}/VMControl/virtualAppliances/candidates/{candidateOID}/customization
  • HTTP Method
    • GET
  • Sample Request

    Get the customization properties available for the candidate with OID 19698 when creating a new virtual appliance on repository with OID 19546:

    GET https://myserver:port/{webContext}/VMControl/virtualAppliances/candidates/19698/customization?repository=19546

    Listing 1. Sample response representation
    {
      "name": "forCapture",
      "uri": "/ibm/director/rest/VMControl/virtualAppliances/candidates/19698/
    					customization?repository=19546",
      "description": "Customizable properties for capturing virtual server 
    					\"19,698\" into repository \"19,546\" ",
      "customizationProperties": [
        {
          "values": [
            {
              "property": [
                {
                  "changeable": false,
                  "type": "text",
                  "description": "Network",
                  "value": "Discovered/1069/0",
                  "columnId": "UNDEFINED",
                  "rules": {}
                },
                {
                  "changeable": true,
                  "type": "text",
                  "description": "Description",
                  "value": "Captured from virtual server IP10-32-73-125_AIX71D_10G 
    	connected to Discovered/1069/0 on host Server-7895-23X-SN10360DB ",
                  "columnId": "description",
                  "rules": {}
                }
              ],
              "id": "[Discovered/1069/0]"
            },
            {
              "property": [
                {
                  "changeable": false,
                  "type": "text",
                  "description": "Network",
                  "value": "Discovered/2/0",
                  "columnId": "UNDEFINED",
                  "rules": {}
                },
                {
                  "changeable": true,
                  "type": "text",
                  "description": "Description",
                  "value": "Captured from virtual server IP10-32-73-125_AIX71D_10G
    	 connected to Discovered/2/0 on host Server-7895-23X-SN10360DB ",
                  "columnId": "description",
                  "rules": {}
                }
              ],
              "id": "[Discovered/2/0]"
            }
          ],
          "options": [
            {
              "property": [
                {
                  "changeable": false,
                  "type": "text",
                  "description": "Network",
                  "value": "Discovered/1069/0",
                  "columnId": "UNDEFINED",
                  "rules": {}
                },
                {
                  "changeable": true,
                  "type": "text",
                  "description": "Description",
                  "value": "Captured from virtual server IP10-32-73-125_AIX71D_10G
    	 connected to Discovered/1069/0 on host Server-7895-23X-SN10360DB ",
                  "columnId": "description",
                  "rules": {}
                }
              ],
              "id": "[Discovered/1069/0]"
            },
            {
              "property": [
                {
                  "changeable": false,
                  "type": "text",
                  "description": "Network",
                  "value": "Discovered/2/0",
                  "columnId": "UNDEFINED",
                  "rules": {}
                },
                {
                  "changeable": true,
                  "type": "text",
                  "description": "Description",
                  "value": "Captured from virtual server IP10-32-73-125_AIX71D_10G
    	 connected to Discovered/2/0 on host Server-7895-23X-SN10360DB ",
                  "columnId": "description",
                  "rules": {}
                }
              ],
              "id": "[Discovered/2/0]"
            }
          ],
          "name": "virtualnetworks",
          "type": "table",
          "description": "Network Mapping",
          "rules": {
            "max": 0,
            "min": 0
          }
        },
        {
          "name": "revisioncomment",
          "type": "text",
          "description": "A text comment that you can use to describe this version 
    							operation.",
          "value": "null",
          "rules": {}
        },
        {
          "name": "parentid",
          "type": "text",
          "description": "The unique ID (OID) of the virtual appliance to be used 
    	as the parent version for the new virtual appliance. To use this 
    	attribute, the committype value must be 1.",
          "value": "null",
          "rules": {}
        },
        {
          "name": "committype",
          "type": "long",
          "description": "0: Create a new version tree with the new virtual 
    	appliance as the root. 1 : Set the version for the new virtual appliance, 
    	based on the virtual appliance from which the virtual server was 
    	originally deployed or the virtual appliance specified by parentID.",
          "value": 0,
          "rules": {
            "max": 1,
            "min": 0
          }
        },
        {
          "values": [{
            "property": [
              {
                "changeable": false,
                "type": "text",
                "description": "Disk Name",
                "value": "IP10-32-73-125_AIX71D_10G",
                "columnId": "UNDEFINED",
                "rules": {}
              },
              {
                "changeable": false,
                "type": "text",
                "description": "Storage Server",
                "value": "1*7895-23X*10360DB",
                "columnId": "UNDEFINED",
                "rules": {}
              },
              {
                "changeable": false,
                "type": "text",
                "description": "Size (MB)",
                "value": "10240",
                "columnId": "UNDEFINED",
                "rules": {}
              },
              {
                "changeable": false,
                "type": "text",
                "description": "Compatible",
                "value": "Yes",
                "columnId": "UNDEFINED",
                "rules": {}
              },
              {
                "changeable": true,
                "type": "boolean",
                "description": "Include Image",
                "value": true,
                "columnId": "image",
                "rules": {}
              },
              {
                "changeable": true,
                "type": "boolean",
                "description": "Capture Disk",
                "value": true,
                "columnId": "capturedisk",
                "rules": {}
              },
              {
                "changeable": true,
                "type": "text",
                "description": "Disk Description",
                "value": "",
                "columnId": "description",
                "rules": {}
              }
            ],
            "id": "[1]"
          }],
          "options": [{
            "property": [
              {
                "changeable": false,
                "type": "text",
                "description": "Disk Name",
                "value": "IP10-32-73-125_AIX71D_10G",
                "columnId": "UNDEFINED",
                "rules": {}
              },
              {
                "changeable": false,
                "type": "text",
                "description": "Storage Server",
                "value": "1*7895-23X*10360DB",
                "columnId": "UNDEFINED",
                "rules": {}
              },
              {
                "changeable": false,
                "type": "text",
                "description": "Size (MB)",
                "value": "10240",
                "columnId": "UNDEFINED",
                "rules": {}
              },
              {
                "changeable": false,
                "type": "text",
                "description": "Compatible",
                "value": "Yes",
                "columnId": "UNDEFINED",
                "rules": {}
              },
              {
                "changeable": true,
                "type": "boolean",
                "description": "Include Image",
                "value": true,
                "columnId": "image",
                "rules": {}
              },
              {
                "changeable": true,
                "type": "boolean",
                "description": "Capture Disk",
                "value": true,
                "columnId": "capturedisk",
                "rules": {}
              },
              {
                "changeable": true,
                "type": "text",
                "description": "Disk Description",
                "value": "",
                "columnId": "description",
                "rules": {}
              }
            ],
            "id": "[1]"
          }],
          "name": "capturedisks",
          "type": "table",
          "description": "Capture Disks",
          "rules": {
            "max": 1,
            "min": 0
          }
        }
      ]
    }

Capturing a virtual appliance with disks:

Find below some real-world examples for the same:

  • URL
    • https://myserver:port/ibm/director/rest/VMControl/virtualAppliances
  • HTTP Method
    • POST
  • Sample Request

    Creating a virtual appliance with the capturedisks parameter table:

    POST https://myserver:port/ibm/director/rest/VMControl/virtualAppliances

    Listing 2. Sample request representation:
    {
       "virtualAppliance" : 
       {
          "capturable" : "19698",
          "name" : "VA1",
          "description" : "My Virtual Appliance number 1",
          "repository" : 19546,
          "properties" : [
             {
                "name": "capturedisks", 
                "value": "[1]=capturedisk:true;image:true"
             }
          ]
       }
    }

    Listing 3 shows the sample response after running the above request.

    Listing 3. Sample response:
    HTTP/1.1 201 OK
    Cache-Control: no-store
    Set-Cookie: JSESSIONID_ibm_console_80=0000iT9MsmPrKsPNl3UVfxGsRmY;Path=/; Secure
    Set-Cookie: AUTH_JSESSIONID=3tnhb9sfejc3ol9acr2c0memlpl;Path=/; HTTPOnly
    Expires: Thu, 01 Dec 1994 16:00:00 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 284
    Date: Thu, 07 Feb 2013 03:53:47 GMT
    Location: https://10.10.10.10:8422/ibm/director/rest/VMControl/virtualAppliances
    								/25744
    Accept-Ranges: bytes
    Server: Noelios-Restlet-Engine/1.1.4
    Content-Language: en-US
    
    {
        "MessageID": "DNZEMW349I",
        "MessageText": "DNZEMW349I Virtual Appliance \"25744\" is being captured: 
    	Capture/Import 'VA1': My Virtual Appliance number 1 will capture/import 
    	system '19698' into repository '19546' with customization [[ capturedisks[1], 
    	capturedisk:true;image:true ]] "
    }

    The user will also be able to see the progress of the job as shown in Listing 4 using the https://10.10.10.10:8422/ibm/director/rest/VMControl/virtualAppliances/25744/progress URI.

    Listing 4. Sample response:
    {
      "logs": [
        {"message": "Start asynch work run for capture VA1"},
        {"message": "DNZLOP411I Capturing virtual server IP10-32-73-125_AIX71D_10G to 
    	virtual appliance VA1 in repository SCS_VIOS_10-32-73-56."},
        {"message": "DNZLOP912I Disk group to be captured: DG_12.20.2012-13:06:54:441 "},
        {"message": "DNZLOP900I Requesting SAN volume(s)"},
        {"message": "DNZLOP948I New disk group: DG_02.06.2013-22:58:48:874 "},
        {"message": "DNZLOP413I The virtual appliance is using disk group DG_02.06.2013
    	-22:58:48:874 with the following SAN volumes: [VA11]."},
        {"message": "DNZLOP414I The virtual server is using disk group DG_12.20.2012-13
    	:06:54:441 with the following SAN volumes: [IP10-32-73-125_AIX71D_10G]."},
        {"message": "DNZLOP909I Copying disk images"},
        {"message": "DNZLOP409I Creating the OVF for the virtual appliance."},
        {"message": "Complete asynch work run for capture VA1"},
        {"message": "OID of new virtual appliance: 25744"}
      ],
      "uri": "/ibm/director/rest/VMControl/virtualAppliances/25744/progress"
    }

    The user can choose to specify multiple disks while capturing a virtual appliance if it is displayed in the capture customization. Listing 5 shows the sample request with two disk specified:

    Listing 5. Sample request representation:
    {
       "virtualAppliance" : 
       {
          "capturable" : "19698",
          "name" : "VA1",
          "description" : "My Virtual Appliance number 1",
          "repository" : 19546,
          "properties" : [
             {
                "name": "capturedisks", 
                "value": "[1]=capturedisk:false;image:false"
             },
             {
                "name": "capturedisks", 
                "value": "[2]=capturedisk:true;image:true"
             }
          ]
       }
    }

Revision control while capturing a virtual appliance through REST APIs:

Revision control while capturing virtual appliances:

Revision control allows the user to manage the version information for the virtual appliance. The user can set the version of a new virtual appliance or leave it as the default.

The user can perform one of the following operations:

  1. Create a new version tree with the new captured virtual appliance.
  2. Set the version based on the specified parent virtual appliance during the creation of a new virtual appliance.
  3. Set the version based on the virtual appliance from which the captured virtual server was originally deployed.

The same three parameters support the revision control in REST APIs:

  • committype:
    • 0: Create a new version tree with the new virtual appliance as the root.
    • 1: Set the version for the new virtual appliance, based on the virtual appliance from which the virtual server was originally deployed or the virtual appliance specified by the parentid parameter.
  • parentid: The OID of the virtual appliance to be used as the parent version for the new virtual appliance. To use this attribute, the committype must be set to 1.
  • revisioncomment: A comment that user can use to describe the version operation.

Next is the set of examples to demonstrate the revision control through REST APIs, where we have captured a virtual appliance three time to build a version tree.

  • URL
    • https://myserver:port/ibm/director/rest/VMControl/virtualAppliances
  • HTTP Method
    • POST
  • Sample Request

    Create a virtual appliance:

    POST https://myserver:port/ibm/director/rest/VMControl/virtualAppliances

Listing 6 shows the sample request to create a virtual appliance with the default revision using the committype as 0.

Listing 6. Sample request with committype as 0:
{
    "virtualAppliance": {
        "capturable": 19698,
        "name": "VA1",
        "description": "Virtual Appliance",
        "repository": 19546,
        "properties": [
            {
                "name": "revisioncomment",
                "value": "newVA"
            },
            {
                "name": "committype",
                "value": 0
            }
        ]
    }
}

Listing 7 shows the response of the request when committype is given as 0.

Listing 7. Sample response:
HTTP/1.1 201 OK
Cache-Control: no-store
Set-Cookie: JSESSIONID_ibm_console_80=0000flCLybSHx_45BDSs8Zq1MwL;Path=/; Secure; HTTPOnly
Set-Cookie: AUTH_JSESSIONID=8qg3l648kalglt30m07dot0h3f;Path=/; HTTPOnly
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 269
Date: Sun, 10 Feb 2013 16:11:47 GMT
Location: https://10.10.10.10:8422/ibm/director/rest/VMControl/virtualAppliances/25894
Accept-Ranges: bytes
Server: Noelios-Restlet-Engine/1.1.4
Content-Language: en-US

{
    "MessageID": "DNZEMW349I",
    "MessageText": "DNZEMW349I Virtual Appliance \"25894\" is being captured: 
	Capture/Import 'VA1': Virtual Appliance will capture/import system '19698' 
	into repository '19546' with customization [[ revisioncomment, newVA ], 
	[ committype, 0 ]] "
}

Listing 8 shows the revision of the virtual appliance as 1.1 and TrunkName is VA1.

Listing 8. Sample response:
VA1
        TrunkId:5
        Notifiable:true
        ClassName:com.ibm.usmi.datamodel.virtual.VirtualAppliance
        RevisionVersion:1.1
        Description:Virtual Appliance
        ChangedDate:2013-02-10T11:11:57-05:00
        TrunkName:VA1
        DisplayName:VA1
        CreatedDate:2013-02-10T11:11:47-05:00
        RevisionComment:newVA
        SpecificationId:1
        SpecificationVersion:1.1
        OID:25894
        Guid:E606B2BC4002326E9E5BB67D68D20EFF
        ApplianceId:5a36406f-c81f-482e-8583-6d4dd00fff8a
        ObjectType:VirtualAppliance
        DisplayNameSpecified:false

Listing 9 shows the sample request to create the virtual appliance VA2 by setting up the VA1 as the parent.

Listing 9. Sample request with parentid and committype:
{
    "virtualAppliance": {
        "capturable": 19698,
        "name": "VA2",
        "description": "Virtual Appliance",
        "repository": 19546,
        "properties": [
            {
                "name": "revisioncomment",
                "value": "fromVA1"
            },
            {
                "name": "parentid",
                "value": 25894
            },
            {
                "name": "committype",
                "value": 1
            }
        ]
    }
}

Listing 10 shows the response of the request when parentid is given as 25894 and committype is given as 1.

Listing 10. Sample response:
HTTP/1.1 201 OK
Cache-Control: no-store
Set-Cookie: JSESSIONID_ibm_console_80=0000PcCyXk63XNVkLtYmMI6ASMe;Path=/; Secure; HTTPOnly
Set-Cookie: AUTH_JSESSIONID=jjgjgse8h5pnj4r9h5845jl438;Path=/; HTTPOnly
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 292
Date: Sun, 10 Feb 2013 16:13:34 GMT
Location: https://10.10.10.10:8422/ibm/director/rest/VMControl/virtualAppliances/25899
Accept-Ranges: bytes
Server: Noelios-Restlet-Engine/1.1.4
Content-Language: en-US

{
    "MessageID": "DNZEMW349I",
    "MessageText": "DNZEMW349I Virtual Appliance \"25899\" is being captured: 
	Capture/Import 'VA2': Virtual Appliance will capture/import system '19698' 
	into repository '19546' with customization [[ revisioncomment, fromVA1 ], 
	[ parentid, 25894 ], [ committype, 1 ]] "
}

Listing 11 shows the revision of the virtual appliance as 1.2 while the TrunkName is the same as VA1.

Listing 11. Sample response:
VA2
        TrunkId:5
        Notifiable:true
        ClassName:com.ibm.usmi.datamodel.virtual.VirtualAppliance
        RevisionVersion:1.2
        Description:Virtual Appliance
        ChangedDate:2013-02-10T11:13:42-05:00
        TrunkName:VA1
        DisplayName:VA2
        CreatedDate:2013-02-10T11:13:34-05:00
        RevisionComment:fromVA1
        SpecificationId:1
        SpecificationVersion:1.1
        OID:25899
        Guid:7A2666C8AC8233B6A3DFE327EBBE9DEF
        ApplianceId:c9723643-4f86-4b45-9d6e-d16e1f5796cd
        ObjectType:VirtualAppliance
        DisplayNameSpecified:false

Listing 12 shows the sample request to create the virtual appliance VA2 by setting up the VA1 as the parent again.

Listing 12. Sample request with parentid and committype:
{
    "virtualAppliance": {
        "capturable": 19698,
        "name": "VA3",
        "description": "Virtual Appliance",
        "repository": 19546,
        "properties": [
            {
                "name": "revisioncomment",
                "value": "fromVA1"
            },
            {
                "name": "parentid",
                "value": 25894
            },
            {
                "name": "committype",
                "value": 1
            }
        ]
    }
}

Listing 13 shows the response of the request when parentid is given as 25894 and committype is given as 1.

Listing 13. Sample response:
HTTP/1.1 201 OK
Cache-Control: no-store
Set-Cookie: JSESSIONID_ibm_console_80=0000tCqnAtX5IJpnNkPhcv8nkIA;Path=/; Secure; HTTPOnly
Set-Cookie: AUTH_JSESSIONID=2rtsibe851tfkaa604rt7i0kadp;Path=/; HTTPOnly
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 292
Date: Sun, 10 Feb 2013 16:14:56 GMT
Location: https://10.10.10.10:8422/ibm/director/rest/VMControl/virtualAppliances/25904
Accept-Ranges: bytes
Server: Noelios-Restlet-Engine/1.1.4
Content-Language: en-US

{
    "MessageID": "DNZEMW349I",
    "MessageText": "DNZEMW349I Virtual Appliance \"25904\" is being captured: 
	Capture/Import 'VA3': Virtual Appliance will capture/import system '19698' 
	into repository '19546' with customization [[ revisioncomment, fromVA1 ], 
	[ parentid, 25894 ], [ committype, 1 ]] "
}

Listing 14 shows the revision of the virtual appliance as 1.1.2.1 while the TrunkName is the same as VA1.

Listing 14. Sample response:
VA3
        TrunkId:5
        Notifiable:true
        ClassName:com.ibm.usmi.datamodel.virtual.VirtualAppliance
        RevisionVersion:1.1.2.1
        Description:Virtual Appliance
        ChangedDate:2013-02-10T11:15:06-05:00
        TrunkName:VA1
        DisplayName:VA3
        CreatedDate:2013-02-10T11:14:56-05:00
        RevisionComment:fromVA1
        SpecificationId:1
        SpecificationVersion:1.1
        OID:25904
        Guid:F765FE06603439E7A47A851F1ACF04A6
        ApplianceId:c82cbb31-43ea-4ee8-ac0b-63e59c37fcd0
        ObjectType:VirtualAppliance
        DisplayNameSpecified:false

Multi-disk management while capturing a virtual appliance through the CLI:

List the customization of creating a virtual appliance:

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 are specified in a similar fashion. Using the capturable OID and repository OID in the lscustomization smcli command get the customization properties related to capturing the specified candidate virtual server in to the specified repository.

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

Typical customization parameters used for capturing include disk capturing options, network descriptions, operating system type, and virtual appliance version information. Our example specifies all of these, except the virtual appliance version information. For more information on the virtual appliance version, refer to the virtual appliances resource page of the IBM Systems Director 6.3.x SDK information center.

"capturedisks" parameter table will provide options to capture disks attached to the virtual server as well as the option to capture the data on those disks.

Listing 15. Sample response representation
USERID@c598n34:~> smcli lscustomization -v -a capture -s 19698 -r 19546
Wed Feb 06 22:33:13 EST 2013  lscustomization Operation started.
Get capture customization data
virtualnetworks
        Description:    Network Mapping
        Changeable Columns:
                Column Name*    CLI Attribute
                Description     description

        Options:
        Key,    Network,        Description*
        [Discovered/1069/0] Discovered/1069/0 Captured from VS IP10-32-73-125_AIX71D_10G
        [Discovered/2/0] Discovered/2/0 Captured from VS IP10-32-73-125_AIX71D_10G

revisioncomment
        Value:  null
        Description:  A text comment that you can use to describe this version operation.

parentid
        Value:  null
        Description:    The unique ID (OID) of the virtual appliance to be used as the 
	parent version for the new virtual appliance. To use this attribute, the 
	committype value must be 1.

committype
        Value:  0
        Min:    0
        Max:    1
        Increment:      0
        IncrementType:  LINEAR
        Description:    0: Create a new version tree with the new virtual appliance as 
	the root. 1 : Set the version for the new virtual appliance, based on the virtual 
	appliance from which the virtual server was originally deployed or the virtual 
	appliance specified by parentID.

capturedisks
        Min:    0
        Max:    1
        Description:    Capture Disks
        Changeable Columns:
                Column Name*    CLI Attribute
                Include Image   image
                Capture Disk    capturedisk
                Disk Description        description

        Options:
        Key, Disk Name, Storage, Size (MB), Compatible, Include, Capture , Disk 
                        Server                          Image*   Disk*     Description*
        [1] IP10-32-73-125_AIX71D_10G 1*7895-23X*10360DB 10240   Yes     true    true

Wed Feb 06 22:33:14 EST 2013  lscustomization Operation took 1 seconds.
USERID@c598n34:~>

User can choose to specify a disk while capture a virtual appliance. Listing 16 shows the sample request with single disk specified:

Listing 16. Sample response:
USERID@c598n34:~> smcli captureva -s 19698 -r 19546 -n "VA1" 
		-A "capturedisks[1]=capturedisk:true;image:true" -v
Wed Feb 06 23:01:40 EST 2013  captureva Operation started.
Get capture customization data
Update collection with user entered attributes.
Call capture function
DNZLOP411I Capturing virtual server IP10-32-73-125_AIX71D_10G to virtual appliance VA1 in 
	repository SCS_VIOS_10-32-73-56.
DNZLOP912I Disk group to be captured: DG_12.20.2012-13:06:54:441
DNZLOP900I Requesting SAN volume(s)
DNZLOP948I New disk group: DG_02.06.2013-23:01:49:837
DNZLOP413I The virtual appliance is using disk group DG_02.06.2013-23:01:49:837 with the 
	following SAN volumes: [VA12].
DNZLOP414I The virtual server is using disk group DG_12.20.2012-13:06:54:441 with the 
	following SAN volumes: [IP10-32-73-125_AIX71D_10G].
DNZLOP909I Copying disk images
DNZLOP409I Creating the OVF for the virtual appliance.
Call capture command executed. Return code= 25,761
Wed Feb 06 23:01:54 EST 2013  captureva Operation took 14 seconds.
USERID@c598n34:~>

User can choose to specify multiple disk while capture a virtual appliance if it is displayed in the capture customization. Listing 17 shows the sample request with two disk specified:

Listing 17. Sample request representation:
USERID@c598n34:~> smcli captureva -s 19698 -r 19546 -n "VA1" 
	-A "capturedisks[1]=capturedisk:false;image:false,
	capturedisks[2]=capturedisk:true;image:true" -v
Sun Feb 10 11:43:06 EST 2013  captureva Operation started.
Get capture customization data
Update collection with user entered attributes.
Call capture function
DNZLOP411I Capturing virtual server IP10-32-73-125_AIX71D_10G to virtual appliance VA1 in
	 repository SCS_VIOS_10-32-73-56.
DNZLOP912I Disk group to be captured: DG_12.20.2012-13:06:54:441
DNZLOP900I Requesting SAN volume(s)
DNZLOP948I New disk group: DG_02.10.2013-11:43:11:856
DNZLOP413I The virtual appliance is using disk group DG_02.10.2013-11:43:11:856 with the 
	 following SAN volumes: [VA15].
DNZLOP414I The virtual server is using disk group DG_12.20.2012-13:06:54:441 with the
	 following SAN volumes: [IP10-32-73-125_AIX71D_10G].
DNZLOP909I Copying disk images
DNZLOP409I Creating the OVF for the virtual appliance.
Call capture command executed. Return code= 25,912
Sun Feb 10 11:43:15 EST 2013  captureva Operation took 9 seconds.
USERID@c598n34:~>

Revision control while capturing a virtual appliance through the CLI:

Revision control while capturing a virtual appliance

Revision control allows the user to manage the version information for the virtual appliance. The user can set the version of a new virtual appliance or leave it as the default.

The user can perform one of the following operations:

  1. Create a new version tree with the new captured virtual appliance.
  2. Set the version based on the specified parent virtual appliance during the creation of a new virtual appliance.
  3. Set the version based on the virtual appliance from which the captured virtual server was originally deployed.

The three parameters to support the revision control in CLI are the same supported in REST APIs:

  • committype:
    • 0: Create a new version tree with the new virtual appliance as the root.
    • 1: Set the version for the new virtual appliance, based on the virtual appliance from which the virtual server was originally deployed or the virtual appliance specified by the parentid parameter.
  • parentid: The OID of the virtual appliance to be used as the parent version for the new virtual appliance. To use this attribute, the committype must be set to 1.
  • revisioncomment: A comment that the user can use to describe the version operation.

Next is the set of examples to demonstrate the revision control through the CLI.

Listing 18 creates a virtual appliance with the default revision using the committype as 0.

Listing 18. Sample response:
USERID@c598n34:~> smcli captureva -s 19698 -r 19546 -n "VA1" 
		-A "revisioncomment=newVA,committype=0" -v
Fri Feb 08 06:20:48 EST 2013  captureva Operation started.
Get capture customization data
Update collection with user entered attributes.
Call capture function
DNZLOP411I Capturing virtual server IP10-32-73-125_AIX71D_10G to virtual appliance VA1 in
		 repository SCS_VIOS_10-32-73-56.
DNZLOP912I Disk group to be captured: DG_12.20.2012-13:06:54:441
DNZLOP900I Requesting SAN volume(s)
DNZLOP948I New disk group: DG_02.08.2013-06:20:54:024
DNZLOP413I The virtual appliance is using disk group DG_02.08.2013-06:20:54:024 with the
		 following SAN volumes: [VA13].
DNZLOP414I The virtual server is using disk group DG_12.20.2012-13:06:54:441 with the
		 following SAN volumes: [IP10-32-73-125_AIX71D_10G].
DNZLOP909I Copying disk images
DNZLOP409I Creating the OVF for the virtual appliance.
Call capture command executed. Return code= 25,856
Fri Feb 08 06:20:57 EST 2013  captureva Operation took 9 seconds.
USERID@c598n34:~>

Listing 19 shows the revision of the virtual appliance as 1.1 and TrunkName is VA1

Listing 19. Sample response:
VA1
        TrunkId:4
        Notifiable:true
        ClassName:com.ibm.usmi.datamodel.virtual.VirtualAppliance
        RevisionVersion:1.1
        Description:VA1
        ChangedDate:2013-02-08T06:20:57-05:00
        TrunkName:VA1
        DisplayName:VA1
        CreatedDate:2013-02-08T06:20:57-05:00
        RevisionComment:newVA
        SpecificationId:1
        SpecificationVersion:1.1
        OID:25856
        Guid:7AB74E2EBF333AB9BA254AC4DCCB4066
        ApplianceId:6688bfc7-0101-45ae-b9d2-96e66fd522ce
        ObjectType:VirtualAppliance
        DisplayNameSpecified:true

Listing 20 creates a virtual appliance VA2 by setting up the VA1 as parent.

Listing 20. Sample response:
USERID@c598n34:~> smcli captureva -s 19698 -r 19546 -n "VA2" 
		-A "revisioncomment=fromVA1,parentid=25856,committype=1" -v
Fri Feb 08 06:22:26 EST 2013  captureva Operation started.
Get capture customization data
Update collection with user entered attributes.
Call capture function
DNZLOP411I Capturing virtual server IP10-32-73-125_AIX71D_10G to virtual appliance VA2 in
		 repository SCS_VIOS_10-32-73-56.
DNZLOP912I Disk group to be captured: DG_12.20.2012-13:06:54:441
DNZLOP900I Requesting SAN volume(s)
DNZLOP948I New disk group: DG_02.08.2013-06:23:05:768
DNZLOP413I The virtual appliance is using disk group DG_02.08.2013-06:23:05:768 with the 
		following SAN volumes: [VA27].
DNZLOP414I The virtual server is using disk group DG_12.20.2012-13:06:54:441 with the 
		following SAN volumes: [IP10-32-73-125_AIX71D_10G].
DNZLOP909I Copying disk images
DNZLOP409I Creating the OVF for the virtual appliance.
Call capture command executed. Return code= 25,869
Fri Feb 08 06:23:09 EST 2013  captureva Operation took 43 seconds.
USERID@c598n34:~>

Listing 21 shows the revision of the virtual appliance as 1.2 while the TrunkName is the same as VA1.

Listing 21. Sample response:
VA2
        TrunkId:4
        Notifiable:true
        ClassName:com.ibm.usmi.datamodel.virtual.VirtualAppliance
        RevisionVersion:1.2
        Description:VA2
        ChangedDate:2013-02-08T06:23:09-05:00
        TrunkName:VA1
        DisplayName:VA2
        CreatedDate:2013-02-08T06:23:09-05:00
        RevisionComment:fromVA1
        SpecificationId:1
        SpecificationVersion:1.1
        OID:25869
        Guid:D4D860743A043874846CA71A90C6FF3B
        ApplianceId:d7520c31-132e-436a-8b5f-d24e80cda5d7
        ObjectType:VirtualAppliance
        DisplayNameSpecified:true

Listing 22 creates a virtual appliance VA3 by setting up the VA1 as the parent again.

Listing 22. Sample response:
USERID@c598n34:~> smcli captureva -s 19698 -r 19546 -n "VA3" 
		-A "revisioncomment=fromVA1,parentid=25856,committype=1" -v
Fri Feb 08 06:23:38 EST 2013  captureva Operation started.
Get capture customization data
Update collection with user entered attributes.
Call capture function
DNZLOP411I Capturing virtual server IP10-32-73-125_AIX71D_10G to virtual appliance VA3 in
		 repository SCS_VIOS_10-32-73-56.
DNZLOP912I Disk group to be captured: DG_12.20.2012-13:06:54:441
DNZLOP900I Requesting SAN volume(s)
DNZLOP948I New disk group: DG_02.08.2013-06:23:43:658
DNZLOP413I The virtual appliance is using disk group DG_02.08.2013-06:23:43:658 with the
		 following SAN volumes: [VA33].
DNZLOP414I The virtual server is using disk group DG_12.20.2012-13:06:54:441 with the
		 following SAN volumes: [IP10-32-73-125_AIX71D_10G].
DNZLOP909I Copying disk images
DNZLOP409I Creating the OVF for the virtual appliance.
Call capture command executed. Return code= 25,882
Fri Feb 08 06:24:23 EST 2013  captureva Operation took 45 seconds.
USERID@c598n34:~>

Listing 23 shows the revision of the virtual appliance as 1.1.2.1 while the TrunkName is same as VA1.

Listing 23. Sample response:
VA3
        TrunkId:4
        Notifiable:true
        ClassName:com.ibm.usmi.datamodel.virtual.VirtualAppliance
        RevisionVersion:1.1.2.1
        Description:VA3
        ChangedDate:2013-02-08T06:24:23-05:00
        TrunkName:VA1
        DisplayName:VA3
        CreatedDate:2013-02-08T06:24:23-05:00
        RevisionComment:fromVA1
        SpecificationId:1
        SpecificationVersion:1.1
        OID:25882
        Guid:C900B396697030E086741C1F000BC49B
        ApplianceId:e1933e72-4a1c-46d1-afd3-029820ee6a7d
        ObjectType:VirtualAppliance
        DisplayNameSpecified:true

Resources

Learn

Get products and technologies

Discuss

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 AIX and Unix on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX, Linux
ArticleID=929440
ArticleTitle=Multi-disk management for IBM Systems Director VMControl: Part 2
publish-date=05142013