Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Introduction

This page describes how to create a virtual datacenter and deploy a VM.

This tutorial is suitable for a test environment only and it does not use proper authentication.

You will need the following resources.

Your user role must include the following privileges.

  • A user privilege, e.g. MANAGE_USERS, to retrieve enterprises

  • VDC_MANAGE

  • VDC_MANAGE_VAPP

  • VAPP_DEPLOY_UNDEPLOY

The following pages contain background reference information for this tutorial:

Summary diagram

Detailed steps

...

The steps in this diagram link to the

...

API reference guide resources and data entities sections.

Mermaid
fileNamemermaid_1655195963673
themeneutral
version3
{"diagramDefinition":"graph TD\n\nZ(( ))\n\nstyle Z fill:#g1g,stroke:#100,stroke-width:20px\n\nZ-->A(Requires: Allowed location and<br/>VM template in Apps library)\n\nA -->B(<font color=0052cc>Get enterprise)\n\nclick B href \"https://wiki.abiquo.com/api/latest/EnterprisesResource.html#list-enterprise-identifiers-and-names

...

cURL

...

\" _blank\n\nB -->C(<font color=0052cc>Get allowed datacenters)\n\nclick C href \"https://

...

wiki.abiquo.com

...

/api/

...

Sample response. Success response code: 200
Note: this request returns a collection of enterprises

...

latest/AllowedLocationsResource.html#list-location-of-allowed-datacenters\" _blank\n\nB-->D(<font color=0052cc>Get allowed<br/>public cloud regions)\n\nclick D href \"https://wiki.abiquo.com/api/latest/AllowedLocationsResource.html#list-location-of-allowed-public-cloud-regions\" _blank\n\nC-->E(<font color=0052cc>Create VDC object)\n\nclick E href \"https://wiki.abiquo.com/api/latest/virtualdatacenter.html\" _blank\n\nD-->E\n\nE-->F(<font color=0052cc>Create the VDC)\n\nclick F href \"https://wiki.abiquo.com/api/latest/VirtualDatacentersResource.html#create-a-virtual-datacenter\" _blank\n\nF-->G(Create a virtual appliance)\n\nG-->H(Get compatible templates)\n\nH-->I(Create the VM entity)\n\nI-->J(Create a VM)\n\nJ-->K(Deploy the VM)\n\nK-->Q((<fontcolour=f3efe6> * ))\n\tstyle Q fill:#f3efe6,stroke:#030300,stroke-width:7px,color:#f3efe6"}

Detailed steps

...

  1. Get the link to the enterprise

    1. Get smaller result entity with the enterprises-id-name media type

    2. Specify the enterprise name with the "has" parameter to filter by name text

    3. Reference

      1. https://wiki.abiquo.com/api/latest/EnterprisesResource.html#list-enterprise-identifiers-and-names

    4. cURL

      Code Block
      curl -X GET https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises?has=video \ 
      	 -H 'Accept:application/vnd.abiquo.enterprises-id-name+json; version=4.7' \ 
      	 -u user:password --verbose


    5. Sample response. Success response code: 200
      Note: this request returns a collection of enterprises

      Code Block
      Code Block
      {
          "totalSize": 1,
          "links": [
              {
         
      "vlansHard": 0,
               
      "
      publicIpsSoft
      rel": 
      0
      "first",
                  "
      publicIpsHard
      href":
      0,
       
      "links": [
      "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises?limit=25&has=video"
              },
              {
      
                  
      "title
      "rel": "
      Video_enterprise
      last",
                  
      "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises?startwith=0&limit=25&has=video"
            
      "rel": "edit"
        }
          ],
          "collection": [
              {
           
      "type": "application/vnd.abiquo.enterprise+json",
             "id": 15,
                  "
      href
      name": "
      https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15"
      Video_enterprise",
                  "vmsSoft": 0,
        
      }
                
      ]
      "vmsHard": 0,
                  "
      ramSoft
      vlansSoft": 0,
                  "
      ramHard
      vlansHard": 0,
                  "
      cpuSoft
      publicIpsSoft": 0,
                  "
      cpuHard
      publicIpsHard": 0,
              
      }
          "links": 
      ] }

      You will need the edit link of the enterprise

      [
                      {
                          "title": "Video_enterprise",
                          "rel": "edit",
                          "type": "application/vnd.abiquo.enterprise+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15"
                      }
    Get allowed locations for the current enterprise
    1. Specify datacenters or publiccloudregions using the media type in the Accept header
    2. Cloud admin can use the "enterprise" parameter to get locations for another enterprise by ID 
    3. References: 
      1. https://wiki.abiquo.com/api/latest/AllowedLocationsResource.html#list-location-of-allowed-datacenters
      2. https://wiki.abiquo.com/api/latest/AllowedLocationsResource.html#list-location-of-allowed-public-cloud-regions
    4. cURL

      Code Block
      curl -X GET https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations \ 
      	 -H 'Accept:application/vnd.abiquo.datacenters+json; version=4.7' \ 
      	 -u user:password --verbose 

      Sample response. Success status code: 200
      Note: This request returns a collection of allowed locations

      { "totalSize": 1, "links": [
      
                  ],
                  "ramSoft": 0,
                  "ramHard": 0,
                  "cpuSoft": 0,
                  "cpuHard": 0
              }
          ]
      }
      Expand
      Code Block


    5. You will need the edit link of the enterprise

      Code Block
                      {
                    
      "rel
            "title": "
      first
      Video_enterprise",
      
                 
      "href":
       
      "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations?limit=25&by=name&asc=true"
              
      }
      "rel": "edit",
              
      {
                  
      "
      rel
      type": "
      last
      application/vnd.abiquo.enterprise+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/
      cloud/locations?startwith=0&limit=25&by=name&asc=true"
      enterprises/15"
                    
      } ], "collection": [ {
        }


  2. Get allowed locations for the current enterprise

    1. Specify datacenters or publiccloudregions using the media type in the Accept header

    2. Cloud admin can use the "enterprise" parameter to get locations for another enterprise by ID 

    3. References: 

      1. https://wiki.abiquo.com/api/latest/AllowedLocationsResource.html#list-location-of-allowed-datacenters

      2. https://wiki.abiquo.com/api/latest/AllowedLocationsResource.html#list-location-of-allowed-public-cloud-regions

    4. cURL

      Code Block
      curl -X GET https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations?has=Abiquo \ 
      	 -H 'Accept:application/vnd.abiquo.datacenters+json; version=4.7' \ 
      	 -u user:password --verbose 


    5. Sample response. Success status code: 200
      Note: This request returns a collection of allowed locations

      edit link

      Code Block
      Code Block
      {
          "
      id
      totalSize": 1,
          "links": [
             
      "name": "Abiquo-DC",
       {
                  "
      location
      rel": "
      Teide
      first",
                  "
      links": [ { "title": "Abiquo-DC",
      href": "https://.bcn.abiquo.com:443/api/cloud/locations?limit=25&has=Abiquo&by=name&asc=true"
              },
              
      "rel": "edit",
      {
                  
      "
      type
      rel": "
      application/vnd.abiquo.datacenter+json
      last",
                  
      "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/
      admin/datacenters/1
      cloud/locations?startwith=0&limit=25&has=Abiquo&by=name&asc=true"
              }
          
      }
      ],
          
      "collection": [
              {
                  
      "title": "racks",
      "id": 1,
                  
      "
      rel
      name": "
      racks
      Abiquo-DC",
      
                  
      "
      type
      location": "
      application/vnd.abiquo.racks+json
      Teide",
      
                  
      "
      href
      links": 
      "https://abiquoapi.bcn.abiquo.com:443/api/admin/datacenters/1/racks" },
      [
                      {
                          "title": "
      remote services
      Abiquo-DC",
                          "rel": "
      remoteservices
      edit",
                          "type": "application/vnd.abiquo.
      remoteservices
      datacenter+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1
      /remoteservices
      "
                      },
                      {
                          "title": "
      update resources
      racks",
                          "rel": "
      updateusedresources
      racks",
                          "type": "application/vnd.abiquo.racks+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      action/updateusedresources
      racks"
                      },
                      {
                          "title": "
      datastores
      remote services",
                          "rel": "
      datastores
      remoteservices",
                          "type": "application/vnd.abiquo.
      datastores
      remoteservices+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      datastores
      remoteservices"
                      },
                      {
                          "title": "
      hypervisors
      update resources",
                          "rel": "
      hypervisors
      updateusedresources",
                          "type": "
      application/vnd.abiquo.hypervisortypes+json
      ",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/action/
      hypervisors
      updateusedresources"
                      },
                      {
                          "title": "
      enterprises
      datastores",
                          "rel": "
      enterprises
      datastores",
                          "type": "application/vnd.abiquo.
      enterprises
      datastores+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      action/enterprises
      datastores"
                      },
                      {
                          "title": "
      discover
      hypervisors",
                          "rel": "
      discover
      hypervisors",
                          "type": "application/vnd.abiquo.
      machines
      hypervisortypes+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      action/discover
      hypervisors"
                      },
                      {
                          "title": "
      machines state
      enterprises",
                          "rel": "
      checkmachinestate
      enterprises",
                          "type": "application/vnd.abiquo.
      machinestate
      enterprises+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/action/
      checkmachinestate
      enterprises"
                      },
                      {
                          "title": "
      machines ipmi
      discover",
                          "rel": "
      checkmachineipmistate
      discover",
                          "type": "application/vnd.abiquo.
      machineipmistate
      machines+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/action/
      checkmachineipmistate
      discover"
                      },
                      {
                          "title": "
      tiers
      machines state",
                          "rel": "
      tiers
      checkmachinestate",
                          "type": "application/vnd.abiquo.
      tiers
      machinestate+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      storage
      action/
      tiers
      checkmachinestate"
                      },
                      {
                          "title": "
      storage
      machines 
      devices
      ipmi",
                          "rel": "
      devices
      checkmachineipmistate",
                          "type": "application/vnd.abiquo.
      storagedevices
      machineipmistate+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      storage
      action/
      devices
      checkmachineipmistate"
                      },
                      {
                          "title": "
      devices
      tiers",
                          "rel": "
      devices
      tiers",
                          "type": "application/vnd.abiquo.
      devices
      tiers+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/storage/
      devices
      tiers"
                      },
                      {
                          "title": "
      network
      storage 
      service types
      devices",
                          "rel": "
      networkservicetypes
      devices",
                          "type": "application/vnd.abiquo.
      networkservicetypes
      storagedevices+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      networkservicetypes
      storage/devices"
                      },
                      {
                          "title": "
      public networks
      devices",
                          "rel": "
      network
      devices",
                          "type": "application/vnd.abiquo.
      vlans
      devices+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      network
      devices"
                      },
                      {
                          "title": "
      external
      network service 
      ips
      types",
                          "rel": "
      externalips
      networkservicetypes",
                          "type": "application/vnd.abiquo.
      externalips
      networkservicetypes+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      network/action/externalips
      networkservicetypes"
                      },
                      {
                          "title": "
      limits
      public networks",
                          "rel": "
      getLimits
      network",
                          "type": "application/vnd.abiquo.
      limits
      vlans+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      action/getlimits
      network"
                      },
                      {
                          "title": "
      excluded
      external 
      networks
      ips",
                          "rel": "
      excludednetworks
      externalips",
                          "type": "application/vnd.abiquo.
      excludednetworks
      externalips+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/network/
      excludednetworks
      action/externalips"
                      },
                      {
                          "title": "
      REMOTEACCESS
      limits",
                          "rel": "
      remoteservice
      getLimits",
                          "type": "application/vnd.abiquo.
      remoteservice
      limits+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/
      remoteservices/61
      datacenters/1/action/getlimits"
                      },
                      {
                          "title": "
      BPMSERVICE
      excluded networks",
                          "rel": "
      remoteservice
      excludednetworks",
                          "type": "application/vnd.abiquo.
      remoteservice
      excludednetworks+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/
      remoteservices
      datacenters/1/
      6
      excludednetworks"
                      },
                      {
                          "title": "
      VIRTUALFACTORY
      NARS",
                          "rel": "remoteservice",
                          "type": "application/vnd.abiquo.remoteservice+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/remoteservices/
      1
      4"
                      },
                      {
                          "title": "
      APPLIANCEMANAGER
      REMOTEACCESS",
                          "rel": "remoteservice",
                          "type": "application/vnd.abiquo.remoteservice+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/remoteservices/
      3
      61"
                      },
                      {
                          "title": "VIRTUALSYSTEMMONITOR",
                          "rel": "remoteservice",
                          "type": "application/vnd.abiquo.remoteservice+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/remoteservices/2"
                      },
                      {
                          "title": "
      NARS
      BPMSERVICE",
                          "rel": "remoteservice",
                          "type": "application/vnd.abiquo.remoteservice+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/remoteservices/
      4
      6"
                      },
                      {
                          "title": "
      metricsmetadata
      APPLIANCEMANAGER",
                          "rel": "
      metricsmetadata
      remoteservice",
                          "type": "application/vnd.abiquo.
      metricsmetadata
      remoteservice+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/
      datacenters
      remoteservices/
      1/metrics
      3"
                      },
                      {
                          "title": "
      collectd
      VIRTUALFACTORY",
                          "rel": "
      collectd
      remoteservice",
                          "type": "application/vnd.abiquo.remoteservice+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/
      datacenters
      remoteservices/1
      /metrics/collectd
      "
                      },
                      {
                          "title": "
      alarmssearch
      metricsmetadata",
                          "rel": "
      alarmssearch
      metricsmetadata",
                          "type": "application/vnd.abiquo.
      alarms
      metricsmetadata+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      alarms
      metrics"
                      },
                      {
                          "title": "
      natnetworks
      collectd",
                          "rel": "
      natnetworks
      collectd",
                          "type": "application/
      vnd.abiquo.natnetworks+
      json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/metrics/
      natnetworks
      collectd"
                      },
                      {
                          "title": "
      Get nat ips
      alarmssearch",
                          "rel": "
      natips
      alarmssearch",
                          "type": "application/vnd.abiquo.
      natips
      alarms+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/
      natnetworks/action/allips
      alarms"
                      },
                      {
                          "title": "
      Get nat rules
      natnetworks",
                          "rel": "
      natrules
      natnetworks",
                          "type": "application/vnd.abiquo.
      natrules
      natnetworks+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/datacenters/1/natnetworks
      /action/allrules
      "
                      },
                      {
                          "title": "
      repository
      Get nat ips",
                          "rel": "
      datacenterrepository
      natips",
                          "type": "application/vnd.abiquo.
      datacenterrepository
      natips+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/
      enterprises
      datacenters/1/
      281
      natnetworks/
      datacenterrepositories
      action/
      1
      allips"
                      },
                      {
                          "title": "
      floating
      Get nat 
      ips
      rules",
                          "rel": "
      ips
      natrules",
                          "type": "application/vnd.abiquo.
      publicips
      natrules+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/
      cloud
      admin/
      locations
      datacenters/1/natnetworks/action/
      ips
      allrules"
                      },
                      {
                          "title": "
      devices
      repository",
                          "rel": "
      devices
      datacenterrepository",
                          "type": "application/vnd.abiquo.
      devices
      datacenterrepository+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/admin/
      cloud
      enterprises/15/
      locations
      datacenterrepositories/1
      /devices
      "
                      },
                      {
                          "title": "
      available
      floating 
      templates
      ips",
                          "rel": "
      templates
      ips",
                          "type": "application/vnd.abiquo.
      virtualmachinetemplates
      publicips+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/
      templates
      ips"
                      },
                      {
                          "title": "
      remote vdcs
      devices",
                          "rel": "
      remotevirtualdatacenters
      devices",
                          "type": "application/vnd.abiquo.
      virtualdatacenters
      devices+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/
      action/remotevirtualdatacenters
      devices"
                      },
                      {
                          "title": "
      remote
      available 
      vms
      templates",
                          "rel": "
      remotevirtualmachines
      templates",
                          "type": "application/vnd.abiquo.
      virtualmachines
      virtualmachinetemplates+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/
      action/remotevirtualmachines
      templates"
                      },
                      {
                          "title": "
      available
      remote 
      volumes
      vdcs",
                          "rel": "
      volumes
      remotevirtualdatacenters",
                          "type": "application/vnd.abiquo.
      volumes
      virtualdatacenters+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/action/
      volumes
      remotevirtualdatacenters"
                      },
                      {
                          "title": "
      available
      remote 
      tiers
      vms",
                          "rel": "
      tiers
      remotevirtualmachines",
                          "type": "application/vnd.abiquo.
      tiers
      virtualmachines+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/
      tiers
      action/remotevirtualmachines"
                      },
                      {
                          "title": "
      Abiquo-DC
      available volumes",
                          "rel": "
      location
      volumes",
                          "type": "application/vnd.abiquo.
      datacenter
      volumes+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/volumes"
                      },
                      {
                          "title": "
      backup
      available 
      policies
      tiers",
                          "rel": "
      backuppolicies
      tiers",
                          "type": "application/vnd.abiquo.
      backuppolicies
      tiers+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/
      backuppolicies
      tiers"
                      },
                      {
                          "title": "
      backup location properties
      Abiquo-DC",
                          "rel": "
      backupproperties
      location",
                          "type": "application/vnd.abiquo.
      backupdatacenterproperties
      datacenter+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1
      /backupproperties
      "
                      },
                      {
                          "title": "
      compatible
      backup 
      datastore tiers
      policies",
                          "rel": "
      compatibles
      backuppolicies",
                          "type": "application/vnd.abiquo.
      links
      backuppolicies+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/
      datastoretiers/action/compatibles
      backuppolicies"
                      },
                      {
                          "title": "
      datastore
      backup location 
      tiers
      properties",
                          "rel": "
      datastoretiers
      backupproperties",
                          "type": "application/vnd.abiquo.
      datastoretiers
      backupdatacenterproperties+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/
      datastoretiers
      backupproperties"
                      },
                      {
                          "title": "
      metricsmetadata
      compatible datastore tiers",
                          "rel": "
      metricsmetadata
      compatibles",
                          "type": "application/vnd.abiquo.
      metricsmetadata
      links+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/datastoretiers/
      metrics
      action/compatibles"
                      },
                      {
                          "title": "
      collectd
      datastore tiers",
                          "rel": "
      collectd
      datastoretiers",
                          "type": "application/vnd.abiquo.datastoretiers+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/cloud/locations/1/
      metrics/collectd
      datastoretiers"
                      },
                      {
                          "title": "
      VMware vCenter
      metricsmetadata",
                          "rel": "
      hypervisortype
      metricsmetadata",
                          "type": "application/vnd.abiquo.
      hypervisortype
      metricsmetadata+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/
      config
      cloud/locations/
      hypervisortypes
      1/
      VMX_04
      metrics"
                      }
      ] } ] }

      You will need the edit and hypervisortype links of the location.

      ,
                      {
                          "title": "
      Abiquo-DC
      collectd",
                          "rel": "
      edit
      collectd",
                          "type": "application/
      vnd.abiquo.datacenter+
      json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/
      admin
      cloud/
      datacenters
      locations/1/metrics/collectd"
                      },

      hypervisortype link for the hypervisor you would like to use in the virtual datacenter

      Code Block
      
                      {
                          "title": "VMware vCenter",
                          "rel": "hypervisortype",
                          "type": "application/vnd.abiquo.hypervisortype+json",
                          "href": "https://
      abiquoapi
      .bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
                      }
  3. Create the virtualdatacenter entity
    1. Reference: 

