Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This page describes how to add a hard disk to a VM.

You will need the following resources.

  • A VM in a VDC that supports hard disks (private cloud or vCloud Director). 
    • If deployed without hot-reconfigure, you will need to power off the VM (you can do this with the API) 

Potential data loss

  • Abiquo destroys hard disks when you detach them from the VM or when you undeploy or delete the VM
  • Always be careful when working with VM objects and put requests. If you accidentally remove a link, this could delete a disk or network interface card, for example


Your user role must have at least the following privileges:

  • ROLE_VDC_MANAGE_STORAGE
  • ROLE_VDC_MANAGE_STORAGE_CONTROLLER
  • ROLE_MANAGE_HARD_DISKS

Feature description and UI documentation:


To add a hard disk to a VM through the API, the main steps are as follows.

  1. Create a hard disk in the virtual datacenter
  2. Update the VM to add the hard disk link in the disk sequence 

This may appear to be different to how you add a hard disk through the UI, where you work directly in the VM. But behind the scenes, the UI uses the API to create the hard disk in the virtual datacenter and then adds it to the VM.


Request Process

We will walk through the following API request process with examples of the requests and data objects.

 

1. Get a VM by name 

In the UI, copy the first part of the UUID field for the VM. Send a GET request to list all VMs with the "has" parameter to filter and only retrieve the VM with a name that matches the UUID.  

