Abiquo 5.0

Skip to end of metadata
Go to start of metadata

Introduction

This page describes how to add a NAT rule to a VM using the Abiquo API.

You will need the following resources.

  • NAT virtualdatacenter
  • NAT IP assigned to the virtual datacenter (to create an additional SNAT rule)
  • VM with private IP

Your user role must include the following privileges.

  • ROLE_VDC_ENUMERATE
  • ROLE_VAPP_CUSTOMISE_SETTINGS
  • ROLE_MANAGE_NATIPS
  • ROLE_VDC_MANAGE_NETWORK

Your user must be in the enterprise that owns the virtual datacenter and virtual resources.

The following pages describe NAT configuration and UI functionality.

Summary diagram

The steps in this diagram link to the API reference guide resources and data entities sections.


Requires: NAT VDC with NAT IPVM with private IP Get VMs from the cloud Get the virtual datacenter of the VM Get usable and/or non-defaultSnatnatips of the VDC Create natRules andadd to VM object Update VM to add NAT rules

Detailed steps

  1. Get VMs from the cloud
    • Filter the VMs by vmlabel, for example

    • Reference: https://wiki.abiquo.com/api/latest/AllVirtualMachinesResource.html#list-virtual-machines-of-the-user

    • cURL

      Get VMs from the cloud
      curl -X GET https://abiquoapi.bcn.abiquo.com/api/cloud/virtualmachines?vmlabel=yVM \
          -H "Accept: application/vnd.abiquo.virtualmachines+json; version=4.7" \
          -u user:password -k --verbose | jq .
    • Sample response. Success status code: 200
      Note: This request returns a collection of VMs

       Click here to expand...
      {
          "totalSize": 1,
          "links": [
              {
                  "rel": "first",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualmachines?vmlabel=yVM&limit=25&by=name&asc=true"
              },
              {
                  "rel": "last",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualmachines?vmlabel=yVM&startwith=0&limit=25&by=name&asc=true"
              }
          ],
          "collection": [
              {
                  "id": 16385,
                  "uuid": "ab06c388-a3de-4694-9a6b-de86285a683a",
                  "description": "yVM tiny linux. Log in as 'root' with password 'VMware1!'.",
                  "coresPerSocket": 1,
                  "idState": 4,
                  "idType": 0,
                  "type": "MANAGED",
                  "highDisponibility": 0,
                  "metadata": {
                      "monitoring-metrics": [
                          {
                              "name": "Memory-swap2"
                          },
                          {
                              "name": "Uptime"
                          },
                          {
                              "name": "abq-cpu_usage"
                          },
                          {
                              "name": "CPU-time"
                          },
                          {
                              "name": "Disk-latency"
                          },
                          {
                              "name": "Memory-swap"
                          },
                          {
                              "name": "Memory-host"
                          },
                          {
                              "name": "abq-ram_usage"
                          },
                          {
                              "name": "Memory-physical"
                          },
                          {
                              "name": "Memory-vmmemctl"
                          },
                          {
                              "name": "Memory"
                          },
                          {
                              "name": "CPU"
                          },
                          {
                              "name": "CPU-Mz"
                          }
                      ]
                  },
                  "monitored": true,
                  "monitoringLevel": "DEFAULT",
                  "protected": false,
                  "variables": {},
                  "backuppolicies": [],
                  "lastSynchronize": 1575567382000,
                  "generateGuestInitialPassword": false,
                  "natrules": [],
                  "internalProviderId": "vm-7241-at-192.168.100.10",
                  "vdrpEnabled": true,
                  "vdrpPort": 5901,
                  "vdrpIP": "10.60.2.13",
                  "password": "VHYWVmuJ",
                  "name": "ABQ_ab06c388-a3de-4694-9a6b-de86285a683a",
                  "label": "yVMMMM de nando Enterprise",
                  "ram": 48,
                  "cpu": 1,
                  "state": "ON",
                  "creationTimestamp": 1575555331000,
                  "iconUrl": "http://s3-eu-west-1.amazonaws.com/packer-repo/yVM/yvm.png",
                  "links": [
                      {
                          "title": "VCENTER_CLUSTER",
                          "rel": "machine",
                          "type": "application/vnd.abiquo.machine+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/datacenters/16/racks/24/machines/374"
                      },
                      {
                          "title": "Datacenter 2",
                          "rel": "location",
                          "type": "application/vnd.abiquo.datacenter+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16"
                      },
                      {
                          "title": "000NSX-NATdevelenterprise",
                          "rel": "enterprise",
                          "type": "application/vnd.abiquo.enterprise+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94"
                      },
                      {
                          "title": "ABQ_ab06c388-a3de-4694-9a6b-de86285a683a",
                          "rel": "edit",
                          "type": "application/vnd.abiquo.virtualmachine+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385"
                      },
                      {
                          "title": "send mail",
                          "rel": "sendmail",
                          "type": "application/vnd.abiquo.mail+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/datacenters/16/racks/24/machines/374/virtualmachines/16385/action/sendmail"
                      },
                      {
                          "title": "cloudadmin cloudadmin",
                          "rel": "user",
                          "type": "application/vnd.abiquo.user+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94/users/10"
                      },
                      {
                          "title": "test2-NSX-NAT",
                          "rel": "virtualdatacenter",
                          "type": "application/vnd.abiquo.virtualdatacenter+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047"
                      },
                      {
                          "title": "NAT_VApp_02_vdc_test2",
                          "rel": "virtualappliance",
                          "type": "application/vnd.abiquo.virtualappliance+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554"
                      },
                      {
                          "title": "metadata",
                          "rel": "metadata",
                          "type": "application/vnd.abiquo.metadata+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/metadata"
                      },
                      {
                          "title": "vlan network configurations",
                          "rel": "configurations",
                          "type": "application/vnd.abiquo.virtualmachinenetworkconfigurations+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/network/configurations"
                      },
                      {
                          "title": "192.168.0.0/24",
                          "rel": "network_configuration",
                          "type": "application/vnd.abiquo.virtualmachinenetworkconfiguration+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/network/configurations/2777"
                      },
                      {
                          "title": "nics",
                          "rel": "nics",
                          "type": "application/vnd.abiquo.nics+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/network/nics"
                      },
                      {
                          "title": "disks",
                          "rel": "harddisks",
                          "type": "application/vnd.abiquo.harddisks+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/storage/disks"
                      },
                      {
                          "title": "ON",
                          "rel": "state",
                          "type": "application/vnd.abiquo.virtualmachinestate+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/state"
                      },
                      {
                          "title": "virtual machine undeploy",
                          "rel": "undeploy",
                          "type": "application/vnd.abiquo.acceptedrequest+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/undeploy"
                      },
                      {
                          "title": "virtual machine deploy",
                          "rel": "deploy",
                          "type": "application/vnd.abiquo.acceptedrequest+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/deploy"
                      },
                      {
                          "title": "virtual machine reset",
                          "rel": "reset",
                          "type": "application/vnd.abiquo.acceptedrequest+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/reset"
                      },
                      {
                          "title": "virtual machine snapshot",
                          "rel": "instance",
                          "type": "application/vnd.abiquo.acceptedrequest+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/instance"
                      },
                      {
                          "title": "remote access",
                          "rel": "rdpaccess",
                          "type": "application/vnd.abiquo.virtualmachineconsole+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/config/rdpaccess"
                      },
                      {
                          "title": "tasks",
                          "rel": "tasks",
                          "type": "application/vnd.abiquo.tasks+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/tasks"
                      },
                      {
                          "title": "firewalls",
                          "rel": "firewalls",
                          "type": "application/vnd.abiquo.links+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/firewalls"
                      },
                      {
                          "title": "load balancers",
                          "rel": "loadbalancers",
                          "type": "application/vnd.abiquo.loadbalancers+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/loadbalancers"
                      },
                      {
                          "title": "request on demand backup",
                          "rel": "requestbackup",
                          "type": "application/vnd.abiquo.ondemandbackup+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/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/2047/virtualappliances/2554/virtualmachines/16385/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/2047/virtualappliances/2554/virtualmachines/16385/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/2047/virtualappliances/2554/virtualmachines/16385/action/move"
                      },
                      {
                          "title": "volumes",
                          "rel": "volumes",
                          "type": "application/vnd.abiquo.volumes+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/storage/volumes"
                      },
                      {
                          "diskAllocation": "THIN",
                          "diskController": "lsilogic",
                          "diskControllerType": "SCSI",
                          "diskLabel": "Hard disk 1",
                          "length": "64",
                          "title": "f6745d69-7f89-4b8a-a101-81cd52722380",
                          "rel": "disk0",
                          "type": "application/vnd.abiquo.harddisk+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/disks/14926"
                      },
                      {
                          "title": "NSX_tier_DC2_ESXI_2_13",
                          "rel": "datastoretier0",
                          "type": "application/vnd.abiquo.datastoretier+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/datastoretiers/49"
                      },
                      {
                          "diskAllocation": "THIN",
                          "diskControllerType": "IDE",
                          "diskLabel": "Hard disk 1",
                          "length": "64",
                          "title": "09fd56e3-1098-43b3-ab7d-4523f4032a93",
                          "rel": "disk1",
                          "type": "application/vnd.abiquo.harddisk+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/disks/14927"
                      },
                      {
                          "title": "NSX_tier_DC2_ESXI_2_13",
                          "rel": "datastoretier1",
                          "type": "application/vnd.abiquo.datastoretier+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/datastoretiers/49"
                      },
                      {
                          "title": "192.168.0.50",
                          "rel": "nic0",
                          "type": "application/vnd.abiquo.privateip+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/14928"
                      },
                      {
                          "title": "protect",
                          "rel": "protect",
                          "type": "text/plain",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/protect"
                      },
                      {
                          "title": "unprotect",
                          "rel": "unprotect",
                          "type": "text/plain",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/unprotect"
                      },
                      {
                          "title": "metricsmetadata",
                          "rel": "metricsmetadata",
                          "type": "application/vnd.abiquo.metricsmetadata+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/metrics"
                      },
                      {
                          "title": "disablemonitoring",
                          "rel": "disablemonitoring",
                          "type": "",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/disablemonitoring"
                      },
                      {
                          "title": "collectd",
                          "rel": "collectd",
                          "type": "application/json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/metrics/collectd"
                      },
                      {
                          "title": "alarmssearch",
                          "rel": "alarmssearch",
                          "type": "application/vnd.abiquo.alarms+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/alarms"
                      },
                      {
                          "title": "clone",
                          "rel": "clone",
                          "type": "application/vnd.abiquo.virtualmachinecloneoptions+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/clone"
                      },
                      {
                          "title": "VMware vCenter Cluster",
                          "rel": "hypervisortype",
                          "type": "application/vnd.abiquo.hypervisortype+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/config/hypervisortypes/VCENTER_CLUSTER"
                      },
                      {
                          "title": "yVMMMM de nando Enterprise",
                          "rel": "virtualmachinetemplate",
                          "type": "application/vnd.abiquo.virtualmachinetemplate+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94/datacenterrepositories/16/virtualmachinetemplates/297"
                      },
                      {
                          "title": "OS",
                          "rel": "category",
                          "type": "application/vnd.abiquo.category+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/config/categories/10"
                      }
                  ],
                  "usageStatistics": []
              }
          ],
          "duplicatedvms": []
      }
    1. Keep the VM entity to update it. You will also need the privateip, edit, and virtualdatacenter links

       Click here to expand...
      1. privateip

        {
           "title": "192.168.0.50",
           "rel": "nic0",
           "type": "application/vnd.abiquo.privateip+json",
           "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/14928"
        }, 
      2. edit

        {
           "title": "ABQ_ab06c388-a3de-4694-9a6b-de86285a683a",
           "rel": "edit",
           "type": "application/vnd.abiquo.virtualmachine+json",
           "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385"
        },
      3. virtualdatacenter

        {
           "title": "ABQ_ab06c388-a3de-4694-9a6b-de86285a683a",
           "rel": "edit",
           "type": "application/vnd.abiquo.virtualmachine+json",
           "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385"
        },
  1. Get the virtual datacenter of the VM

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

    • cURL

      curl -X GET "https://abiquoapi.bcn.abiquo.com/api/cloud/virtualdatacenters/2047" \
      	-H 'Accept: application/vnd.abiquo.virtualdatacenter+json;version=4.7' \
      	-u user:password --verbose 
    • Sample response. Success status code: 200

       Click here to expand...
      {
          "id": 2047,
          "hypervisorType": "VCENTER_CLUSTER",
          "name": "test2-NSX-NAT",
          "network": {
              "id": 2777,
              "name": "default_private_network",
              "address": "192.168.0.0",
              "mask": 24,
              "gateway": "192.168.0.1",
              "primaryDNS": "10.60.1.4",
              "secondaryDNS": "8.8.8.8",
              "sufixDNS": "",
              "tag": 20010,
              "defaultNetwork": false,
              "type": "INTERNAL",
              "dhcpOptions": {
                  "links": [],
                  "collection": []
              },
              "ipv6": false,
              "strict": false,
              "providerId": "virtualwire-1332#dvportgroup-7175,dvportgroup-7176",
              "restricted": false,
              "internetGatewayRole": false,
              "ipRanges": [
                  {
                      "firstIp": "192.168.0.22",
                      "lastIp": "192.168.0.254"
                  }
              ],
              "excludedFromFirewall": false,
              "notUsableLoadBalancers": false,
              "notUsableVirtualMachines": false,
              "links": [
                  {
                      "title": "test2-NSX-NAT",
                      "rel": "virtualdatacenter",
                      "type": "application/vnd.abiquo.virtualdatacenter+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047"
                  },
                  {
                      "title": "default_private_network",
                      "rel": "edit",
                      "type": "application/vnd.abiquo.vlan+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777"
                  },
                  {
                      "title": "ips",
                      "rel": "ips",
                      "type": "application/vnd.abiquo.privateips+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips"
                  },
                  {
                      "title": "Service Network dvSwicth",
                      "rel": "networkservicetype",
                      "type": "application/vnd.abiquo.networkservicetype+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/datacenters/16/networkservicetypes/10"
                  },
                  {
                      "title": "load balancers",
                      "rel": "loadbalancers",
                      "type": "application/vnd.abiquo.loadbalancers+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/loadbalancers"
                  },
                  {
                      "title": "configuration",
                      "rel": "configuration",
                      "type": "application/vnd.abiquo.networkconfiguration+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/configuration"
                  },
                  {
                      "title": "192.168.0.0/24",
                      "rel": "network_configuration",
                      "type": "application/vnd.abiquo.networkconfiguration+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/configuration/2777"
                  },
                  {
                      "title": "reserve a set of ips",
                      "rel": "reserveips",
                      "type": "application/vnd.abiquo.ipliterals+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/action/reserve"
                  },
                  {
                      "title": "release a set of ips",
                      "rel": "releaseips",
                      "type": "application/vnd.abiquo.ipliterals+json",
                      "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/action/release"
                  }
              ]
          },
          "providerId": "edge-1851",
          "syncState": "NONE",
          "usersRole": [],
          "defaultVPNLocalEndpoint": "192.168.255.245",
          "diskSoftLimitInMb": 0,
          "diskHardLimitInMb": 0,
          "storageSoftInMb": 0,
          "storageHardInMb": 0,
          "vmsSoft": 0,
          "vmsHard": 0,
          "vlansSoft": 0,
          "vlansHard": 0,
          "publicIpsSoft": 0,
          "publicIpsHard": 0,
          "links": [
              {
                  "title": "test2-NSX-NAT",
                  "rel": "edit",
                  "type": "application/vnd.abiquo.virtualdatacenter+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047"
              },
              {
                  "title": "private networks",
                  "rel": "privatenetworks",
                  "type": "application/vnd.abiquo.vlans+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks"
              },
              {
                  "title": "public networks",
                  "rel": "network",
                  "type": "application/vnd.abiquo.vlans+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/datacenters/16/network"
              },
              {
                  "rel": "asynctasks",
                  "type": "application/vnd.abiquo.asynctasks+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/asynctasks"
              },
              {
                  "title": "default_private_network",
                  "rel": "defaultvlan",
                  "type": "application/vnd.abiquo.vlan+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777"
              },
              {
                  "title": "000NSX-NATdevelenterprise",
                  "rel": "enterprise",
                  "type": "application/vnd.abiquo.enterprise+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94"
              },
              {
                  "title": "virtual appliances",
                  "rel": "virtualappliances",
                  "type": "application/vnd.abiquo.virtualappliances+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances"
              },
              {
                  "title": "private ips",
                  "rel": "privateips",
                  "type": "application/vnd.abiquo.privateips+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/privateips"
              },
              {
                  "title": "external ips",
                  "rel": "externalips",
                  "type": "application/vnd.abiquo.externalips+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/externalips"
              },
              {
                  "title": "unmanaged ips",
                  "rel": "unmanagedips",
                  "type": "application/vnd.abiquo.unmanagedips+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/unmanagedips"
              },
              {
                  "title": "default vlan",
                  "rel": "defaultvlan",
                  "type": "application/vnd.abiquo.vlan+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/defaultvlan"
              },
              {
                  "title": "disks",
                  "rel": "disks",
                  "type": "application/vnd.abiquo.harddisks+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/disks"
              },
              {
                  "title": "ips to purchase",
                  "rel": "topurchase",
                  "type": "application/vnd.abiquo.publicips+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/publicips/topurchase"
              },
              {
                  "title": "ips purchased",
                  "rel": "purchased",
                  "type": "application/vnd.abiquo.publicips+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/publicips/purchased"
              },
              {
                  "title": "volumes",
                  "rel": "volumes",
                  "type": "application/vnd.abiquo.volumes+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/volumes"
              },
              {
                  "title": "tiers",
                  "rel": "tiers",
                  "type": "application/vnd.abiquo.tiers+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/tiers"
              },
              {
                  "title": "stateful volumes",
                  "rel": "statefulcandidates",
                  "type": "application/vnd.abiquo.volumes+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/volumes/action/statefulcandidates"
              },
              {
                  "title": "available templates",
                  "rel": "templates",
                  "type": "application/vnd.abiquo.virtualmachinetemplates+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/templates"
              },
              {
                  "title": "all virtual machines",
                  "rel": "virtualmachines",
                  "type": "application/vnd.abiquo.virtualmachines+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/virtualmachines"
              },
              {
                  "title": "nsx-nat-device_devel",
                  "rel": "device",
                  "type": "application/vnd.abiquo.device+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219"
              },
              {
                  "title": "firewalls",
                  "rel": "firewalls",
                  "type": "application/vnd.abiquo.firewallpolicies+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/firewalls"
              },
              {
                  "title": "load balancers",
                  "rel": "loadbalancers",
                  "type": "application/vnd.abiquo.loadbalancers+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/loadbalancers"
              },
              {
                  "title": "assigned nat ips",
                  "rel": "natips",
                  "type": "application/vnd.abiquo.natips+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/natips"
              },
              {
                  "title": "used nat rules",
                  "rel": "natrules",
                  "type": "application/vnd.abiquo.natrules+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/natrules"
              },
              {
                  "title": "vpns",
                  "rel": "vpns",
                  "type": "application/vnd.abiquo.vpnsipsec+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/vpns"
              },
              {
                  "title": "Datacenter 2",
                  "rel": "location",
                  "type": "application/vnd.abiquo.datacenter+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16"
              },
              {
                  "title": "tasks",
                  "rel": "tasks",
                  "type": "application/vnd.abiquo.tasks+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/tasks"
              },
              {
                  "title": "location limit",
                  "rel": "limit",
                  "type": "application/vnd.abiquo.limit+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94/limits/311"
              },
              {
                  "title": "externalnetworks",
                  "rel": "externalnetworks",
                  "type": "application/vnd.abiquo.vlans+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94/limits/311/externalnetworks"
              },
              {
                  "title": "virtual appliances specs",
                  "rel": "vappspecs",
                  "type": "application/vnd.abiquo.virtualappliancespecs+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/vappspecs"
              },
              {
                  "title": "Dollar - $",
                  "rel": "currency",
                  "type": "application/vnd.abiquo.currency+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/config/currencies/1"
              },
              {
                  "title": "alarmssearch",
                  "rel": "alarmssearch",
                  "type": "application/vnd.abiquo.alarms+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/alarms"
              }
          ],
          "ramSoft": 0,
          "ramHard": 0,
          "cpuSoft": 0,
          "cpuHard": 0
      }
    1. From the virtual datacenter save the natips link

              {
                  "title": "assigned nat ips",
                  "rel": "natips",
                  "type": "application/vnd.abiquo.natips+json",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/natips"
              },
    2. Also, optionally for reference, you can use the natrules link. See https://wiki.abiquo.com/api/latest/VirtualDatacentersResource.html#list-nat-rules-in-a-virtual-datacenter

  2. Get NAT IPs from the VDC
    • Reference: https://wiki.abiquo.com/api/latest/VirtualDatacentersResource.html#list-nat-ips-in-a-virtual-datacenter
    • cURL

      curl -X GET https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/natips?usable=true \
      	-H 'Accept: application/vnd.abiquo.natips+json;version=4.7' \
      	-u user:password --verbose
      • You cannot use a NAT IP port in more than one DNAT rule, so optionally check existing NAT rules

      • To get usable NAT IPs, without DNAT for ALL ports, set "usable" parameter to true

      • To get additional NAT IPs for creating additional SNAT rules, select NAT IPs with the "defaultSnat" attribute set to false 

    • Sample response. Success status code: 200

       Click here to expand...
      {
          "totalSize": 3,
          "links": [
              {
                  "rel": "first",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/natips?limit=25&by=ip&asc=true"
              },
              {
                  "rel": "last",
                  "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/action/natips?startwith=0&limit=25&by=ip&asc=true"
              }
          ],
          "collection": [
              {
                  "providerId": "edge-1851#10.200.100.4",
                  "ip": "10.200.100.4",
                  "available": true,
                  "quarantine": false,
                  "defaultSnat": true,
                  "links": [
                      {
                          "title": "test2-NSX-NAT",
                          "rel": "virtualdatacenter",
                          "type": "application/vnd.abiquo.virtualdatacenter+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047"
                      },
                      {
                          "title": "10.200.100.4",
                          "rel": "self",
                          "type": "application/vnd.abiquo.natip+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/2/ips/4"
                      },
                      {
                          "title": "nat-network-devel",
                          "rel": "natnetwork",
                          "type": "application/vnd.abiquo.natnetwork+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/2"
                      },
                      {
                          "title": "rules",
                          "rel": "rules",
                          "type": "application/vnd.abiquo.natrules+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/2/ips/4/rules"
                      }
                  ]
              },
              {
                  "providerId": "edge-1851#20.20.20.1",
                  "ip": "20.20.20.1",
                  "available": true,
                  "quarantine": false,
                  "defaultSnat": false,
                  "links": [
                      {
                          "title": "test2-NSX-NAT",
                          "rel": "virtualdatacenter",
                          "type": "application/vnd.abiquo.virtualdatacenter+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047"
                      },
                      {
                          "title": "20.20.20.1",
                          "rel": "self",
                          "type": "application/vnd.abiquo.natip+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1/ips/23"
                      },
                      {
                          "title": "natpoet",
                          "rel": "natnetwork",
                          "type": "application/vnd.abiquo.natnetwork+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1"
                      },
                      {
                          "title": "rules",
                          "rel": "rules",
                          "type": "application/vnd.abiquo.natrules+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1/ips/23/rules"
                      }
                  ]
              },
              {
                  "providerId": "edge-1851#20.20.20.2",
                  "ip": "20.20.20.2",
                  "available": true,
                  "quarantine": false,
                  "defaultSnat": false,
                  "links": [
                      {
                          "title": "test2-NSX-NAT",
                          "rel": "virtualdatacenter",
                          "type": "application/vnd.abiquo.virtualdatacenter+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047"
                      },
                      {
                          "title": "20.20.20.2",
                          "rel": "self",
                          "type": "application/vnd.abiquo.natip+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1/ips/1"
                      },
                      {
                          "title": "natpoet",
                          "rel": "natnetwork",
                          "type": "application/vnd.abiquo.natnetwork+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1"
                      },
                      {
                          "title": "rules",
                          "rel": "rules",
                          "type": "application/vnd.abiquo.natrules+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1/ips/1/rules"
                      }
                  ]
              }
          ]
      } 
    1. For the selected NAT IPs, you will need the self links

                      {
                          "title": "10.200.100.4",
                          "rel": "self",
                          "type": "application/vnd.abiquo.natip+json",
                          "href": "https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/2/ips/4"
                      },
  3. Create natrules and add them to the VM entity
    • The VM natrules attribute is a collection of natrule entities. 
    • Reference: https://wiki.abiquo.com/api/latest/natrule.html
    • Create SNAT rule

      • set originalPort, translatedPort

      • set snat attribute to "true" 

      • for "original" link, use privateip link and set rel to "original"

      • for "translated" link, use natip link and set rel to "translated"

    • DNAT

      • set originalPort, translatedPort, protocol

      • for "original" link, use natip link and set rel to "original"

      • for "translated" link, use privateip link and set rel to "translated"

    • Sample natrules

       Click here to expand...
         "natrules":[ 
            {
               "snat":true,
               "links":[
                  {
                     "title":"192.168.0.50",
                     "rel":"original",
                     "type":"application/vnd.abiquo.privateip+json",
                     "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/14928"
                  },
                  {
                     "title":"20.20.20.2",
                     "rel":"translated",
                     "type":"application/vnd.abiquo.natip+json",
                     "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1/ips/1"
                  }
               ]
            },
      	  { 
               "snat":false,
               "links":[ 
                  { 
                     "title":"20.20.20.2",
                     "rel":"original",
                     "type":"application/vnd.abiquo.natip+json",
                     "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1/ips/1"
                  },
                  { 
                     "title":"privateip",
                     "rel":"translated",
                     "type":"application/vnd.abiquo.privateip+json",
                     "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/14928"
                  }
               ],
               "protocol":"TCP",
               "originalPort":37785,
               "translatedPort":22
            }
         ]

      Add the collection of natrules as a comma separated list in the VM natrules attribute. 

  4. Update the VM
    1. Reference: https://wiki.abiquo.com/api/latest/VirtualMachinesResource.html#update-a-virtual-machine
    2. cURL

      curl --verbose -X PUT -u user:password \
      'https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385'
      -H 'Accept:application/vnd.abiquo.acceptedrequest+json;version=4.7' \
      -H 'Content-type:application/vnd.abiquo.virtualmachine+json;version=4.7' \
      -d @virtualMachineNAT.json | jsonindent -f -nbe
    3. Request data for this request will be in the file named "virtualMachineNAT.json".

       Click here to expand...
      {
         "id":16385,
         "uuid":"ab06c388-a3de-4694-9a6b-de86285a683a",
         "description":"yVM tiny linux. Log in as 'root' with password 'VMware1!'.",
         "coresPerSocket":1,
         "idState":1,
         "idType":0,
         "type":"MANAGED",
         "highDisponibility":0,
         "metadata":{
            "monitoring-metrics":[
               {
                  "name":"Memory-swap2"
               },
               {
                  "name":"Uptime"
               },
               {
                  "name":"abq-cpu_usage"
               },
               {
                  "name":"CPU-time"
               },
               {
                  "name":"Disk-latency"
               },
               {
                  "name":"Memory-swap"
               },
               {
                  "name":"Memory-host"
               },
               {
                  "name":"abq-ram_usage"
               },
               {
                  "name":"Memory-physical"
               },
               {
                  "name":"Memory-vmmemctl"
               },
               {
                  "name":"Memory"
               },
               {
                  "name":"CPU"
               },
               {
                  "name":"CPU-Mz"
               }
            ]
         },
         "monitored":true,
         "protected":false,
         "variables":{
      
         },
         "backuppolicies":[
      
         ],
         "generateGuestInitialPassword":false,
         "natrules":[
            {
               "snat":false,
               "links":[
                  {
                     "title":"20.20.20.2",
                     "rel":"original",
                     "type":"application/vnd.abiquo.natip+json",
                     "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1/ips/1"
                  },
                  {
                     "title":"192.168.0.50",
                     "rel":"translated",
                     "type":"application/vnd.abiquo.privateip+json",
                     "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/14928"
                  }
               ],
               "protocol":"TCP",
               "originalPort":37785,
               "translatedPort":22
            },
            {
               "snat":true,
               "links":[
                  {
                     "title":"192.168.0.50",
                     "rel":"original",
                     "type":"application/vnd.abiquo.privateip+json",
                     "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/14928"
                  },
                  {
                     "title":"20.20.20.2",
                     "rel":"translated",
                     "type":"application/vnd.abiquo.natip+json",
                     "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/devices/219/natnetworks/1/ips/1"
                  }
               ]
            }
         ],
         "vdrpEnabled":true,
         "vdrpPort":0,
         "password":"VHYWVmuJ",
         "name":"ABQ_ab06c388-a3de-4694-9a6b-de86285a683a",
         "label":"yVMMMM de Nando Enterprise",
         "ram":48,
         "cpu":1,
         "state":"NOT_ALLOCATED",
         "creationTimestamp":1575555331000,
         "iconUrl":"http://s3-eu-west-1.amazonaws.com/packer-repo/yVM/yvm.png",
         "links":[
            {
               "title":"000NSX-NATdevelenterprise",
               "rel":"enterprise",
               "type":"application/vnd.abiquo.enterprise+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94"
            },
            {
               "title":"ABQ_ab06c388-a3de-4694-9a6b-de86285a683a",
               "rel":"edit",
               "type":"application/vnd.abiquo.virtualmachine+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385"
            },
            {
               "title":"send mail",
               "rel":"sendmail",
               "type":"application/vnd.abiquo.mail+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/admin/publiccloudregions/16/enterprises/94/virtualmachines/16385/action/sendmail"
            },
            {
               "title":"cloudadmin cloudadmin",
               "rel":"user",
               "type":"application/vnd.abiquo.user+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94/users/10"
            },
            {
               "title":"test2-NSX-NAT",
               "rel":"virtualdatacenter",
               "type":"application/vnd.abiquo.virtualdatacenter+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047"
            },
            {
               "title":"NAT_VApp_02_vdc_test2",
               "rel":"virtualappliance",
               "type":"application/vnd.abiquo.virtualappliance+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554"
            },
            {
               "title":"metadata",
               "rel":"metadata",
               "type":"application/vnd.abiquo.metadata+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/metadata"
            },
            {
               "title":"vlan network configurations",
               "rel":"configurations",
               "type":"application/vnd.abiquo.virtualmachinenetworkconfigurations+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/network/configurations"
            },
            {
               "title":"nics",
               "rel":"nics",
               "type":"application/vnd.abiquo.nics+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/network/nics"
            },
            {
               "title":"disks",
               "rel":"harddisks",
               "type":"application/vnd.abiquo.harddisks+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/storage/disks"
            },
            {
               "title":"NOT_ALLOCATED",
               "rel":"state",
               "type":"application/vnd.abiquo.virtualmachinestate+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/state"
            },
            {
               "title":"virtual machine undeploy",
               "rel":"undeploy",
               "type":"application/vnd.abiquo.acceptedrequest+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/undeploy"
            },
            {
               "title":"virtual machine deploy",
               "rel":"deploy",
               "type":"application/vnd.abiquo.acceptedrequest+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/deploy"
            },
            {
               "title":"virtual machine reset",
               "rel":"reset",
               "type":"application/vnd.abiquo.acceptedrequest+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/reset"
            },
            {
               "title":"virtual machine snapshot",
               "rel":"instance",
               "type":"application/vnd.abiquo.acceptedrequest+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/instance"
            },
            {
               "title":"remote access",
               "rel":"rdpaccess",
               "type":"application/vnd.abiquo.virtualmachineconsole+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/config/rdpaccess"
            },
            {
               "title":"tasks",
               "rel":"tasks",
               "type":"application/vnd.abiquo.tasks+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/tasks"
            },
            {
               "title":"firewalls",
               "rel":"firewalls",
               "type":"application/vnd.abiquo.links+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/firewalls"
            },
            {
               "title":"load balancers",
               "rel":"loadbalancers",
               "type":"application/vnd.abiquo.loadbalancers+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/loadbalancers"
            },
            {
               "title":"request on demand backup",
               "rel":"requestbackup",
               "type":"application/vnd.abiquo.ondemandbackup+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/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/2047/virtualappliances/2554/virtualmachines/16385/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/2047/virtualappliances/2554/virtualmachines/16385/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/2047/virtualappliances/2554/virtualmachines/16385/action/move"
            },
            {
               "title":"volumes",
               "rel":"volumes",
               "type":"application/vnd.abiquo.volumes+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/storage/volumes"
            },
            {
               "diskControllerType":"SCSI",
               "diskLabel":"Hard disk 1",
               "length":"64",
               "title":"f6745d69-7f89-4b8a-a101-81cd52722380",
               "rel":"disk0",
               "type":"application/vnd.abiquo.harddisk+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/disks/14926"
            },
            {
               "title":"NSX_tier_DC2_ESXI_2_13",
               "rel":"datastoretier0",
               "type":"application/vnd.abiquo.datastoretier+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/datastoretiers/49"
            },
            {
               "diskControllerType":"IDE",
               "diskLabel":"Hard disk 1",
               "length":"64",
               "title":"09fd56e3-1098-43b3-ab7d-4523f4032a93",
               "rel":"disk1",
               "type":"application/vnd.abiquo.harddisk+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/disks/14927"
            },
            {
               "title":"NSX_tier_DC2_ESXI_2_13",
               "rel":"datastoretier1",
               "type":"application/vnd.abiquo.datastoretier+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/locations/16/datastoretiers/49"
            },
            {
               "title":"192.168.0.50",
               "rel":"nic0",
               "type":"application/vnd.abiquo.privateip+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/privatenetworks/2777/ips/14928"
            },
            {
               "title":"protect",
               "rel":"protect",
               "type":"text/plain",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/protect"
            },
            {
               "title":"unprotect",
               "rel":"unprotect",
               "type":"text/plain",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/unprotect"
            },
            {
               "title":"metricsmetadata",
               "rel":"metricsmetadata",
               "type":"application/vnd.abiquo.metricsmetadata+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/metrics"
            },
            {
               "title":"disablemonitoring",
               "rel":"disablemonitoring",
               "type":"",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/disablemonitoring"
            },
            {
               "title":"collectd",
               "rel":"collectd",
               "type":"application/json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/metrics/collectd"
            },
            {
               "title":"alarmssearch",
               "rel":"alarmssearch",
               "type":"application/vnd.abiquo.alarms+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/alarms"
            },
            {
               "title":"clone",
               "rel":"clone",
               "type":"application/vnd.abiquo.virtualmachinecloneoptions+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/action/clone"
            },
            {
               "title":"VMware vCenter Cluster",
               "rel":"hypervisortype",
               "type":"application/vnd.abiquo.hypervisortype+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/config/hypervisortypes/VCENTER_CLUSTER"
            },
            {
               "title":"yVMMMM de Nando Enterprise",
               "rel":"virtualmachinetemplate",
               "type":"application/vnd.abiquo.virtualmachinetemplate+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/admin/enterprises/94/datacenterrepositories/16/virtualmachinetemplates/297"
            },
            {
               "title":"OS",
               "rel":"category",
               "type":"application/vnd.abiquo.category+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/config/categories/10"
            },
            {
               "title":"network configuration with gateway 192.168.0.1",
               "rel":"network_configuration",
               "type":"application/vnd.abiquo.virtualmachinenetworkconfiguration+json",
               "href":"https://abiquoapi.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2047/virtualappliances/2554/virtualmachines/16385/network/configurations/2777"
            }
         ],
         "usageStatistics":[
         ]
      }
    4. Sample response:

      1. If the VM is not deployed, a successful request will return a 204 - No content status.

      2. If the VM is deployed, the request will return a status code of 202 - Accepted request and an acceptedrequest object that contains a link that can be used to check the progress of the task.

       Click here to expand...
      {
         "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/2047/virtualappliances/2554/virtualmachines/16385/tasks/915760ab-0604-48a1-8a95-09e7bf958e48"
            }
         ]
      }