...

number-formatcustom
h1[h1.decimal]
h2[h2.decimal]
h3[h3.decimal].
h4[h3.decimal].[h4.decimal]
start-numbering-ath3

Create a Virtual Datacenter

...

Get the Location

You will create the virtual datacenter in an "allowed location", which is a datacenter or public cloud region that the enterprise is allowed to work with. Choose whether you want to retrieve public cloud regions or datacenters and use the appropriate media type.

By default, Abiquo will add the ID of the enterprise you are working with as a query parameter. If you are the cloud administrator or another user with appropriate privileges, you can retrieve the locations of another enterprise by entering another ID.

cURL:

Success status code: 200

Request payload:

--none--

Response payload:

The important parts of this location entity are the ID and the self link (shown here). Use this location link when you edit the virtual datacenter entity to create the virtual datacenter.

 

Create the Virtual Datacenter

Modify the virtual datacenter entity shown here to add the location ID to the locations link, the enterprise ID and the hypervisor type (for example, ESXi with vCenter is "VMX_04")

cURL:

Success status code: 201

Request payload:

Response payload:

 

...

In the UI, by default, Abiquo will create a default virtual appliance, named with the default prefix "vapp_" and the virtual datacenter name, but when you are working with the API, no default virtual appliance is created.

Create and Deploy a Virtual Appliance