curl -X GET "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualmachines?has=743bfe9e" \
	-H "Accept: application/vnd.abiquo.virtualmachines+json;version=4.2" \
	-u user:password | jq .
 Click here to expand...
{
    "links": [
        {
            "rel": "first",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualmachines?limit=25&has=743bfe9e&by=name&asc=true"
        },
        {
            "rel": "last",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualmachines?startwith=0&limit=25&has=743bfe9e&by=name&asc=true"
        }
    ],
    "collection": [
        {
            "id": 182,
            "uuid": "743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
            "name": "ABQ_743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
            "label": "yVM_01",
            "fqdn": "box",
            "description": "A virtual machine",
            "cpu": 1,
            "ram": 48,
            "vdrpEnabled": true,
            "vdrpPort": 5914,
            "vdrpIP": "192.168.2.54",
            "idState": 6,
            "state": "OFF",
            "idType": 0,
            "type": "MANAGED",
            "highDisponibility": 0,
            "password": "xXs0fVBf",
            "metadata": null,
            "monitored": false,
            "monitoringLevel": "DEFAULT",
            "protected": false,
            "variables": {},
            "creationTimestamp": 1514900489000,
            "backuppolicies": [],
            "lastSynchronize": 1514907378000,
            "generateGuestInitialPassword": false,
            "links": [
                {
                    "title": "VMX_04",
                    "rel": "machine",
                    "type": "application/vnd.abiquo.machine+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/racks/4/machines/2"
                },
                {
                    "title": "BCDC",
                    "rel": "location",
                    "type": "application/vnd.abiquo.datacenter+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4"
                },
                {
                    "title": "ABQ_743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
                    "rel": "edit",
                    "type": "application/vnd.abiquo.virtualmachine+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182"
                },
                {
                    "title": "send mail",
                    "rel": "sendmail",
                    "type": "application/vnd.abiquo.mail+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/racks/4/machines/2/virtualmachines/182/action/sendmail"
                },
                {
                    "title": "Tioco",
                    "rel": "enterprise",
                    "type": "application/vnd.abiquo.enterprise+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2"
                },
                {
                    "title": "Cloud Administrator",
                    "rel": "user",
                    "type": "application/vnd.abiquo.user+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/users/1"
                },
                {
                    "title": "bcdc_tioco_03",
                    "rel": "virtualdatacenter",
                    "type": "application/vnd.abiquo.virtualdatacenter+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3"
                },
                {
                    "title": "bcdc_tioco_03_02",
                    "rel": "virtualappliance",
                    "type": "application/vnd.abiquo.virtualappliance+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4"
                },
                {
                    "title": "metadata",
                    "rel": "metadata",
                    "type": "application/vnd.abiquo.metadata+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metadata"
                },
                {
                    "title": "vlan network configurations",
                    "rel": "configurations",
                    "type": "application/vnd.abiquo.virtualmachinenetworkconfigurations+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/configurations"
                },
                {
                    "title": "192.168.0.0/24",
                    "rel": "network_configuration",
                    "type": "application/vnd.abiquo.virtualmachinenetworkconfiguration+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/configurations/3"
                },
                {
                    "title": "nics",
                    "rel": "nics",
                    "type": "application/vnd.abiquo.nics+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/nics"
                },
                {
                    "title": "disks",
                    "rel": "harddisks",
                    "type": "application/vnd.abiquo.harddisks+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/storage/disks"
                },
                {
                    "title": "OFF",
                    "rel": "state",
                    "type": "application/vnd.abiquo.virtualmachinestate+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/state"
                },
                {
                    "title": "virtual machine undeploy",
                    "rel": "undeploy",
                    "type": "application/vnd.abiquo.acceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/undeploy"
                },
                {
                    "title": "virtual machine deploy",
                    "rel": "deploy",
                    "type": "application/vnd.abiquo.acceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/deploy"
                },
                {
                    "title": "virtual machine reset",
                    "rel": "reset",
                    "type": "application/vnd.abiquo.acceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/reset"
                },
                {
                    "title": "virtual machine snapshot",
                    "rel": "instance",
                    "type": "application/vnd.abiquo.acceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/instance"
                },
                {
                    "title": "remote access",
                    "rel": "rdpaccess",
                    "type": "application/vnd.abiquo.virtualmachineconsole+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/config/rdpaccess"
                },
                {
                    "title": "tasks",
                    "rel": "tasks",
                    "type": "application/vnd.abiquo.tasks+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/tasks"
                },
                {
                    "title": "firewalls",
                    "rel": "firewalls",
                    "type": "application/vnd.abiquo.links+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/firewalls"
                },
                {
                    "title": "load balancers",
                    "rel": "loadbalancers",
                    "type": "application/vnd.abiquo.loadbalancers+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/loadbalancers"
                },
                {
                    "title": "request on demand backup",
                    "rel": "requestbackup",
                    "type": "application/vnd.abiquo.ondemandbackup+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/backup/action/request"
                },
                {
                    "title": "request a restore of a backup",
                    "rel": "requestrestore",
                    "type": "application/vnd.abiquo.restore+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/backup/action/restore"
                },
                {
                    "title": "relocate candidates",
                    "rel": "relocatecandidates",
                    "type": "application/vnd.abiquo.links+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/relocatecandidates"
                },
                {
                    "title": "relocate",
                    "rel": "relocate",
                    "type": "application/vnd.abiquo.acceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/relocate"
                },
                {
                    "title": "volumes",
                    "rel": "volumes",
                    "type": "application/vnd.abiquo.volumes+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/storage/volumes"
                },
                {
                    "diskController": "paravirtual",
                    "diskControllerType": "SCSI",
                    "length": "51",
                    "title": "bcdc_tioco_03_vol_01",
                    "rel": "disk1",
                    "type": "application/vnd.abiquo.volume+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/volumes/9"
                },
                {
                    "diskAllocation": "THIN",
                    "diskControllerType": "IDE",
                    "diskLabel": "Hard disk 1",
                    "length": "64",
                    "title": "bbda1534-5e6c-4d47-8482-c282f383fabd",
                    "rel": "disk0",
                    "type": "application/vnd.abiquo.harddisk+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/6"
                },
                {
                    "title": "Default Tier",
                    "rel": "datastoretier0",
                    "type": "application/vnd.abiquo.datastoretier+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
                },
                {
                    "title": "192.168.0.2",
                    "rel": "nic0",
                    "type": "application/vnd.abiquo.privateip+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/7"
                },
                {
                    "title": "protect",
                    "rel": "protect",
                    "type": "text/plain",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/protect"
                },
                {
                    "title": "unprotect",
                    "rel": "unprotect",
                    "type": "text/plain",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/unprotect"
                },
                {
                    "title": "metricsmetadata",
                    "rel": "metricsmetadata",
                    "type": "application/vnd.abiquo.metricsmetadata+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metrics"
                },
                {
                    "title": "enablemonitoring",
                    "rel": "enablemonitoring",
                    "type": "",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/enablemonitoring"
                },
                {
                    "title": "collectd",
                    "rel": "collectd",
                    "type": "application/json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metrics/collectd"
                },
                {
                    "title": "alarms",
                    "rel": "alarms",
                    "type": "application/vnd.abiquo.alarms+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/alarms"
                },
                {
                    "title": "actionplans",
                    "rel": "actionplans",
                    "type": "application/vnd.abiquo.virtualmachineactionplans+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/actionplans"
                },
                {
                    "title": "actionplansflat",
                    "rel": "actionplansflat",
                    "type": "application/vnd.abiquo.virtualmachineactionplansflat+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/actionplans"
                },
                {
                    "title": "clone",
                    "rel": "clone",
                    "type": "application/vnd.abiquo.virtualmachinecloneoptions+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/clone"
                },
                {
                    "title": "VMware vCenter",
                    "rel": "hypervisortype",
                    "type": "application/vnd.abiquo.hypervisortype+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
                },
                {
                    "title": "yVM",
                    "rel": "virtualmachinetemplate",
                    "type": "application/vnd.abiquo.virtualmachinetemplate+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/datacenterrepositories/4/virtualmachinetemplates/1"
                },
                {
                    "title": "Others",
                    "rel": "category",
                    "type": "application/vnd.abiquo.category+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/categories/1"
                }
            ]
        }
    ],
    "totalSize": 1
}

 

2. Use the VDC link from the VM to get the VDC

Make a GET request to the virtualdatacenter link to obtain the virtual datacenter object. From the virtual datacenter object use the "disks" link. This is where you will create the disks.

curl --verbose -X GET "https://mjsabiquo.bcn.abiquo.com/api/cloud/virtualdatacenters/3" \
	-H "Accept: application/vnd.abiquo.virtualdatacenter+json;version=4.2" \
	-u user:password | jq .

This is the disks link.

https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks

This is the full response

 Click here to expand...
{
    "id": 3,
    "hypervisorType": "VMX_04",
    "name": "bcdc_tioco_03",
    "network": {
        "id": 3,
        "name": "default_private_network",
        "address": "192.168.0.0",
        "mask": 24,
        "gateway": "192.168.0.1",
        "primaryDNS": "",
        "secondaryDNS": "",
        "sufixDNS": "",
        "tag": 101,
        "defaultNetwork": false,
        "type": "INTERNAL",
        "dhcpOptions": {
            "links": [],
            "collection": []
        },
        "ipv6": false,
        "strict": false,
        "restricted": false,
        "internetGatewayRole": false,
        "ipRanges": [],
        "excludedFromFirewall": false,
        "links": [
            {
                "title": "bcdc_tioco_03",
                "rel": "virtualdatacenter",
                "type": "application/vnd.abiquo.virtualdatacenter+json",
                "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3"
            },
            {
                "title": "default_private_network",
                "rel": "edit",
                "type": "application/vnd.abiquo.vlan+json",
                "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3"
            },
            {
                "title": "ips",
                "rel": "ips",
                "type": "application/vnd.abiquo.privateips+json",
                "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3/ips"
            },
            {
                "title": "Service Network",
                "rel": "networkservicetype",
                "type": "application/vnd.abiquo.networkservicetype+json",
                "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/networkservicetypes/4"
            },
            {
                "title": "load balancers",
                "rel": "loadbalancers",
                "type": "application/vnd.abiquo.loadbalancers+json",
                "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3/loadbalancers"
            },
            {
                "title": "configuration",
                "rel": "configuration",
                "type": "application/vnd.abiquo.networkconfiguration+json",
                "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3/configuration"
            },
            {
                "title": "192.168.0.0/24",
                "rel": "network_configuration",
                "type": "application/vnd.abiquo.networkconfiguration+json",
                "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3/configuration/3"
            }
        ]
    },
    "syncState": "NONE",
    "links": [
        {
            "title": "bcdc_tioco_03",
            "rel": "edit",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3"
        },
        {
            "title": "private networks",
            "rel": "privatenetworks",
            "type": "application/vnd.abiquo.vlans+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks"
        },
        {
            "title": "public networks",
            "rel": "network",
            "type": "application/vnd.abiquo.vlans+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/network"
        },
        {
            "title": "default_private_network",
            "rel": "defaultvlan",
            "type": "application/vnd.abiquo.vlan+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3"
        },
        {
            "title": "Tioco",
            "rel": "enterprise",
            "type": "application/vnd.abiquo.enterprise+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2"
        },
        {
            "title": "virtual appliances",
            "rel": "virtualappliances",
            "type": "application/vnd.abiquo.virtualappliances+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances"
        },
        {
            "title": "private ips",
            "rel": "privateips",
            "type": "application/vnd.abiquo.privateips+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/action/privateips"
        },
        {
            "title": "external ips",
            "rel": "externalips",
            "type": "application/vnd.abiquo.externalips+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/action/externalips"
        },
        {
            "title": "unmanaged ips",
            "rel": "unmanagedips",
            "type": "application/vnd.abiquo.unmanagedips+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/action/unmanagedips"
        },
        {
            "title": "default vlan",
            "rel": "defaultvlan",
            "type": "application/vnd.abiquo.vlan+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/action/defaultvlan"
        },
        {
            "title": "volumes",
            "rel": "volumes",
            "type": "application/vnd.abiquo.volumes+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/volumes"
        },
        {
            "title": "disks",
            "rel": "disks",
            "type": "application/vnd.abiquo.harddisks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks"
        },
        {
            "title": "ips to purchase",
            "rel": "topurchase",
            "type": "application/vnd.abiquo.publicips+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/publicips/topurchase"
        },
        {
            "title": "ips purchased",
            "rel": "purchased",
            "type": "application/vnd.abiquo.publicips+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/publicips/purchased"
        },
        {
            "title": "stateful volumes",
            "rel": "statefulcandidates",
            "type": "application/vnd.abiquo.volumes+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/volumes/action/statefulcandidates"
        },
        {
            "title": "tiers",
            "rel": "tiers",
            "type": "application/vnd.abiquo.tiers+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/tiers"
        },
        {
            "title": "available templates",
            "rel": "templates",
            "type": "application/vnd.abiquo.virtualmachinetemplates+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/action/templates"
        },
        {
            "title": "all virtual machines",
            "rel": "virtualmachines",
            "type": "application/vnd.abiquo.virtualmachines+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/action/virtualmachines"
        },
        {
            "title": "BCDC",
            "rel": "location",
            "type": "application/vnd.abiquo.datacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4"
        },
        {
            "title": "tasks",
            "rel": "tasks",
            "type": "application/vnd.abiquo.tasks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/tasks"
        },
        {
            "title": "location limit",
            "rel": "limit",
            "type": "application/vnd.abiquo.limit+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/limits/5"
        },
        {
            "title": "externalnetworks",
            "rel": "externalnetworks",
            "type": "application/vnd.abiquo.vlans+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/limits/5/externalnetworks"
        },
        {
            "title": "virtual appliances specs",
            "rel": "vappspecs",
            "type": "application/vnd.abiquo.virtualappliancespecs+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/vappspecs"
        }
    ],
    "diskSoftLimitInMb": 0,
    "diskHardLimitInMb": 0,
    "storageSoftInMb": 0,
    "storageHardInMb": 0,
    "vlansSoft": 0,
    "vlansHard": 0,
    "publicIpsSoft": 0,
    "publicIpsHard": 0,
    "ramSoft": 0,
    "ramHard": 0,
    "cpuSoft": 0,
    "cpuHard": 0
} 

 

3. Create a data object for the hard disk

To determine what the hard disk object should look like, create a hard disk using the UI and check the post request to the virtualdatacenter's disks link.

Copy the request body data object and modify the data object for a hard disk that you will create with the API, e.g. change the label. For example:

