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]

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

Multi-disk management for virtual server using IBM Systems Director VMControl

Piyush Jain (piyushjain@in.ibm.com), Staff Software Engineer, IBM  
Piyush Jain
Piyush Jain is a Staff Software Engineer at IBM. He is currently working on VMControl under IBM Systems Director, a critical product in the IBM product portfolio. He has an overall experience of around 6 years and holds a bachelor's degree in Information Technology Engineering from Institute of Engineering and Technology (IET) Alwar, Rajasthan, India. You can contact him at piyushjain@in.ibm.com.

Summary:  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. IBM Systems Director VMControl™ is an advanced plug-in installed on top of IBM Systems Director to provide virtualization capabilities. This tutorial talks about multi-disk management for virtual server using the VMControl Representational State Transfer (REST) application programming interfaces (APIs) and command-line interface (CLI).

View more content in this series

Date:  06 May 2013
Level:  Intermediate PDF:  A4 and Letter (419 KB | 23 pages)Get Adobe® Reader®

Comments:  

Multi-disk management while creating virtual server through REST APIs

1. On the IBM Power platform:

  • Create virtual server customization through REST APIs:

    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. Make a GET request to the URL specified below. The result will be a list of customization parameters that can be used to create a virtual server.

    The following example shows the customization parameters in a typical Power environment. Customization parameters for other platforms (KVM, IBM 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/ibm/director/rest/VMControl/hosts/{hostOID}/virtualServers/customization
    • HTTP method
      • GET
    • Sample request

      Get the virtualization properties available when creating a new virtual server on the host unique ID 7751:

      GET https://myserver:port/ibm/director/rest/VMControl/hosts/7751/virtualServers/customization



      Listing 1. Sample response representation
              
      Download

    Note: The customization properties for creating a virtual server on KVM platform is not listed in the tutorial due to the constraints of the tutorial length, but included some real-time examples to add new or existing disks while creating a virtual server on the KVM platform.

  • Add an existing disk or a new disk while creating a virtual server through REST APIs:

    To add an existing disk, while creating a virtual server on the Power resource feature, use the following table parameters:

    • npivdisks
    • diskphysicalvolumes
    • disks

    To add a new disk, while creating a virtual server on the Power resource feature, use the following table parameters:

    • storagepools
    • npivstoragepools

    Find below the real-time examples for the same:

    • URL
      • https://myserver:port/ibm/director/rest/VMControl/hosts/{hostOID}/virtualServers
    • HTTP method
      • POST
    • Sample request

      Create a virtual server on the host unique ID 7751 on the Power platform:

      POST https://myserver:port/ibm/director/rest/VMControl/hosts/7751/virtualServers

      Listing 2 shows the sample JSON to create a new virtual server using the npivdisks table parameter to add an existing disk.



      Listing 2. Sample request representation 1 using npivdisks
      
              
      {
          "virtualServer": {
              "properties": [
                  {
                      "name": "name",
                      "value": "VS3"
                  },
                  {
                      "name": "gos",
                      "value": "IBM Power - AIXLINUX"
                  },
                  {
                      "name": "cpudedicated",
                      "value": 1
                  },
                  {
                      "name": "cpumode",
                      "value": "DEDICATED"
                  },
                  {
                      "name": "memsize",
                      "value": "512"
                  }
              ],
              "addRowProperties": [
                  {
                      "assigneddisks": [
                          {
                              "name": "diskpriority",
                              "value": 2
                          },
                          {
                              "name": "addexistingdisk",
                              "value": "npivdisks[16424]"
                          }
                      ]
                  }
              ]
          }
      }
      

      Listing 3 shows the sample JSON to create a new virtual server using the diskphysicalvolumes table parameter to add an existing disk.



      Listing 3. Sample request representation 2 using diskphysicalvolumes
              
      {
          "virtualServer": {
              "properties": [
                  {
                      "name": "name",
                      "value": "VS3"
                  },
                  {
                      "name": "gos",
                      "value": "IBM Power - AIXLINUX"
                  },
                  {
                      "name": "cpudedicated",
                      "value": 1
                  },
                  {
                      "name": "cpumode",
                      "value": "DEDICATED"
                  },
                  {
                      "name": "memsize",
                      "value": "512"
                  }
              ],
              "addRowProperties": [
                  {
                      "assigneddisks": [
                          {
                              "name": "diskpriority",
                              "value": 2
                          },
                          {
                              "name": "addexistingdisk",
                              "value": "diskphysicalvolumes[19501]"
                          }
                      ]
                  }
              ]
          }
      }
      

      Listing 4 shows the sample JSON to create a new virtual server using the storagepools table parameter to add a new disk.



      Listing 4. Sample request representation 3 using storagepools
              
      {
          "virtualServer": {
              "properties": [
                  {
                      "name": "name",
                      "value": "VS3"
                  },
                  {
                      "name": "gos",
                      "value": "IBM Power - AIXLINUX"
                  },
                  {
                      "name": "cpudedicated",
                      "value": 1
                  },
                  {
                      "name": "cpumode",
                      "value": "DEDICATED"
                  },
                  {
                      "name": "memsize",
                      "value": "512"
                  }
              ],
              "addRowProperties": [
                  {
                      "assigneddisks": [
                          {
                              "name": "diskname",
                              "value": "piyush_disk2"
                          },
                          {
                              "name": "disksize",
                              "value": 2
                          },
                          {
                              "name": "diskpriority",
                              "value": 1
                          },
                          {
                              "name": "adddisklocation",
                              "value": "storagepools[16343]"
                          }
                      ]
                  }
              ]
          }
      }
      

      Listing 5 shows the sample JSON to create a new virtual server using the npivstoragepools table parameter to add a new disk.



      Listing 5. Sample request representation 4 using npivstoragepools
              
      {
          "virtualServer": {
              "properties": [
                  {
                      "name": "name",
                      "value": "VS3"
                  },
                  {
                      "name": "gos",
                      "value": "IBM Power - AIXLINUX"
                  },
                  {
                      "name": "cpudedicated",
                      "value": 1
                  },
                  {
                      "name": "cpumode",
                      "value": "DEDICATED"
                  },
                  {
                      "name": "memsize",
                      "value": "512"
                  }
              ],
              "addRowProperties": [
                  {
                      "assigneddisks": [
                          {
                              "name": "diskname",
                              "value": "piyush_disk1"
                          },
                          {
                              "name": "disksize",
                              "value": 2
                          },
                          {
                              "name": "diskpriority",
                              "value": 1
                          },
                          {
                              "name": "adddisklocation",
                              "value": "npivstoragepools[16343]"
                          }
                      ]
                  }
              ]
          }
      }
      

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



      Listing 6. Sample response
              
      HTTP/1.1 201 OK
      Cache-Control: no-store
      Set-Cookie: JSESSIONID_ibm_console_80=0000RKkZt6lgPMwBhSZe9IhR7dl;Path=/; Secure
      Set-Cookie: AUTH_JSESSIONID=24mcoj9cotsd8m3r7k7r1lir9dr;Path=/; HTTPOnly
      Expires: Thu, 01 Dec 1994 16:00:00 GMT
      Content-Type: application/octet-stream; charset=UTF-8
      Content-Length: 190
      Date: Sun, 03 Feb 2013 10:43:24 GMT
      Location: https://1.2.3.4:8422/ibm/director/rest/VMControl/hosts/7751/
      								virtualServers/VS3
      Accept-Ranges: bytes
      Server: Noelios-Restlet-Engine/1.1.4
      Content-Language: en-US
      
      {
          "MessageID": "DNZEMW066I",
          "MessageText": "DNZEMW066I New \"Create Virtual Server\" job [1] started.
      	\nRefer to the following URI for status: /ibm/director/rest/jobs/353/
      	activations/1"
      }


2. On the KVM platform:

  • Add an existing disk or a new disk while creating a virtual server through REST APIs:

    To add an existing disk, while creating a virtual server on the KVM resource feature, use the following table parameters:

    • existingdisks

    To add a new disk, while creating a virtual server on the KVM resource feature, use the following table parameters:

    • disklocationandsize

    Now, let us see some real-time examples for the same:

    • URL
      • https://myserver:port/ibm/director/rest/VMControl/hosts/{hostOID}/virtualServers
    • HTTP method
      • POST
    • Sample request

      Create a virtual server on the host unique ID 7751 on the KVM platform:

      POST https://myserver:port/ibm/director/rest/VMControl/hosts/7751/virtualServers

      Listing 7 shows the sample JSON to create a new virtual server using the existingdisks table parameter to add an existing disk.



      Listing 7. Sample response representation using existingdisks
              
      {
          "virtualServer": {
              "properties": [
                  {
                      "name": "name",
                      "value": "VS3"
                  },
                  {
                      "name": "cpumin",
                      "value": 1
                  },
                  {
                      "name": "memminvu[MB]",
                      "value": "vmemsize:64"
                  },
                  {
                      "name": "ethernet",
                      "value": " Discovered/br500/0:Auto set"
                  }
              ],
              "addRowProperties": [
                  {
                      "assigneddisks": [
                          {
                              "name": "diskpriority",
                              "value": 2
                          },
                          {
                              "name": "addexistingdisk",
                              "value": "existingdisks[File/6875/6821]"
                          }
                      ]
                  }
              ]
          }
      }
      

      Listing 8 shows the sample JSON to create a new virtual server using the disklocationandsize table parameter to add a new disk.



      Listing 8. Sample response representation using disklocationandsize
              
      {
          "virtualServer": {
              "properties": [
                  {
                      "name": "name",
                      "value": "VS3"
                  },
                  {
                      "name": "cpumin",
                      "value": 1
                  },
                  {
                      "name": "memminvu[MB]",
                      "value": "vmemsize:64"
                  },
                  {
                      "name": "ethernet",
                      "value": " Discovered/br500/0:Auto set"
                  }
              ],
              "addRowProperties": [
                  {
                      "assigneddisks": [
                          {
                              "name": "diskname",
                              "value": "VS3"
                          },
                          {
                              "name": "disksize",
                              "value": 10
                          },
                          {
                              "name": "virtualbustype",
                              "value": "ide"
                          },
                          {
                              "name": "virtualdiskemulation",
                              "value": "Hard Disk"
                          },
                          {
                              "name": "adddisklocation",
                              "value": "disklocationandsize[13219]"
                          }
                      ]
                  }
              ]
          }
      }
      

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



      Listing 9. Sample response
              
      HTTP/1.1 201 OK
      Cache-Control: no-store
      Set-Cookie: JSESSIONID_ibm_console_80=0000QuVv06sJFXlLL5LOjharXzq;Path=/; Secure
      Set-Cookie: AUTH_JSESSIONID=4e7q338gpg6pdteddf9m83d1ns8;Path=/; HTTPOnly
      Expires: Thu, 01 Dec 1994 16:00:00 GMT
      Content-Type: application/octet-stream; charset=UTF-8
      Content-Length: 190
      Date: Sun, 03 Feb 2013 12:38:00 GMT
      Location: https://1.2.3.5:8422/ibm/director/rest/VMControl/hosts/7751/
      								virtualServers/VS3
      Accept-Ranges: bytes
      Server: Noelios-Restlet-Engine/1.1.4
      Content-Language: en-US
      
      {
          "MessageID": "DNZEMW066I",
          "MessageText": "DNZEMW066I New \"Create Virtual Server\" job [1] started.
      	\nRefer to the following URI for status: /ibm/director/rest/jobs/359/
      	activations/1 "
      }
      
      

2 of 7 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX, Linux
ArticleID=900562
TutorialTitle=Multi-disk management for IBM Systems Director VMControl: Part 1
publish-date=05062013
author1-email=piyushjain@in.ibm.com
author1-email-cc=nissler@us.ibm.com