...

Create a Virtual Appliance

It's easy to create a virtual appliance. You can create one just by providing a virtual appliance with a name and some basic details, and the link to the virtual datacenter where you will create it.

cURL:

Success status code: 201

Request payload:

Response payload:

 

Use a VM template to create a VM

You will need the link to a virtual appliance, a template in the Apps library, and an enterprise. See the previous Tenants tutorial for how to retrieve compatible templates from the Apps library.

cURL:

Success status code: 201

Request payload:

The link to specify the template is the only required value. In this case, we are also setting the friendly name of the VM and enabling remote access.

 

Response payload:

Deploy the VM

We are going to deploy the virtual machine on its own. It is also possible to deploy a whole virtual appliance at the same time.

cURL:

Success status code: 202

Request payload:

--none--

Response payload:

 

The VM will be powered on. Congratulations, you've completed the tutorial!

    1. 
                  ]
              }
          ]
      }


    2. You will need the edit, hypervisortype, and datacenterrepository links of the location.

      1. edit link

        Code Block
                        {
                            "title": "Abiquo-DC",
                            "rel": "edit",
                            "type": "application/vnd.abiquo.datacenter+json",
                            "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/datacenters/1"
                        },


      2. hypervisortype link for the hypervisor you would like to use in the virtual datacenter. The code of the hypervisor type is at the end of the link, for example, for VMware vCenter, the name is "VMX_04".

        Code Block
                        {
                            "title": "VMware vCenter",
                            "rel": "hypervisortype",
                            "type": "application/vnd.abiquo.hypervisortype+json",
                            "href": "https://abiquoapi.bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
                        }


      3. datacenterrepository link to retrieve templates

        Code Block
                        {
                            "title": "repository",
                            "rel": "datacenterrepository",
                            "type": "application/vnd.abiquo.datacenterrepository+json",
                            "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1"
                        },


  1. Create a virtualdatacenter entity

    1. Reference: https://wiki.abiquo.com/api/latest/virtualdatacenter.html

    2. Add the links to the enterprise and the location and the hypervisorType attribute.

  2. Create a virtualdatacenter

    1. Reference: https://wiki.abiquo.com/api/latest/VirtualDatacentersResource.html#create-a-virtual-datacenter

    2. cURL

      Code Block
      curl -X POST https://abiquoapi.bcn.abiquo.com/api/cloud/virtualdatacenters \ 
      	 -H 'Accept:application/vnd.abiquo.asynctask+json; version=4.7' \ 
      	 -H 'Content-Type:application/vnd.abiquo.virtualdatacenter+json; version=4.7' \ 
      	 -d @virtualdatacentercreate.json \ 
      	 -u user:password --verbose 


    3. Virtual datacenter entity

      Code Block
      {
        "hypervisorType" : "VMX_04",
        "name" : "vdc_test_create",
        "network" : {
          "name" : "Default Network",
          "address" : "192.168.0.0",
          "mask" : 24,
          "gateway" : "192.168.0.1",
          "primaryDNS" : "10.0.0.1",
          "secondaryDNS" : "10.0.0.1",
          "defaultNetwork" : false,
          "type" : "INTERNAL",
          "ipv6" : false,
          "strict" : false,
          "restricted" : false,
          "internetGatewayRole" : false,
          "ipRanges" : [ ],
          "excludedFromFirewall" : false,
          "notUsableLoadBalancers" : false,
          "notUsableVirtualMachines" : false,
          "links" : [ ]
        },
        "usersRole" : [ ],
        "vmsSoft" : 0,
        "vmsHard" : 0,
        "vlansSoft" : 0,
        "vlansHard" : 0,
        "publicIpsSoft" : 0,
        "publicIpsHard" : 0,
        "links" : [ {
          "rel" : "location",
          "href" : "https://.bcn.abiquo.com/api/cloud/locations/1"
        }, {
          "rel" : "enterprise",
          "href" : "https://.bcn.abiquo.com/api/admin/enterprises/15"
        } ],
        "ramSoft" : 0,
        "ramHard" : 0,
        "cpuSoft" : 0,
        "cpuHard" : 0
      }


    4. Sample response

      Code Block
      {
          "creationTime": 1576592419286,
          "finished": true,
          "jobs": {
              "links": [],
              "collection": []
          },
          "links": [
              {
                  "rel": "self",
                  "type": "application/vnd.abiquo.asynctask+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/1/asynctasks/1625"
              },
              {
                  "title": "vdc_test_create",
                  "rel": "owner",
                  "type": "application/vnd.abiquo.virtualdatacenter+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075"
              },
              {
                  "title": "Abiquo-DC",
                  "rel": "datacenter",
                  "type": "application/vnd.abiquo.datacenter+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/1"
              },
              {
                  "title": "Video_enterprise",
                  "rel": "enterprise",
                  "type": "application/vnd.abiquo.enterprise+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15"
              }
          ]
      } 


      The "owner" link references the virtualdatacenter, so you can use it obtain the virtualdatacenter entity and you will also need it to create a virtual appliance.

      Code Block
              {
                  "title": "vdc_test_create",
                  "rel": "owner",
                  "type": "application/vnd.abiquo.virtualdatacenter+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075"
              },


  3. Create a virtual appliance

    1. Reference: https://wiki.abiquo.com/api/latest/VirtualAppliancesResource.html#create-a-virtual-appliance

    2. cURL

      Code Block
      curl -X POST https://abiquoapi.bcn.abiquo.com/api/cloud/virtualdatacenters/2075/virtualappliances \ 
      	 -H 'Accept:application/vnd.abiquo.virtualappliance+json; version=4.7' \ 
      	 -H 'Content-Type:application/vnd.abiquo.virtualappliance+json; version=4.7' \ 
      	 -d @virtualappliancecreate.json \ 
      	 -u user:password --verbose 


    3. Virtual appliance entity

      Code Block
      {
      	"name":"vapp_test_create"
      }


    4. Sample response. Success status code: 201

      Code Block
      {
          "id": 2596,
          "error": 0,
          "highDisponibility": 0,
          "name": "vapp_test_create",
          "publicApp": 0,
          "state": "NOT_DEPLOYED",
          "restricted": false,
          "notAllocatedVirtualMachines": 0,
          "onVirtualMachines": 0,
          "offVirtualMachines": 0,
          "pausedVirtualMachines": 0,
          "allocatedVirtualMachines": 0,
          "configuredVirtualMachines": 0,
          "unknownVirtualMachines": 0,
          "lockedVirtualMachines": 0,
          "links": [
              {
                  "title": "vapp_test_create",
                  "rel": "edit",
                  "type": "application/vnd.abiquo.virtualappliance+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596"
              },
              {
                  "title": "vdc_test_create",
                  "rel": "virtualdatacenter",
                  "type": "application/vnd.abiquo.virtualdatacenter+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075"
              },
              {
                  "title": "Video_enterprise",
                  "rel": "enterprise",
                  "type": "application/vnd.abiquo.enterprise+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15"
              },
              {
                  "title": "virtual machines",
                  "rel": "virtualmachines",
                  "type": "application/vnd.abiquo.virtualmachines+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines"
              },
              {
                  "title": "virtual appliances state",
                  "rel": "state",
                  "type": "application/vnd.abiquo.virtualappliancestate+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/state"
              },
              {
                  "title": "undeploy",
                  "rel": "undeploy",
                  "type": "application/vnd.abiquo.acceptedrequest+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/action/undeploy"
              },
              {
                  "title": "deploy",
                  "rel": "deploy",
                  "type": "application/vnd.abiquo.acceptedrequest+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/action/deploy"
              },
              {
                  "title": "price",
                  "rel": "price",
                  "type": "text/plain",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/action/price"
              },
              {
                  "title": "layers",
                  "rel": "layers",
                  "type": "application/vnd.abiquo.layers+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/layers"
              },
              {
                  "title": "spec",
                  "rel": "spec",
                  "type": "application/vnd.abiquo.virtualappliancespec+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/action/spec"
              },
              {
                  "title": "tasks",
                  "rel": "tasks",
                  "type": "application/vnd.abiquo.tasks+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/tasks"
              },
              {
                  "title": "scalinggroups",
                  "rel": "scalinggroups",
                  "type": "application/vnd.abiquo.scalinggroups+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/scalinggroups"
              },
              {
                  "title": "metricsmetadata",
                  "rel": "metricsmetadata",
                  "type": "application/vnd.abiquo.metricsmetadata+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/metrics"
              },
              {
                  "title": "collectd",
                  "rel": "collectd",
                  "type": "application/json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/metrics/collectd"
              },
              {
                  "title": "alarmssearch",
                  "rel": "alarmssearch",
                  "type": "application/vnd.abiquo.alarms+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/alarms"
              }
          ]
      }


    5. You will need the virtualmachines link to create a VM

      Code Block
              {
                  "title": "virtual machines",
                  "rel": "virtualmachines",
                  "type": "application/vnd.abiquo.virtualmachines+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines"
              },      


  4. Get a compatible template from the Apps library

    1. Reference: https://wiki.abiquo.com/api/latest/VirtualMachineTemplatesResource.html#list-virtual-machine-templates-in-a-datacenter-repository

    2. Perform a GET request to the URL from the datacenterrepository link of the location. Get the virtualmachinetemplates link from the datacenterrepository.

    3. Get the VM templates using parameters including:

      1. hypervisorTypeName - for compatibility

      2. limit - for convenience

      3. has - filter template names by this text string

      See the above API Reference page for more details.

    4. cURL

      Code Block
      curl --verbose -X GET "https://abiquoapi.bcn.abiquo.com/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates?hypervisorTypeName=VMX_04&limit=1&has=Core" \
      -H "Accept: application/vnd.abiquo.virtualmachinetemplates+json; version=4.7;" \
      -u user:password


    5. Sample response. Success status code: 201

      Code Block
      {
          "totalSize": 2,
          "links": [
              {
                  "rel": "first",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates?hypervisorTypeName=VMX_04&limit=1&has=Core&by=state&asc=true"
              },
              {
                  "rel": "next",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates?hypervisorTypeName=VMX_04&startwith=1&limit=1&has=Core&by=state&asc=true"
              },
              {
                  "rel": "last",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates?hypervisorTypeName=VMX_04&startwith=1&limit=1&has=Core&by=state&asc=true"
              }
          ],
          "collection": [
              {
                  "id": "3",
                  "name": "Core",
                  "description": "root : abiquo",
                  "osType": "LINUX_64",
                  "osVersion": "",
                  "cpuRequired": 1,
                  "ramRequired": 64,
                  "shared": true,
                  "state": "DONE",
                  "creationDate": "2017-02-06T23:37:41.000+0000",
                  "creationUser": "SYSTEM",
                  "chefEnabled": false,
                  "iconUrl": "https://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png",
                  "loginUser": "user",
                  "loginPassword": "password",
                  "ethernetDriverType": "E1000",
                  "variables": {},
                  "enableCpuHotAdd": false,
                  "enableRamHotAdd": false,
                  "enableDisksHotReconfigure": false,
                  "enableNicsHotReconfigure": false,
                  "enableRemoteAccessHotReconfigure": false,
                  "enableOnlyHPRecommended": false,
                  "generateGuestInitialPassword": false,
                  "productCodes": [],
                  "links": [
                      {
                          "title": "Video_enterprise",
                          "rel": "enterprise",
                          "type": "application/vnd.abiquo.enterprise+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15"
                      },
                      {
                          "title": "Others",
                          "rel": "category",
                          "type": "application/vnd.abiquo.category+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/config/categories/1"
                      },
                      {
                          "title": "Core",
                          "rel": "edit",
                          "type": "application/vnd.abiquo.virtualmachinetemplate+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates/3"
                      },
                      {
                          "title": "tasks",
                          "rel": "tasks",
                          "type": "application/vnd.abiquo.tasks+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates/3/tasks"
                      },
                      {
                          "title": "repository",
                          "rel": "datacenterrepository",
                          "type": "application/vnd.abiquo.datacenterrepository+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1"
                      },
                      {
                          "title": "virtual machines",
                          "rel": "virtualmachines",
                          "type": "application/vnd.abiquo.virtualmachines+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates/3/action/virtualmachines"
                      },
                      {
                          "title": "disks",
                          "rel": "disks",
                          "type": "application/vnd.abiquo.disks+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates/3/disks"
                      },
                      {
                          "rel": "disk0",
                          "type": "application/vnd.abiquo.disk+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates/3/disks/3"
                      },
                      {
                          "title": "template definition",
                          "rel": "templatedefinition",
                          "href": "http://rs.bcn.abiquo.com:9000/ovf/305/desc.ovf"
                      },
                      {
                          "title": "template path",
                          "rel": "templatePath",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/am/erepos/15/templates/1/rs.bcn.abiquo.com/abiport9000/ovf/305/"
                      },
                      {
                          "title": "Global scope",
                          "rel": "scope",
                          "type": "application/vnd.abiquo.scope+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/scopes/1"
                      }
                  ]
              }
          ]
      }


    6. Select the virtualmachinetemplate object you want to use and get the edit link

      Code Block
                      {
                          "title": "Core",
                          "rel": "edit",
                          "type": "application/vnd.abiquo.virtualmachinetemplate+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates/3"
                      },


    7. Troubleshooting: if the request doesn't return any templates, you may need to refresh the datacenter repository. Reference: 

  5. Create a VM entity

    1. The link to specify the template is the only required attribute. In this case, we are also setting the friendly name of the VM and enabling remote access.

      Code Block
      {  
         "label":"Core_VM",
         "links":[  
            {  
               "title":"Core",
               "rel":"virtualmachinetemplate",
               "type":"application/vnd.abiquo.virtualmachinetemplate+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates/3"
            }
         ],
         "vdrpEnabled":true
      }


  6. Create a VM

    1. Perform a POST request to the URL of the virtualmachines link from the virtual appliance

    2. cURL

      Code Block
      curl -X POST https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines \ 
      	 -H 'Accept:application/vnd.abiquo.virtualmachine+json; version=4.7' \ 
      	 -H 'Content-Type:application/vnd.abiquo.virtualmachine+json; version=4.7' \ 
      	 -d @virtualmachineentity.json \ 
      	 -u user:password --verbose 


    3. The virtualmachineentity.json file to send with this request is shown in the previous step. 

    4. Sample response. Success status code: 201

      Code Block
      {
          "id": 16644,
          "uuid": "6e28ff4d-207a-4299-9b52-a3bc6ced856a",
          "description": "root : abiquo",
          "coresPerSocket": 1,
          "idState": 1,
          "idType": 0,
          "type": "MANAGED",
          "highDisponibility": 0,
          "monitored": true,
          "protected": false,
          "variables": {},
          "backuppolicies": [],
          "generateGuestInitialPassword": false,
          "natrules": [],
          "vdrpEnabled": true,
          "vdrpPort": 0,
          "password": "h6JXpuku",
          "name": "ABQ_6e28ff4d-207a-4299-9b52-a3bc6ced856a",
          "label": "Core_VM",
          "ram": 64,
          "cpu": 1,
          "state": "NOT_ALLOCATED",
          "creationTimestamp": 1576606467000,
          "iconUrl": "https://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png",
          "links": [
              {
                  "title": "Video_enterprise",
                  "rel": "enterprise",
                  "type": "application/vnd.abiquo.enterprise+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15"
              },
              {
                  "title": "ABQ_6e28ff4d-207a-4299-9b52-a3bc6ced856a",
                  "rel": "edit",
                  "type": "application/vnd.abiquo.virtualmachine+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644"
              },
              {
                  "title": "send mail",
                  "rel": "sendmail",
                  "type": "application/vnd.abiquo.mail+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/publiccloudregions/1/enterprises/15/virtualmachines/16644/action/sendmail"
              },
              {
                  "title": "cloudadmin cloudadmin",
                  "rel": "user",
                  "type": "application/vnd.abiquo.user+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/users/10"
              },
              {
                  "title": "vdc_test_create",
                  "rel": "virtualdatacenter",
                  "type": "application/vnd.abiquo.virtualdatacenter+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075"
              },
              {
                  "title": "vapp_test_create",
                  "rel": "virtualappliance",
                  "type": "application/vnd.abiquo.virtualappliance+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596"
              },
              {
                  "title": "metadata",
                  "rel": "metadata",
                  "type": "application/vnd.abiquo.metadata+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/metadata"
              },
              {
                  "title": "vlan network configurations",
                  "rel": "configurations",
                  "type": "application/vnd.abiquo.virtualmachinenetworkconfigurations+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/network/configurations"
              },
              {
                  "title": "nics",
                  "rel": "nics",
                  "type": "application/vnd.abiquo.nics+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/network/nics"
              },
              {
                  "title": "disks",
                  "rel": "harddisks",
                  "type": "application/vnd.abiquo.harddisks+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/storage/disks"
              },
              {
                  "title": "NOT_ALLOCATED",
                  "rel": "state",
                  "type": "application/vnd.abiquo.virtualmachinestate+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/state"
              },
              {
                  "title": "virtual machine undeploy",
                  "rel": "undeploy",
                  "type": "application/vnd.abiquo.acceptedrequest+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/undeploy"
              },
              {
                  "title": "virtual machine deploy",
                  "rel": "deploy",
                  "type": "application/vnd.abiquo.acceptedrequest+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/deploy"
              },
              {
                  "title": "virtual machine reset",
                  "rel": "reset",
                  "type": "application/vnd.abiquo.acceptedrequest+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/reset"
              },
              {
                  "title": "virtual machine snapshot",
                  "rel": "instance",
                  "type": "application/vnd.abiquo.acceptedrequest+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/instance"
              },
              {
                  "title": "remote access",
                  "rel": "rdpaccess",
                  "type": "application/vnd.abiquo.virtualmachineconsole+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/config/rdpaccess"
              },
              {
                  "title": "tasks",
                  "rel": "tasks",
                  "type": "application/vnd.abiquo.tasks+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/tasks"
              },
              {
                  "title": "firewalls",
                  "rel": "firewalls",
                  "type": "application/vnd.abiquo.links+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/firewalls"
              },
              {
                  "title": "load balancers",
                  "rel": "loadbalancers",
                  "type": "application/vnd.abiquo.loadbalancers+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/loadbalancers"
              },
              {
                  "title": "request on demand backup",
                  "rel": "requestbackup",
                  "type": "application/vnd.abiquo.ondemandbackup+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/backup/action/request"
              },
              {
                  "title": "request a restore of a backup",
                  "rel": "requestrestore",
                  "type": "application/vnd.abiquo.restore+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/backup/action/restore"
              },
              {
                  "title": "move VM to a virtual appliance",
                  "rel": "vappmove",
                  "type": "application/vnd.abiquo.links+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/vappmove"
              },
              {
                  "title": "move VM to another virtual datacenter",
                  "rel": "move",
                  "type": "application/vnd.abiquo.movevm+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/move"
              },
              {
                  "title": "volumes",
                  "rel": "volumes",
                  "type": "application/vnd.abiquo.volumes+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/storage/volumes"
              },
              {
                  "diskController": "lsilogic",
                  "diskControllerType": "SCSI",
                  "length": "100",
                  "title": "f693e374-e07e-4a94-99db-a7268a904484",
                  "rel": "disk0",
                  "type": "application/vnd.abiquo.harddisk+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/disks/15069"
              },
              {
                  "title": "datastoretierESXI6.0_2.29",
                  "rel": "datastoretier0",
                  "type": "application/vnd.abiquo.datastoretier+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/1/datastoretiers/58"
              },
              {
                  "title": "protect",
                  "rel": "protect",
                  "type": "text/plain",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/protect"
              },
              {
                  "title": "unprotect",
                  "rel": "unprotect",
                  "type": "text/plain",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/unprotect"
              },
              {
                  "title": "metricsmetadata",
                  "rel": "metricsmetadata",
                  "type": "application/vnd.abiquo.metricsmetadata+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/metrics"
              },
              {
                  "title": "disablemonitoring",
                  "rel": "disablemonitoring",
                  "type": "",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/disablemonitoring"
              },
              {
                  "title": "collectd",
                  "rel": "collectd",
                  "type": "application/json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/metrics/collectd"
              },
              {
                  "title": "alarmssearch",
                  "rel": "alarmssearch",
                  "type": "application/vnd.abiquo.alarms+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/alarms"
              },
              {
                  "title": "clone",
                  "rel": "clone",
                  "type": "application/vnd.abiquo.virtualmachinecloneoptions+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/clone"
              },
              {
                  "title": "VMware vCenter",
                  "rel": "hypervisortype",
                  "type": "application/vnd.abiquo.hypervisortype+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
              },
              {
                  "title": "Core",
                  "rel": "virtualmachinetemplate",
                  "type": "application/vnd.abiquo.virtualmachinetemplate+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/15/datacenterrepositories/1/virtualmachinetemplates/3"
              },
              {
                  "title": "Others",
                  "rel": "category",
                  "type": "application/vnd.abiquo.category+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/config/categories/1"
              }
          ],
          "usageStatistics": []
      }


    5. You will need the deploy link to launch the VM

      Code Block
              {
                  "title": "virtual machine deploy",
                  "rel": "deploy",
                  "type": "application/vnd.abiquo.acceptedrequest+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/deploy"
              },


  7. Deploy the VM

    1. Reference: https://wiki.abiquo.com/api/latest/VirtualMachinesResource.html#deploy-a-virtual-machine

    2. cURL

      Code Block
      curl -X POST https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/action/deploy \ 
      	 -H 'Accept:application/vnd.abiquo.acceptedrequest+json;version=4.7' \ 
      	 -u user:password --verbose 


    3. Sample response. Success status code: 202
      This request returns an acceptedrequest object with a link to track the progress of the deploy.

      Code Block
      {
          "message": "You can keep track of the progress in the link",
          "links": [
              {
                  "title": "status",
                  "rel": "status",
                  "type": "application/vnd.abiquo.task+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2075/virtualappliances/2596/virtualmachines/16644/tasks/d49aedbe-cc20-4410-9e74-2de1243342aa"
              }
          ]
      }


    4. Alternatively, you can deploy all the VMs in the virtual appliance using the deploy link from the virtual appliance.

Your VM should now be deployed and powered on. Congratulations! You have completed this tutorial.