{{
   "links":[
      {
         "title":"Default Tier",
         "rel":"datastoretier",
         "type":"application/vnd.abiquo.datastoretier+json",
         "href":"https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
      }
   ],
   "sizeInMb":48,
   "sequence":2,
   "allocation":"THIN",
   "diskControllerType":"SCSI",
   "label":"test disk 03",
   "diskController":"lsilogic"
}

For more information see VM storage

4. Create the hard disk in the VDC

To create the hard disk in the VDC, send a POST request to the virtual datacenter disks link with the disk data object.

curl --verbose -X POST "https://example.com:443/api/cloud/virtualdatacenters/3/disks" \
	-H "Accept: application/vnd.abiquo.harddisk+json;version=4.2" \
	-H "Content-Type: application/vnd.abiquo.harddisk+json;version=4.2" \
	-u user:password -k \
	-d '{
   "links":[
      {
         "title":"Default Tier",
         "rel":"datastoretier",
         "type":"application/vnd.abiquo.datastoretier+json",
         "href":"https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
      }
   ],
   "sizeInMb":64,
   "sequence":2,
   "allocation":"THIN",
   "diskControllerType":"SCSI",
   "label":"test disk 04",
   "diskController":"lsilogic"
}' | jq .

In the response object, look for the edit link to the hard disk. You will need to modify this link and add it to the VM entity.

 Click here to expand...
{
    "id": 13,
    "label": "test disk 04",
    "sequence": 0,
    "sizeInMb": 64,
    "diskFormatType": "RAW",
    "diskFileSize": 0,
    "diskControllerType": "SCSI",
    "diskController": "lsilogic",
    "bootable": false,
    "uuid": "5910a8f0-a53b-4557-8181-838e32ccc9c9",
    "allocation": "THIN",
    "links": [
        {
            "title": "bcdc_tioco_03",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3"
        },
        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 04",
            "rel": "edit",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/13"
        }
    ]
}

 

5. If necessary, power off the VM

If the VM is deployed and powered on, perform a PUT request to the VM state link, sending a VM state object to power it off. If your test platform supports "gracefulShutdown", you can use it as shown here. A status code of 202 means that the request was accepted. However, you should always check that the VM is really powered off.

curl --verbose -X PUT "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/state" \
	-H "Content-Type: application/vnd.abiquo.virtualmachinestate+json;version=4.2" \
	-d '{"state": "OFF", "gracefulShutdown": true}' \
	-u user:password -k 

 

It's always best to get the VM again, just to check, and using the edit link from the VM object itself, instead of retrieving a list of one VM from the all VMs resource. This makes it easier to edit the VM object.

https://mjsabiquo.bcn.abiquo.com.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182
 Click here to expand...
{
    "id": 182,
    "uuid": "743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
    "name": "ABQ_743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
    "label": "yVM_01",
    "fqdn": "box",
    "description": "A virtual machine",
    "cpu": 1,
    "ram": 48,
    "vdrpEnabled": true,
    "vdrpPort": 5914,
    "vdrpIP": "192.168.2.54",
    "idState": 6,
    "state": "OFF",
    "idType": 0,
    "type": "MANAGED",
    "highDisponibility": 0,
    "password": "xXs0fVBf",
    "metadata": null,
    "monitored": false,
    "monitoringLevel": "DEFAULT",
    "protected": false,
    "variables": {},
    "creationTimestamp": 1514900489000,
    "backuppolicies": [],
    "lastSynchronize": 1514911146000,
    "generateGuestInitialPassword": false,
    "links": [
        {
            "title": "VMX_04",
            "rel": "machine",
            "type": "application/vnd.abiquo.machine+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/racks/4/machines/2"
        },
        {
            "title": "BCDC",
            "rel": "location",
            "type": "application/vnd.abiquo.datacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4"
        },
        {
            "title": "ABQ_743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
            "rel": "edit",
            "type": "application/vnd.abiquo.virtualmachine+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182"
        },
        {
            "title": "send mail",
            "rel": "sendmail",
            "type": "application/vnd.abiquo.mail+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/racks/4/machines/2/virtualmachines/182/action/sendmail"
        },
        {
            "title": "Tioco",
            "rel": "enterprise",
            "type": "application/vnd.abiquo.enterprise+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2"
        },
        {
            "title": "Cloud Administrator",
            "rel": "user",
            "type": "application/vnd.abiquo.user+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/users/1"
        },
        {
            "title": "bcdc_tioco_03",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3"
        },
        {
            "title": "bcdc_tioco_03_02",
            "rel": "virtualappliance",
            "type": "application/vnd.abiquo.virtualappliance+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4"
        },
        {
            "title": "metadata",
            "rel": "metadata",
            "type": "application/vnd.abiquo.metadata+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metadata"
        },
        {
            "title": "vlan network configurations",
            "rel": "configurations",
            "type": "application/vnd.abiquo.virtualmachinenetworkconfigurations+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/configurations"
        },
        {
            "title": "192.168.0.0/24",
            "rel": "network_configuration",
            "type": "application/vnd.abiquo.virtualmachinenetworkconfiguration+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/configurations/3"
        },
        {
            "title": "nics",
            "rel": "nics",
            "type": "application/vnd.abiquo.nics+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/nics"
        },
        {
            "title": "disks",
            "rel": "harddisks",
            "type": "application/vnd.abiquo.harddisks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/storage/disks"
        },
        {
            "title": "OFF",
            "rel": "state",
            "type": "application/vnd.abiquo.virtualmachinestate+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/state"
        },
        {
            "title": "virtual machine undeploy",
            "rel": "undeploy",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/undeploy"
        },
        {
            "title": "virtual machine deploy",
            "rel": "deploy",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/deploy"
        },
        {
            "title": "virtual machine reset",
            "rel": "reset",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/reset"
        },
        {
            "title": "virtual machine snapshot",
            "rel": "instance",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/instance"
        },
        {
            "title": "remote access",
            "rel": "rdpaccess",
            "type": "application/vnd.abiquo.virtualmachineconsole+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/config/rdpaccess"
        },
        {
            "title": "tasks",
            "rel": "tasks",
            "type": "application/vnd.abiquo.tasks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/tasks"
        },
        {
            "title": "firewalls",
            "rel": "firewalls",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/firewalls"
        },
        {
            "title": "load balancers",
            "rel": "loadbalancers",
            "type": "application/vnd.abiquo.loadbalancers+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/loadbalancers"
        },
        {
            "title": "request on demand backup",
            "rel": "requestbackup",
            "type": "application/vnd.abiquo.ondemandbackup+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/backup/action/request"
        },
        {
            "title": "request a restore of a backup",
            "rel": "requestrestore",
            "type": "application/vnd.abiquo.restore+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/backup/action/restore"
        },
        {
            "title": "relocate candidates",
            "rel": "relocatecandidates",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/relocatecandidates"
        },
        {
            "title": "relocate",
            "rel": "relocate",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/relocate"
        },
        {
            "title": "volumes",
            "rel": "volumes",
            "type": "application/vnd.abiquo.volumes+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/storage/volumes"
        },
        {
            "diskController": "paravirtual",
            "diskControllerType": "SCSI",
            "length": "51",
            "title": "bcdc_tioco_03_vol_01",
            "rel": "disk1",
            "type": "application/vnd.abiquo.volume+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/volumes/9"
        },
        {
            "diskAllocation": "THIN",
            "diskControllerType": "IDE",
            "diskLabel": "Hard disk 1",
            "length": "64",
            "title": "bbda1534-5e6c-4d47-8482-c282f383fabd",
            "rel": "disk0",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/6"
        },
        {
            "title": "Default Tier",
            "rel": "datastoretier0",
            "type": "application/vnd.abiquo.datastoretier+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
        },
        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 03",
            "length": "48",
            "title": "2ea3d36c-313d-4f0f-835f-8343ba85190c",
            "rel": "disk2",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/12"
        },
        {
            "title": "Default Tier",
            "rel": "datastoretier2",
            "type": "application/vnd.abiquo.datastoretier+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
        },
        {
            "title": "192.168.0.2",
            "rel": "nic0",
            "type": "application/vnd.abiquo.privateip+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/7"
        },
        {
            "title": "protect",
            "rel": "protect",
            "type": "text/plain",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/protect"
        },
        {
            "title": "unprotect",
            "rel": "unprotect",
            "type": "text/plain",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/unprotect"
        },
        {
            "title": "metricsmetadata",
            "rel": "metricsmetadata",
            "type": "application/vnd.abiquo.metricsmetadata+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metrics"
        },
        {
            "title": "enablemonitoring",
            "rel": "enablemonitoring",
            "type": "",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/enablemonitoring"
        },
        {
            "title": "collectd",
            "rel": "collectd",
            "type": "application/json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metrics/collectd"
        },
        {
            "title": "alarms",
            "rel": "alarms",
            "type": "application/vnd.abiquo.alarms+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/alarms"
        },
        {
            "title": "actionplans",
            "rel": "actionplans",
            "type": "application/vnd.abiquo.virtualmachineactionplans+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/actionplans"
        },
        {
            "title": "actionplansflat",
            "rel": "actionplansflat",
            "type": "application/vnd.abiquo.virtualmachineactionplansflat+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/actionplans"
        },
        {
            "title": "clone",
            "rel": "clone",
            "type": "application/vnd.abiquo.virtualmachinecloneoptions+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/clone"
        },
        {
            "title": "VMware vCenter",
            "rel": "hypervisortype",
            "type": "application/vnd.abiquo.hypervisortype+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
        },
        {
            "title": "yVM",
            "rel": "virtualmachinetemplate",
            "type": "application/vnd.abiquo.virtualmachinetemplate+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/datacenterrepositories/4/virtualmachinetemplates/1"
        },
        {
            "title": "Others",
            "rel": "category",
            "type": "application/vnd.abiquo.category+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/categories/1"
        }
    ]
} 

 

7. Modify the link to the hard disk to add it in the boot sequence of the VM

To add the hard disk to the VM, we will modify the VM entity and add a link to the hard disk. So the first step is to create a link to the hard disk.

First check if there are already any existing disks in the VM to determine the boot sequence. The disk "rel" (relation) link values are in the format "diskX", where "X" is the sequence number starting with 0 for the boot disk.

This is the boot disk of the VM taken from the VM object.

        {
            "diskAllocation": "THIN",
            "diskControllerType": "IDE",
            "diskLabel": "Hard disk 1",
            "length": "64",
            "title": "bbda1534-5e6c-4d47-8482-c282f383fabd",
            "rel": "disk0",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/6"
        },

And this is the edit link of our hard disk.

        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 04",
            "rel": "edit",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/13"
        }

So we should modify the edit link from the hard disk and change the "rel" link to specify that it should be included in the VM boot sequence as "disk3". So the link to send in the VM put request would look like this:

        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 04",
            "rel": "disk3",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/13"
        }

Next we will add this link to the VM.

8. Edit the VM data object to add the link to the hard disk

Add the link at the end of the links section. Don't forget to add a comma before the new link!

 Click here to expand...
{
    "id": 182,
    "uuid": "743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
    "name": "ABQ_743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
    "label": "yVM_01",
    "fqdn": "box",
    "description": "A virtual machine",
    "cpu": 1,
    "ram": 48,
    "vdrpEnabled": true,
    "vdrpPort": 5914,
    "vdrpIP": "192.168.2.54",
    "idState": 6,
    "state": "OFF",
    "idType": 0,
    "type": "MANAGED",
    "highDisponibility": 0,
    "password": "xXs0fVBf",
    "metadata": null,
    "monitored": false,
    "monitoringLevel": "DEFAULT",
    "protected": false,
    "variables": {},
    "creationTimestamp": 1514900489000,
    "backuppolicies": [],
    "lastSynchronize": 1514911146000,
    "generateGuestInitialPassword": false,
    "links": [
        {
            "title": "VMX_04",
            "rel": "machine",
            "type": "application/vnd.abiquo.machine+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/racks/4/machines/2"
        },
        {
            "title": "BCDC",
            "rel": "location",
            "type": "application/vnd.abiquo.datacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4"
        },
        {
            "title": "ABQ_743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
            "rel": "edit",
            "type": "application/vnd.abiquo.virtualmachine+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182"
        },
        {
            "title": "send mail",
            "rel": "sendmail",
            "type": "application/vnd.abiquo.mail+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/racks/4/machines/2/virtualmachines/182/action/sendmail"
        },
        {
            "title": "Tioco",
            "rel": "enterprise",
            "type": "application/vnd.abiquo.enterprise+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2"
        },
        {
            "title": "Cloud Administrator",
            "rel": "user",
            "type": "application/vnd.abiquo.user+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/users/1"
        },
        {
            "title": "bcdc_tioco_03",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3"
        },
        {
            "title": "bcdc_tioco_03_02",
            "rel": "virtualappliance",
            "type": "application/vnd.abiquo.virtualappliance+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4"
        },
        {
            "title": "metadata",
            "rel": "metadata",
            "type": "application/vnd.abiquo.metadata+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metadata"
        },
        {
            "title": "vlan network configurations",
            "rel": "configurations",
            "type": "application/vnd.abiquo.virtualmachinenetworkconfigurations+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/configurations"
        },
        {
            "title": "192.168.0.0/24",
            "rel": "network_configuration",
            "type": "application/vnd.abiquo.virtualmachinenetworkconfiguration+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/configurations/3"
        },
        {
            "title": "nics",
            "rel": "nics",
            "type": "application/vnd.abiquo.nics+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/nics"
        },
        {
            "title": "disks",
            "rel": "harddisks",
            "type": "application/vnd.abiquo.harddisks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/storage/disks"
        },
        {
            "title": "OFF",
            "rel": "state",
            "type": "application/vnd.abiquo.virtualmachinestate+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/state"
        },
        {
            "title": "virtual machine undeploy",
            "rel": "undeploy",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/undeploy"
        },
        {
            "title": "virtual machine deploy",
            "rel": "deploy",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/deploy"
        },
        {
            "title": "virtual machine reset",
            "rel": "reset",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/reset"
        },
        {
            "title": "virtual machine snapshot",
            "rel": "instance",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/instance"
        },
        {
            "title": "remote access",
            "rel": "rdpaccess",
            "type": "application/vnd.abiquo.virtualmachineconsole+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/config/rdpaccess"
        },
        {
            "title": "tasks",
            "rel": "tasks",
            "type": "application/vnd.abiquo.tasks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/tasks"
        },
        {
            "title": "firewalls",
            "rel": "firewalls",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/firewalls"
        },
        {
            "title": "load balancers",
            "rel": "loadbalancers",
            "type": "application/vnd.abiquo.loadbalancers+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/loadbalancers"
        },
        {
            "title": "request on demand backup",
            "rel": "requestbackup",
            "type": "application/vnd.abiquo.ondemandbackup+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/backup/action/request"
        },
        {
            "title": "request a restore of a backup",
            "rel": "requestrestore",
            "type": "application/vnd.abiquo.restore+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/backup/action/restore"
        },
        {
            "title": "relocate candidates",
            "rel": "relocatecandidates",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/relocatecandidates"
        },
        {
            "title": "relocate",
            "rel": "relocate",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/relocate"
        },
        {
            "title": "volumes",
            "rel": "volumes",
            "type": "application/vnd.abiquo.volumes+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/storage/volumes"
        },
        {
            "diskController": "paravirtual",
            "diskControllerType": "SCSI",
            "length": "51",
            "title": "bcdc_tioco_03_vol_01",
            "rel": "disk1",
            "type": "application/vnd.abiquo.volume+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/volumes/9"
        },
        {
            "diskAllocation": "THIN",
            "diskControllerType": "IDE",
            "diskLabel": "Hard disk 1",
            "length": "64",
            "title": "bbda1534-5e6c-4d47-8482-c282f383fabd",
            "rel": "disk0",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/6"
        },
        {
            "title": "Default Tier",
            "rel": "datastoretier0",
            "type": "application/vnd.abiquo.datastoretier+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
        },
        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 04",
            "rel": "disk3",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/13"
        },
        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 03",
            "length": "48",
            "title": "2ea3d36c-313d-4f0f-835f-8343ba85190c",
            "rel": "disk2",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/12"
        },
        {
            "title": "Default Tier",
            "rel": "datastoretier2",
            "type": "application/vnd.abiquo.datastoretier+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
        },
        {
            "title": "192.168.0.2",
            "rel": "nic0",
            "type": "application/vnd.abiquo.privateip+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/7"
        },
        {
            "title": "protect",
            "rel": "protect",
            "type": "text/plain",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/protect"
        },
        {
            "title": "unprotect",
            "rel": "unprotect",
            "type": "text/plain",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/unprotect"
        },
        {
            "title": "metricsmetadata",
            "rel": "metricsmetadata",
            "type": "application/vnd.abiquo.metricsmetadata+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metrics"
        },
        {
            "title": "enablemonitoring",
            "rel": "enablemonitoring",
            "type": "",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/enablemonitoring"
        },
        {
            "title": "collectd",
            "rel": "collectd",
            "type": "application/json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metrics/collectd"
        },
        {
            "title": "alarms",
            "rel": "alarms",
            "type": "application/vnd.abiquo.alarms+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/alarms"
        },
        {
            "title": "actionplans",
            "rel": "actionplans",
            "type": "application/vnd.abiquo.virtualmachineactionplans+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/actionplans"
        },
        {
            "title": "actionplansflat",
            "rel": "actionplansflat",
            "type": "application/vnd.abiquo.virtualmachineactionplansflat+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/actionplans"
        },
        {
            "title": "clone",
            "rel": "clone",
            "type": "application/vnd.abiquo.virtualmachinecloneoptions+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/clone"
        },
        {
            "title": "VMware vCenter",
            "rel": "hypervisortype",
            "type": "application/vnd.abiquo.hypervisortype+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
        },
        {
            "title": "yVM",
            "rel": "virtualmachinetemplate",
            "type": "application/vnd.abiquo.virtualmachinetemplate+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/datacenterrepositories/4/virtualmachinetemplates/1"
        },
        {
            "title": "Others",
            "rel": "category",
            "type": "application/vnd.abiquo.category+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/categories/1"
        }
    ]
}  

 

9. Modify the VM to add the hard disk

Now we need to send a PUT request to the VM to modify it and add the hard disk. The VM data object is enormous, so we saved it to a file and used the @ notation to specify the file. If the request is successful, for a VM that is not deployed, the status code returned will be a 204, with no content. If the VM is deployed, a successful request will return a status of 202 Accepted and an accepted request object, with a link to the reconfigure task.

curl --verbose -X PUT "https://example.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182" \
	-H "Content-Type: application/vnd.abiquo.virtualmachine+json;version=4.2" \
	-d @vmwithhd.json \
	-u user:password -k | jq .

 

10. Check the result in your VM

Get the VM to check that the disk has been added.

curl --verbose -X GET "https://example.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182" \
	-H "Accept: application/vnd.abiquo.virtualmachine+json;version=4.2" \
	-u user:password -k | jq .

The disk was added successfully because this disk3 link can be found in the following VM object.

        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 04",
            "rel": "disk3",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/13"
        },


 Click here to expand...
 {
    "id": 182,
    "uuid": "743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
    "name": "ABQ_743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
    "label": "yVM_01",
    "fqdn": "box",
    "description": "A virtual machine",
    "cpu": 1,
    "ram": 48,
    "vdrpEnabled": true,
    "vdrpPort": 5914,
    "vdrpIP": "192.168.2.54",
    "idState": 6,
    "state": "OFF",
    "idType": 0,
    "type": "MANAGED",
    "highDisponibility": 0,
    "password": "xXs0fVBf",
    "metadata": null,
    "monitored": false,
    "monitoringLevel": "DEFAULT",
    "protected": false,
    "variables": {},
    "creationTimestamp": 1514900489000,
    "backuppolicies": [],
    "lastSynchronize": 1514912076000,
    "generateGuestInitialPassword": false,
    "links": [
        {
            "title": "VMX_04",
            "rel": "machine",
            "type": "application/vnd.abiquo.machine+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/racks/4/machines/2"
        },
        {
            "title": "BCDC",
            "rel": "location",
            "type": "application/vnd.abiquo.datacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4"
        },
        {
            "title": "ABQ_743bfe9e-1e6a-47ee-8146-27bbddc2f3cb",
            "rel": "edit",
            "type": "application/vnd.abiquo.virtualmachine+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182"
        },
        {
            "title": "send mail",
            "rel": "sendmail",
            "type": "application/vnd.abiquo.mail+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/4/racks/4/machines/2/virtualmachines/182/action/sendmail"
        },
        {
            "title": "Tioco",
            "rel": "enterprise",
            "type": "application/vnd.abiquo.enterprise+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2"
        },
        {
            "title": "Cloud Administrator",
            "rel": "user",
            "type": "application/vnd.abiquo.user+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/users/1"
        },
        {
            "title": "bcdc_tioco_03",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3"
        },
        {
            "title": "bcdc_tioco_03_02",
            "rel": "virtualappliance",
            "type": "application/vnd.abiquo.virtualappliance+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4"
        },
        {
            "title": "metadata",
            "rel": "metadata",
            "type": "application/vnd.abiquo.metadata+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metadata"
        },
        {
            "title": "vlan network configurations",
            "rel": "configurations",
            "type": "application/vnd.abiquo.virtualmachinenetworkconfigurations+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/configurations"
        },
        {
            "title": "192.168.0.0/24",
            "rel": "network_configuration",
            "type": "application/vnd.abiquo.virtualmachinenetworkconfiguration+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/configurations/3"
        },
        {
            "title": "nics",
            "rel": "nics",
            "type": "application/vnd.abiquo.nics+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/network/nics"
        },
        {
            "title": "disks",
            "rel": "harddisks",
            "type": "application/vnd.abiquo.harddisks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/storage/disks"
        },
        {
            "title": "OFF",
            "rel": "state",
            "type": "application/vnd.abiquo.virtualmachinestate+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/state"
        },
        {
            "title": "virtual machine undeploy",
            "rel": "undeploy",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/undeploy"
        },
        {
            "title": "virtual machine deploy",
            "rel": "deploy",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/deploy"
        },
        {
            "title": "virtual machine reset",
            "rel": "reset",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/reset"
        },
        {
            "title": "virtual machine snapshot",
            "rel": "instance",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/instance"
        },
        {
            "title": "remote access",
            "rel": "rdpaccess",
            "type": "application/vnd.abiquo.virtualmachineconsole+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/config/rdpaccess"
        },
        {
            "title": "tasks",
            "rel": "tasks",
            "type": "application/vnd.abiquo.tasks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/tasks"
        },
        {
            "title": "firewalls",
            "rel": "firewalls",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/firewalls"
        },
        {
            "title": "load balancers",
            "rel": "loadbalancers",
            "type": "application/vnd.abiquo.loadbalancers+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/loadbalancers"
        },
        {
            "title": "request on demand backup",
            "rel": "requestbackup",
            "type": "application/vnd.abiquo.ondemandbackup+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/backup/action/request"
        },
        {
            "title": "request a restore of a backup",
            "rel": "requestrestore",
            "type": "application/vnd.abiquo.restore+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/backup/action/restore"
        },
        {
            "title": "relocate candidates",
            "rel": "relocatecandidates",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/relocatecandidates"
        },
        {
            "title": "relocate",
            "rel": "relocate",
            "type": "application/vnd.abiquo.acceptedrequest+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/relocate"
        },
        {
            "title": "volumes",
            "rel": "volumes",
            "type": "application/vnd.abiquo.volumes+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/storage/volumes"
        },
        {
            "diskController": "paravirtual",
            "diskControllerType": "SCSI",
            "length": "51",
            "title": "bcdc_tioco_03_vol_01",
            "rel": "disk1",
            "type": "application/vnd.abiquo.volume+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/volumes/9"
        },
        {
            "diskAllocation": "THIN",
            "diskControllerType": "IDE",
            "diskLabel": "Hard disk 1",
            "length": "64",
            "title": "bbda1534-5e6c-4d47-8482-c282f383fabd",
            "rel": "disk0",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/6"
        },
        {
            "title": "Default Tier",
            "rel": "datastoretier0",
            "type": "application/vnd.abiquo.datastoretier+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
        },
        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 03",
            "length": "48",
            "title": "2ea3d36c-313d-4f0f-835f-8343ba85190c",
            "rel": "disk2",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/12"
        },
        {
            "title": "Default Tier",
            "rel": "datastoretier2",
            "type": "application/vnd.abiquo.datastoretier+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
        },
        {
            "diskAllocation": "THIN",
            "diskController": "lsilogic",
            "diskControllerType": "SCSI",
            "diskLabel": "test disk 04",
            "length": "64",
            "title": "5910a8f0-a53b-4557-8181-838e32ccc9c9",
            "rel": "disk3",
            "type": "application/vnd.abiquo.harddisk+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/disks/13"
        },
        {
            "title": "Default Tier",
            "rel": "datastoretier3",
            "type": "application/vnd.abiquo.datastoretier+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/4/datastoretiers/4"
        },
        {
            "title": "192.168.0.2",
            "rel": "nic0",
            "type": "application/vnd.abiquo.privateip+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/7"
        },
        {
            "title": "protect",
            "rel": "protect",
            "type": "text/plain",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/protect"
        },
        {
            "title": "unprotect",
            "rel": "unprotect",
            "type": "text/plain",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/unprotect"
        },
        {
            "title": "metricsmetadata",
            "rel": "metricsmetadata",
            "type": "application/vnd.abiquo.metricsmetadata+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metrics"
        },
        {
            "title": "enablemonitoring",
            "rel": "enablemonitoring",
            "type": "",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/enablemonitoring"
        },
        {
            "title": "collectd",
            "rel": "collectd",
            "type": "application/json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/metrics/collectd"
        },
        {
            "title": "alarms",
            "rel": "alarms",
            "type": "application/vnd.abiquo.alarms+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/alarms"
        },
        {
            "title": "actionplans",
            "rel": "actionplans",
            "type": "application/vnd.abiquo.virtualmachineactionplans+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/actionplans"
        },
        {
            "title": "actionplansflat",
            "rel": "actionplansflat",
            "type": "application/vnd.abiquo.virtualmachineactionplansflat+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/actionplans"
        },
        {
            "title": "clone",
            "rel": "clone",
            "type": "application/vnd.abiquo.virtualmachinecloneoptions+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/3/virtualappliances/4/virtualmachines/182/action/clone"
        },
        {
            "title": "VMware vCenter",
            "rel": "hypervisortype",
            "type": "application/vnd.abiquo.hypervisortype+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
        },
        {
            "title": "yVM",
            "rel": "virtualmachinetemplate",
            "type": "application/vnd.abiquo.virtualmachinetemplate+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/2/datacenterrepositories/4/virtualmachinetemplates/1"
        },
        {
            "title": "Others",
            "rel": "category",
            "type": "application/vnd.abiquo.category+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/categories/1"
        }
    ]
}

  • No labels