Skip to end of metadata
Go to start of metadata

Virtual Machines Resource

Exposed Resources Hierarchy
Virtual Machines Resource

Contents:

This resources takes action over collections of virtual machines

Main URI of the Resource

This class operates mainly over the Resource URI: /cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines

Exposed Methods

Retrieve all virtual machines with their nodes

Deprecated Functionality

This functionality was deprecated in version 3.0.

Retrieve all virtual machines from a virtual datacenter and virtual appliance with their nodes

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_ASSIGN_NETWORK,ROLE_VAPP_PERFORM_ACTIONS,ROLE_VAPP_DEPLOY_UNDEPLOY,ROLE_VAPP_CREATE_STATEFUL,ROLE_VAPP_ASSIGN_VOLUME,ROLE_MANAGE_HARD_DISKS,ROLE_VAPP_CREATE_INSTANCE
Request Headers: Accept: application/vnd.abiquo.virtualmachineswithnode+json; version=2.6; application/vnd.abiquo.virtualmachineswithnode+xml; version=2.6;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

name

ordering the request.

has

false

 

filter the request. With this parameter the response just contains the elements
which name matches the filter value.

limit

false

25

number of elements to return

asc

false

true

order ascendant or descendant. By default the sort mode is ascending.

key

false

 

related with metadata information, allows to filter content in this field

Request Message Body Entity:
Response Message Body Entity: VirtualMachinesWithNode Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all virtual machines with own node example
$ curl --verbose -X GET http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines  \
       -H 'Accept:application/vnd.abiquo.virtualmachineswithnode+xml; version=2.6' -u user:password | xmlindent -nbe -f

> GET /api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines HTTP/1.1
> Authorization: Basic ABCdeF12gHIjkLM3no==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept:application/vnd.abiquo.virtualmachineswithnode+xml; version=2.6

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MjQ1NzYyNzQ0MjpiNTM0MzMwY2Y3Zjg3MWY1YWY5M2EyYmM5YmY1ZTNjZTpBQklRVU8; Expires=Tue, 22-Oct-2013 16:00:27 GMT; Path=/api
< Set-Cookie: JSESSIONID=B7B3EA2D31DB15819D94F5A683CAE2D5; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachineswithnode+xml;version=2.6
< Content-Length: 4813
< Date: Tue, 22 Oct 2013 15:30:27 GMT
< 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachineswithnode>
    <virtualmachinewithnode>
        <link title="KVM" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/2"/>
        <link title="ABQ_c502eeb3-2b72-49c7-a75c-5363fc2ef7a8" rel="edit" type="application/vnd.abiquo.virtualmachinewithnode+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11"/>
        <link title="send mail" rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/11/action/sendmail"/>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/1"/>
        <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com:80/api/admin/enterprises/1/users/1"/>
        <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2"/>
        <link title="BVAPP_01" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3"/>
        <link title="vlan network configurations" rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/configurations"/>
        <link title="192.168.5.0/24" rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/configurations/4"/>
        <link title="nics" rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/nics"/>
        <link title="disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/storage/disks"/>
        <link title="ON" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/state"/>
        <link title="virtual machine undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/undeploy"/>
        <link title="virtual machine deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/deploy"/>
        <link title="virtual machine reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/reset"/>
        <link title="virtual machine reset" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/instance"/>
        <link title="remote access" rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/config/rdpaccess"/>
        <link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/tasks"/>
        <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/storage/volumes"/>
        <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/disks/1279"/>
        <link title="192.168.5.2" rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/privatenetworks/4/ips/770"/>
        <link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
        <id>11</id>
        <uuid>c502eeb3-2b72-49c7-a75c-5363fc2ef7a8</uuid>
        <name>ABQ_c502eeb3-2b72-49c7-a75c-5363fc2ef7a8</name>
        <description>root : abiquo</description>
        <cpu>1</cpu>
        <ram>64</ram>
        <hdInBytes>104857600</hdInBytes>
        <vdrpEnabled>true</vdrpEnabled>
        <vdrpPort>5901</vdrpPort>
        <vdrpIP>10.60.13.26</vdrpIP>
        <idState>4</idState>
        <state>ON</state>
        <idType>0</idType>
        <type>MANAGED</type>
        <highDisponibility>0</highDisponibility>
        <password>EomOkkVR</password>
        <nodeId>9</nodeId>
        <nodeName>Core</nodeName>
        <x>0</x>
        <y>0</y>
    </virtualmachinewithnode>
</virtualmachineswithnode>

Retrieve all virtual machines

Retrieve all virtual machines that belong to this virtual appliance with the standard virtual machine DTO.

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_ASSIGN_NETWORK,ROLE_VAPP_PERFORM_ACTIONS,ROLE_VAPP_DEPLOY_UNDEPLOY,ROLE_VAPP_CREATE_STATEFUL,ROLE_VAPP_ASSIGN_VOLUME,ROLE_MANAGE_HARD_DISKS,ROLE_VAPP_CREATE_INSTANCE
Request Headers: Accept: application/vnd.abiquo.virtualmachines+json; version=3.1; application/vnd.abiquo.virtualmachines+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

offset

by

false

name

by default ordered by name

has

false

 

name filter

limit

false

25

number of items to retrieve

asc

false

true

whether the sorting of the list is ascendent or descendent

key

false

 

related with metadata information, allows to filter content in this field

Request Message Body Entity:
Response Message Body Entity: VirtualMachines Media Type
Request Example:

 Click here to show or hide the request example
Retrive all virtual machines example
$ curl --verbose -X GET http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines -H 'Accept:application/vnd.abiquo.virtualmachines+xml; version=2.6' -u user:password | xmlindent -nbe -f

> GET /api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines HTTP/1.1
> Authorization: Basic ABCdeF12gHIjkLM3no==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept:application/vnd.abiquo.virtualmachines+xml; version=2.6
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MjQ1NzkzODkxOTowMDdjZWYyY2NmOTQ5YTZjYmU5YjE1Yzc4NGRjNDAwNjpBQklRVU8; Expires=Tue, 22-Oct-2013 16:05:38 GMT; Path=/api
< Set-Cookie: JSESSIONID=CFA635B88498FC517FC0C5CC2C53079A; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachines+xml;version=2.6
< Content-Length: 4714
< Date: Tue, 22 Oct 2013 15:35:38 GMT
< 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachines>
    <virtualMachine>
        <link title="KVM" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/2"/>
        <link title="ABQ_c502eeb3-2b72-49c7-a75c-5363fc2ef7a8" rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11"/>
        <link title="send mail" rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/11/action/sendmail"/>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/1"/>
        <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com:80/api/admin/enterprises/1/users/1"/>
        <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2"/>
        <link title="BVAPP_01" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3"/>
        <link title="vlan network configurations" rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/configurations"/>
        <link title="192.168.5.0/24" rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/configurations/4"/>
        <link title="nics" rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/nics"/>
        <link title="disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/storage/disks"/>
        <link title="ON" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/state"/>
        <link title="virtual machine undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/undeploy"/>
        <link title="virtual machine deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/deploy"/>
        <link title="virtual machine reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/reset"/>
        <link title="virtual machine reset" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/instance"/>
        <link title="remote access" rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/config/rdpaccess"/>
        <link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/tasks"/>
        <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/storage/volumes"/>
        <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/disks/1279"/>
        <link title="192.168.5.2" rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/privatenetworks/4/ips/770"/>
        <link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
        <id>11</id>
        <uuid>c502eeb3-2b72-49c7-a75c-5363fc2ef7a8</uuid>
        <name>ABQ_c502eeb3-2b72-49c7-a75c-5363fc2ef7a8</name>
        <description>root : abiquo</description>
        <cpu>1</cpu>
        <ram>64</ram>
        <hdInBytes>104857600</hdInBytes>
        <vdrpEnabled>true</vdrpEnabled>
        <vdrpPort>5901</vdrpPort>
        <vdrpIP>10.60.13.26</vdrpIP>
        <idState>4</idState>
        <state>ON</state>
        <idType>0</idType>
        <type>MANAGED</type>
        <highDisponibility>0</highDisponibility>
        <password>EomOkkVR</password>
    </virtualMachine>
</virtualMachines>

Retrieve all virtual machines with their node and extra information 

Deprecated Functionality

This functionality was deprecated in version 3.0.

Retrieve all virutal machines with own node that includes the user-friendly name used in the GUI and extended information that includes user name and enterprise name.

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_ASSIGN_NETWORK,ROLE_VAPP_PERFORM_ACTIONS,ROLE_VAPP_DEPLOY_UNDEPLOY,ROLE_VAPP_CREATE_STATEFUL,ROLE_VAPP_ASSIGN_VOLUME,ROLE_MANAGE_HARD_DISKS,ROLE_VAPP_CREATE_INSTANCE
Request Headers: Accept: application/vnd.abiquo.virtualmachineswithnodeextended+json; version=2.6; application/vnd.abiquo.virtualmachineswithnodeextended+xml; version=2.6;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

name

ordering the request.

has

false

 

filter the request. With this parameter the response just contains the elements
which name matches the filter value.

limit

false

25

number of elements to return

asc

false

true

order ascendant or descendant. By default the sort mode is ascending.

key

false

 

related with metadata information, allows to filter content in this field

Request Message Body Entity:
Response Message Body Entity: VirtualMachinesWithNodeExtended Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all virtual machines with own node and user extra info example
curl --verbose -X GET http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines -H 'Accept:application/vnd.abiquo.virtualmachineswithnodeextended+xml; version=2.6' -u user:password | xmlindent -nbe -f

> GET /api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines HTTP/1.1
> Authorization: Basic ABCdeF12gHIjkLM3no==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept:application/vnd.abiquo.virtualmachineswithnodeextended+xml; version=2.6
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MjQ1ODAxOTg2MDphYTg1NTMxN2FmN2FkNzhhNDViNjc3YTQ2ZWU3ZDk0NDpBQklRVU8; Expires=Tue, 22-Oct-2013 16:06:59 GMT; Path=/api
< Set-Cookie: JSESSIONID=DC61A85F9A371353F27F181984E6438D; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachineswithnodeextended+xml;version=2.6
< Content-Length: 4958
< Date: Tue, 22 Oct 2013 15:36:59 GMT
< 


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachineswithnodeextended>
    <virtualmachinewithnodeextended>
        <link title="KVM" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/2"/>
        <link title="ABQ_c502eeb3-2b72-49c7-a75c-5363fc2ef7a8" rel="edit" type="application/vnd.abiquo.virtualmachinewithnodeextended+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11"/>
        <link title="send mail" rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/11/action/sendmail"/>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/1"/>
        <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com:80/api/admin/enterprises/1/users/1"/>
        <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2"/>
        <link title="BVAPP_01" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3"/>
        <link title="vlan network configurations" rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/configurations"/>
        <link title="192.168.5.0/24" rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/configurations/4"/>
        <link title="nics" rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/network/nics"/>
        <link title="disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/storage/disks"/>
        <link title="ON" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/state"/>
        <link title="virtual machine undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/undeploy"/>
        <link title="virtual machine deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/deploy"/>
        <link title="virtual machine reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/reset"/>
        <link title="virtual machine reset" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/action/instance"/>
        <link title="remote access" rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/config/rdpaccess"/>
        <link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/tasks"/>
        <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/3/virtualmachines/11/storage/volumes"/>
        <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/disks/1279"/>
        <link title="192.168.5.2" rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/privatenetworks/4/ips/770"/>
        <link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
        <id>11</id>
        <uuid>c502eeb3-2b72-49c7-a75c-5363fc2ef7a8</uuid>
        <name>ABQ_c502eeb3-2b72-49c7-a75c-5363fc2ef7a8</name>
        <description>root : abiquo</description>
        <cpu>1</cpu>
        <ram>64</ram>
        <hdInBytes>104857600</hdInBytes>
        <vdrpEnabled>true</vdrpEnabled>
        <vdrpPort>5901</vdrpPort>
        <vdrpIP>10.60.13.26</vdrpIP>
        <idState>4</idState>
        <state>ON</state>
        <idType>0</idType>
        <type>MANAGED</type>
        <highDisponibility>0</highDisponibility>
        <password>EomOkkVR</password>
        <nodeId>9</nodeId>
        <nodeName>Core</nodeName>
        <x>0</x>
        <y>0</y>
        <userName>Cloud</userName>
        <userSurname>Administrator</userSurname>
        <enterpriseName>Abiquo</enterpriseName>
    </virtualmachinewithnodeextended>
</virtualmachineswithnodeextended>

Create a virtual machine

To create a virtual machine, you will need the link of the virtual appliance where the virtual machine will be created and a virtual machine entity. 

Virtual Machine Entity Example 1

The simplest virtual machine entity is a link to the virtual machine template in the datacenter repository, in the virtual machine format as shown in the following example.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachine> 
      <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4" 
rel="virtualmachinetemplate" title="Core"/>
</virtualMachine>

Virtual Machine Entity Example 2

When creating a virtual machine, you can set more values in the VirtualMachine Media Type. In this example we will give the virtual machine a higher specification than the template (2 CPUs instead of 1, and 128 MB of RAM instead of 64). And we will enable remote access and set a custom password.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachine>
    <link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://10.60.1.31:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
    <cpu>2</cpu>
    <ram>128</ram>
    <vdrpEnabled>true</vdrpEnabled>
    <password>myvmpass</password>
</virtualMachine>

Create the Virtual Machine

With the link of the virtual machine template in the entity, you can instantiate the virtual machine at the virtualmachines link from the virtual appliance.

The name of the virtual machine is not the same as you can see through our GUI. The virtual machine name field holds the identifier of the virtual machine itself in the hypervisor. If you want to change the virtual machine's name to a more friendly name you must change the nodeName. A node is the representation of a member of a virtual appliance with a name. This representation has 'application/vnd.abiquo.virtualmachinewithnode+xml' media type. 

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP
Request Headers: Accept: application/vnd.abiquo.virtualmachine+json; version=3.1; application/vnd.abiquo.virtualmachine+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachine+json; version=3.1; application/vnd.abiquo.virtualmachine+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachine Media Type
Response Message Body Entity: VirtualMachine Media Type
Request Example:

 Click here to show or hide the request example
Create a virtual machine example
curl -X POST http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines\
	 -H 'Accept: application/vnd.abiquo.virtualmachine+xml; version=2.4'	\
	 -H 'Content-Type: application/vnd.abiquo.virtualmachine+xml; version=2.4'	\
	 -d @entity.xml	\
	 -u user:password --verbose


POST http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines HTTP/1.1
Accept: application/vnd.abiquo.virtualmachine+xml;version=2.4
Content-Type: application/vnd.abiquo.virtualmachine+xml;version=2.4
Content-Length: 607


HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:07:20 GMT
Location: http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4
Set-Cookie: JSESSIONID=BF2E17155FCE5BD00284BF2E84D2525D; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzA0MDc5ODplMmIzN2Q3ODFlNmNlNGUyMTNkNjExNTkwY2NjNjA0ZjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:37:20 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachine+xml;version=2.4
Content-Length: 3729

<?xml version="1.0" encoding="UTF-8"?>
<virtualmachine>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4"
    rel="edit" type="application/vnd.abiquo.virtualmachine+xml"/>
  <link href="http://example.com/api/admin/enterprises/1"
    rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/>
  <link href="http://example.com/api/admin/enterprises/1/users/1"
    rel="user" type="application/vnd.abiquo.user+xml"/>
  <link href="http://example.com/api/cloud/virtualdatacenters/1"
    rel="virtualdatacenter" title="VMX_04" type="application/vnd.abiquo.virtualdatacenter+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1"
    rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.4"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/network/configurations"
    rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/network/nics"
    rel="nics" type="application/vnd.abiquo.nics+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/storage/disks"
    rel="harddisks" type="application/vnd.abiquo.harddisks+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/state"
    rel="state" type="application/vnd.abiquo.virtualmachinestate+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/undeploy"
    rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/deploy"
    rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/reset"
    rel="reset" type="application/vnd.abiquo.acceptedrequest+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/instance"
    rel="instance" type="application/vnd.abiquo.acceptedrequest+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/tasks"
    rel="tasks" type="application/vnd.abiquo.tasks+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/storage/volumes"
    rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/layers/layer1"
    rel="layer" type="application/vnd.abiquo.layer+xml"/>
  <link
    href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7"
    rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml"/>
  <link
    href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7/conversions/VMDK_FLAT"
    rel="conversion" type="application/vnd.abiquo.conversion+xml"/>
  <cpu>2</cpu>
  <hdInBytes>27262976</hdInBytes>
  <highDisponibility>0</highDisponibility>
  <id>4</id>
  <idState>1</idState>
  <idType>1</idType>
  <layer>layer1</layer>
  <name>ABQ_6c4c3d19-99b5-4703-90c1-110d972312af</name>
  <ram>128</ram>
  <state>NOT_ALLOCATED</state>
  <uuid>6c4c3d19-99b5-4703-90c1-110d972312af</uuid>
  <vdrpPort>0</vdrpPort>
</virtualmachine>

Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Create a virtual machine and return a virtual machine with a node value

Deprecated Functionality

This functionality was deprecated in version 3.0.

Use this method to create a virtual machine with a node value set and return a virtual machine with a node. All virtual machines are created with a node but you can use this media type to set the GUI display name or retrieve a node value at virtual machine creation, for example.

In the API, the name of the virtual machine is the identifier of the virtual machine in the hypervisor (e.g. ABQ_79b5dfab-c357-437f-9803-e30613934297). The virtual machine name in the GUI is the nodeName, which is stored in the virtual machine node. This is followed by the virtual machine name in the hypervisor. By default the nodeName is the name of the virtual machine template that was used to create the virtual machine. 

To access the nodeName used in the GUI, use the 'application/vnd.abiquo.virtualmachinewithnode+xml' media type. For example, to create a virtual machine from the Core template but to give it the name "Core Server" in the GUI, use the following example entity.

Virtual Machine with Node Entity Example 1

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinewithnode>
        <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4" 
rel="virtualmachinetemplate" title="Core"/> 
        <nodeName>Core Server</nodeName>
</virtualmachinewithnode>

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP
Request Headers: Accept: application/vnd.abiquo.virtualmachine+json; version=3.1; application/vnd.abiquo.virtualmachine+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachinewithnode+json; version=2.6; application/vnd.abiquo.virtualmachinewithnode+xml; version=2.6;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineWithNode Media Type
Response Message Body Entity: VirtualMachine Media Type
Request Example:

 Click here to show or hide the request example
Create a virtual machine and a node example
curl --verbose -X POST http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines \
     -H 'Accept:application/vnd.abiquo.virtualmachinewithnode+xml; version=2.6' \
     -H 'Content-type:application/vnd.abiquo.virtualmachinewithnode+xml' \ 
     -d  '<virtualmachinewithnode> 
              <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4" 
rel="virtualmachinetemplate" title="Core"/> 
              <nodeName>Core Server</nodeName>
          </virtualmachinewithnode>' -u admin:xabiquo | xmlindent -nbe -f 

> POST /api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept:application/vnd.abiquo.virtualmachinewithnode+xml; version=2.6
> Content-type:application/vnd.abiquo.virtualmachinewithnode+xml
> Content-Length: 230
> 

< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MjYyNDEyMjQzOToyMzgxMzRjOGJmZGEzNTViNzg1MjNmMmVmMDRiNjk5MzpBQklRVU8; Expires=Thu, 24-Oct-2013 14:15:22 GMT; Path=/api
< Location: http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14
< Set-Cookie: JSESSIONID=CDCC24C2CF5C64E8B33EF3E552381679; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.6
< Content-Length: 3974
< Date: Thu, 24 Oct 2013 13:45:22 GMT
< 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinewithnode>
    <link title="ABQ_376e806d-d7dc-49a3-a5f0-370271e05023" rel="edit" type="application/vnd.abiquo.virtualmachinewithnode+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14"/>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/1"/>
    <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com:80/api/admin/enterprises/1/users/1"/>
    <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2"/>
    <link title="Isengard" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6"/>
    <link title="vlan network configurations" rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/network/configurations"/>
    <link title="nics" rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/network/nics"/>
    <link title="disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/storage/disks"/>
    <link title="NOT_ALLOCATED" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/state"/>
    <link title="virtual machine undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/action/undeploy"/>
    <link title="virtual machine deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/action/deploy"/>
    <link title="virtual machine reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/action/reset"/>
    <link title="virtual machine reset" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/action/instance"/>
    <link title="remote access" rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/config/rdpaccess"/>
    <link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/tasks"/>
    <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/14/storage/volumes"/>
    <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/disks/1282"/>
    <link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
    <id>14</id>
    <uuid>376e806d-d7dc-49a3-a5f0-370271e05023</uuid>
    <name>ABQ_376e806d-d7dc-49a3-a5f0-370271e05023</name>
    <cpu>1</cpu>
    <ram>64</ram>
    <hdInBytes>104857600</hdInBytes>
    <vdrpEnabled>false</vdrpEnabled>
    <vdrpPort>0</vdrpPort>
    <idState>1</idState>
    <state>NOT_ALLOCATED</state>
    <idType>0</idType>
    <type>MANAGED</type>
    <highDisponibility>0</highDisponibility>
    <password>tp6lPUE4</password>
    <nodeId>12</nodeId>
    <nodeName>Core Server</nodeName>
    <x>0</x>
    <y>0</y>
</virtualmachinewithnode>

Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Create a virtual machine with an extended node

Deprecated Functionality

This functionality was deprecated in version 3.0.

Create a virtual machine with an extended node and return the extended node that includes:

  • userName
  • userSurname
  • enterpriseName

To create a virtual machine with an extended node, you must send the virtualmachinewithextendednode content type. However, you do not need to send any values for the extended node. Any extended node values you send will be ignored because these values are retrieved from the user and enterprise entities.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP
Request Headers: Accept: application/vnd.abiquo.virtualmachinewithnode+json; version=2.6; application/vnd.abiquo.virtualmachinewithnode+xml; version=2.6;  Content-type:  application/vnd.abiquo.virtualmachinewithnode+json; version=2.6; application/vnd.abiquo.virtualmachinewithnode+xml; version=2.6;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineWithNode Media Type
Response Message Body Entity: VirtualMachineWithNode Media Type
Request Example:

 Click here to show or hide the request example
Create a virtual machine and a node example
curl --verbose -X POST http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines \
    -H 'Accept:application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.6' \
    -H 'Content-type:application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.6' \
    -d  '<virtualmachinewithnodeextended> 
             <link href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4" 
rel="virtualmachinetemplate" title="Core"/> 
             <nodeName>Tiny Core Linux Server</nodeName>
        </virtualmachinewithnodeextended>' -u admin:xabiquo | xmlindent -nbe -f 

> POST /api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept:application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.6
> Content-type:application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.6
> Content-Length: 257


< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4MjYzNDczNTk4MTo0ZDE3NzE3OWJiZDBkOGQzZmUyYzdiMTE4NzY2YzcxOTpBQklRVU8; Expires=Thu, 24-Oct-2013 17:12:15 GMT; Path=/api
< Location: http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16
< Set-Cookie: JSESSIONID=69039A411D27821ABE493ED22C7223AA; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.6
< Content-Length: 4114
< Date: Thu, 24 Oct 2013 16:42:16 GMT
< 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinewithnodeextended>
    <link title="ABQ_7492b19f-2732-48f4-91d2-5854ed77d6b5" rel="edit" type="application/vnd.abiquo.virtualmachinewithnodeextended+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16"/>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/1"/>
    <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com:80/api/admin/enterprises/1/users/1"/>
    <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2"/>
    <link title="Isengard" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6"/>
    <link title="vlan network configurations" rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/network/configurations"/>
    <link title="nics" rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/network/nics"/>
    <link title="disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/storage/disks"/>
    <link title="NOT_ALLOCATED" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/state"/>
    <link title="virtual machine undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/action/undeploy"/>
    <link title="virtual machine deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/action/deploy"/>
    <link title="virtual machine reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/action/reset"/>
    <link title="virtual machine reset" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/action/instance"/>
    <link title="remote access" rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/config/rdpaccess"/>
    <link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/tasks"/>
    <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/virtualappliances/6/virtualmachines/16/storage/volumes"/>
    <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/2/disks/1284"/>
    <link title="Core" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4"/>
    <id>16</id>
    <uuid>7492b19f-2732-48f4-91d2-5854ed77d6b5</uuid>
    <name>ABQ_7492b19f-2732-48f4-91d2-5854ed77d6b5</name>
    <cpu>1</cpu>
    <ram>64</ram>
    <hdInBytes>104857600</hdInBytes>
    <vdrpEnabled>false</vdrpEnabled>
    <vdrpPort>0</vdrpPort>
    <idState>1</idState>
    <state>NOT_ALLOCATED</state>
    <idType>0</idType>
    <type>MANAGED</type>
    <highDisponibility>0</highDisponibility>
    <password>5CWPMWv9</password>
    <nodeId>14</nodeId>
    <nodeName>Tiny Core Linux Server</nodeName>
    <x>0</x>
    <y>0</y>
    <userName>Cloud</userName>
    <userSurname>Administrator</userSurname>
    <enterpriseName>Abiquo</enterpriseName>
</virtualmachinewithnodeextended>

Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

 

Create a virtual machine for Amazon

This section will be revised

The way to create a virtualmachine to be deployed in Amazon is a little bit different, as for 2.6 no virtualmachinetemplate is previously saved in Abiquo.

So taking into account that we dont have any link to any virtualmachinetemplate, in this case the template id is always 0. And the name of the virtualmachine should indicate the ami ID.

In the example below it explains how to do a post using a hardwareprofile link and how is format of a virtualmachinetemplate.The fields Name and nodeName are also compulsory. 

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP
Request Headers: Accept: application/vnd.abiquo.virtualmachine+json; version=3.1; application/vnd.abiquo.virtualmachine+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachinewithnode+json; version=3.1; application/vnd.abiquo.virtualmachinewithnode+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineWithNode Media Type
Response Message Body Entity: VirtualMachine Media Type
Request Example:

 Click here to show or hide the request example
Create a virtual machine and a node example
curl -X POST http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines\
	 -H 'Accept: application/vnd.abiquo.virtualmachine+xml; version=2.6'	\
	 -H 'Content-Type: application/vnd.abiquo.virtualmachinewithnode+xml; version=2.6'	\
	 -d '<virtualmachinewithnode>
			<link title="t1.micro" rel="hardwareprofile" type="application/vnd.abiquo.hardwareprofile+xml" href="http://example.com/api/admin/datacenters/1/hardwareprofiles/6"/>
			<link title="ami-031c9e6a" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/0"/>
			<name>ami-031c9e6a</name><nodeName>TheAmazonNode</nodeName>
		</virtualmachinewithnode>'	\
	 -u user:password --verbose


POST http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4
Content-Type: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4
Content-Length: 607


HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:07:20 GMT
Location: http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4
Set-Cookie: JSESSIONID=BF2E17155FCE5BD00284BF2E84D2525D; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzA0MDc5ODplMmIzN2Q3ODFlNmNlNGUyMTNkNjExNTkwY2NjNjA0ZjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:37:20 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4
Content-Length: 3729

<?xml version="1.0" encoding="UTF-8"?>
<virtualMachine>
    <link title="ABQ_6f92c87d-dd87-47ee-af47-60f2bd911d64" rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12"/>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com/api/admin/enterprises/1/users/1"/>
    <link title="AMAZON" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
    <link title="vapp" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/>
    <link title="vlan network configurations" rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/network/configurations"/>
    <link title="192.168.0.0/24" rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/network/configurations/1"/>
    <link title="nics" rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/network/nics"/>
    <link title="disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/storage/disks"/>
    <link title="NOT_ALLOCATED" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/state"/>
    <link title="virtual machine undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/action/undeploy"/>
    <link title="virtual machine deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/action/deploy"/>
    <link title="virtual machine reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/action/reset"/>
    <link title="virtual machine reset" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/action/instance"/>
    <link title="remote access" rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/config/rdpaccess"/>
    <link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/tasks"/>
    <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/storage/volumes"/>
    <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com/api/cloud/virtualdatacenters/1/disks/266"/>
    <link title="192.168.0.7" rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips/7"/>
    <link title="ami-031c9e6a" rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/12"/>
    <link title="t1.micro" rel="hardwareprofile" type="application/vnd.abiquo.hardwareprofile+xml" href="http://example.com/api/admin/datacenters/1/hardwareprofiles/6"/>
    <id>12</id>
    <uuid>6f92c87d-dd87-47ee-af47-60f2bd911d64</uuid>
    <name>ABQ_6f92c87d-dd87-47ee-af47-60f2bd911d64</name>
    <cpu>1</cpu>
    <ram>630</ram>
    <hdInBytes>10737418240</hdInBytes>
    <vdrpEnabled>false</vdrpEnabled>
    <vdrpPort>0</vdrpPort>
    <idState>1</idState>
    <state>NOT_ALLOCATED</state>
    <idType>0</idType>
    <type>MANAGED</type>
    <highDisponibility>0</highDisponibility>
</virtualMachine>


Create a virtual machine and a node and returns the same representation

Deprecated Functionality

This functionality was deprecated in version 3.0.

Create a virtual machine and return the node extended.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP
Request Headers: Accept: application/vnd.abiquo.virtualmachinewithnodeextended+json; version=2.6; application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.6;  Content-type:  application/vnd.abiquo.virtualmachinewithnodeextended+json; version=2.6; application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.6;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineWithNodeExtended Media Type
Response Message Body Entity: VirtualMachineWithNode Media Type
Request Example:

 Click here to show or hide the request example
Create a virtual machine and a node and returns the same representation example
$ curl -X POST http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines\
	 -H 'Accept: application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.4'	\
	 -H 'Content-Type: application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.4'	\
	 -d @entity.xml	\
	 -u user:password --verbose


POST http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.4
Content-Type: application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.4
Content-Length: 607


HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:07:20 GMT
Location: http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4
Set-Cookie: JSESSIONID=BF2E17155FCE5BD00284BF2E84D2525D; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzA0MDc5ODplMmIzN2Q3ODFlNmNlNGUyMTNkNjExNTkwY2NjNjA0ZjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:37:20 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.4
Content-Length: 3729

<?xml version="1.0" encoding="UTF-8"?>
<virtualmachinewithnodeextended>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4"
    rel="edit" type="application/vnd.abiquo.virtualmachinewithnodeextended+xml"/>
  <link href="http://example.com/api/admin/enterprises/1"
    rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/>
  <link href="http://example.com/api/admin/enterprises/1/users/1"
    rel="user" type="application/vnd.abiquo.user+xml"/>
  <link href="http://example.com/api/cloud/virtualdatacenters/1"
    rel="virtualdatacenter" title="VMX_04" type="application/vnd.abiquo.virtualdatacenter+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1"
    rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.4"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/network/configurations"
    rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/network/nics"
    rel="nics" type="application/vnd.abiquo.nics+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/storage/disks"
    rel="harddisks" type="application/vnd.abiquo.harddisks+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/state"
    rel="state" type="application/vnd.abiquo.virtualmachinestate+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/undeploy"
    rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/deploy"
    rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/reset"
    rel="reset" type="application/vnd.abiquo.acceptedrequest+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/action/instance"
    rel="instance" type="application/vnd.abiquo.acceptedrequest+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/tasks"
    rel="tasks" type="application/vnd.abiquo.tasks+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/4/storage/volumes"
    rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml"/>
  <link
    href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/layers/layer1"
    rel="layer" type="application/vnd.abiquo.layer+xml"/>
  <link
    href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7"
    rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml"/>
  <link
    href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7/conversions/VMDK_FLAT"
    rel="conversion" type="application/vnd.abiquo.conversion+xml"/>
  <cpu>2</cpu>
  <hdInBytes>27262976</hdInBytes>
  <highDisponibility>0</highDisponibility>
  <id>4</id>
  <idState>1</idState>
  <idType>1</idType>
  <layer>layer1</layer>
  <name>ABQ_6c4c3d19-99b5-4703-90c1-110d972312af</name>
  <ram>128</ram>
  <state>NOT_ALLOCATED</state>
  <uuid>6c4c3d19-99b5-4703-90c1-110d972312af</uuid>
  <vdrpPort>0</vdrpPort>
  <nodeId>4</nodeId>
  <nodeName>JC-VM Aloha</nodeName>
  <x>0</x>
  <y>0</y>
  <enterpriseName>Abiquo</enterpriseName>
  <userName>Cloud</userName>
  <userSurname>Administrator</userSurname>
</virtualmachinewithnodeextended>



Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Capture an imported virtual machine

Captures an already imported virtual machine into a virtual appliance in orde to be managed by abiquo.

That requires a link pointing to the imported virtual machine, it means the link from infrastructure (host/api/datacenters/*/rask/*/machines/*/virtualmachines/*).

The resources:

  • The volumes are not supported to be captured
  • The disks need the correct size in the correct sequence
  • The nics need a link of a vlan (any type of vlan) and a ip value of this vlan. The vlan tags must be respected.

Note: Might be useful to use this call to retrieve all the information of the remote machine, then complete the result dto in order to use it as content type of that call.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines
Roles Required: ROLE_VDC_MANAGE_VAPP, ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.virtualmachineflat+json; version=3.1; application/vnd.abiquo.virtualmachineflat+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachineflat+json; version=3.1; application/vnd.abiquo.virtualmachineflat+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineFlat Media Type
Response Message Body Entity: VirtualMachineFlat Media Type
Request Example:

 Click here to show or hide the request example
Capture an imported virtual machine example
curl --verbose -u user:password example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines -X POST -H "content-type:application/vnd.abiquo.virtualmachineflat+xml;version=2.6" -H "accept:application/vnd.abiquo.virtualmachineflat+xml;version=2.6" -d @vmflat.xml

> POST /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> content-type:application/vnd.abiquo.virtualmachineflat+xml;version=2.6
> accept:application/vnd.abiquo.virtualmachineflat+xml;version=2.6
> Content-Length: 1321

< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM3NTg5MjAxMjgyMzozZmYyNjAwMGUwM2E0NTA3ZDRjODY1ODg4MTg1MWE1NDpBQklRVU8; Expires=Wed, 07-Aug-2013 16:13:32 GMT; Path=/api
< Location: http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3
< Set-Cookie: JSESSIONID=F0F1FDD5D3855741A6E7547A64F76A65; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachineflat+xml;version=2.6
< Content-Length: 5390
< Date: Wed, 07 Aug 2013 15:43:35 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachineFlat>
    <link title="VMX_04" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/2/racks/2/machines/2"/>
    <link rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/2/racks/2/machines/2/virtualmachines/3/action/sendmail"/>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com/api/admin/enterprises/1/users/1"/>
    <link title="VMX_04" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
    <link title="vapp" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.6" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/>
    <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/network/configurations"/>
    <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/network/nics"/>
    <link rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/storage/disks"/>
    <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/state"/>
    <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/action/undeploy"/>
    <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/action/deploy"/>
    <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/action/reset"/>
    <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/action/instance"/>
    <link rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/config/rdpaccess"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/tasks"/>
    <link rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/storage/volumes"/>
    <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/2/virtualmachinetemplates/8"/>
    <id>3</id>
    <uuid>f7426862-ea90-41ac-8d06-7b6f1a59244d</uuid>
    <name>vm to be captured</name>
    <description></description>
    <cpu>1</cpu>
    <ram>128</ram>
    <hdInBytes>27262976</hdInBytes>
    <vdrpEnabled>true</vdrpEnabled>
    <vdrpPort>5901</vdrpPort>
    <vdrpIP>192.168.2.57</vdrpIP>
    <idState>4</idState>
    <state>ON</state>
    <idType>0</idType>
    <type>CAPTURED</type>
    <highDisponibility>0</highDisponibility>
    <password>qMiCjSPZ</password>
    <keymap></keymap>
    <volumes/>
    <disks>
        <disk>
            <link rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
            <link rel="edit" type="application/vnd.abiquo.harddisk+xml" href="http://example.com/api/cloud/virtualdatacenters/1/disks/261"/>
            <sequence>1</sequence>
            <sizeInMb>200</sizeInMb>
        </disk>
        <disk>
            <link rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
            <link rel="edit" type="application/vnd.abiquo.harddisk+xml" href="http://example.com/api/cloud/virtualdatacenters/1/disks/262"/>
            <sequence>2</sequence>
            <sizeInMb>300</sizeInMb>
        </disk>
        <disk>
            <link rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://localhost:80/api/cloud/virtualdatacenters/1"/>
            <link rel="edit" type="application/vnd.abiquo.harddisk+xml" href="http://example.com/api/cloud/virtualdatacenters/1/disks/263"/>
            <sequence>0</sequence>
            <sizeInMb>26</sizeInMb>
        </disk>
    </disks>
    <nics>
        <nic>
            <link rel="self" type="application/vnd.abiquo.nic+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/network/nics/10"/>
            <link rel="edit" type="application/vnd.abiquo.privateip+xml" href="http://example.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips/10"/>
            <link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="http://example.com/api/cloud/virtualdatacenters/1/privatenetworks/1"/>
            <id>10</id>
            <ip>192.168.0.10</ip>
            <mac>00:50:56:36:1C:81</mac>
            <sequence>0</sequence>
            <tag>2</tag>
        </nic>
    </nics>
</virtualMachineFlat>

Download a template

You can download the template of the entity to post here (click right mouse button and 'Save Link As..')

Retrieve a Task

Displays a specific Task on the Virtual Machine. Tasks are a set of jobs (operations on hypervisors). Any of these Tasks may still be in progress. Every Task has a UUID.

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}//tasks/{id}
Roles Required:
Request Headers: Accept: application/vnd.abiquo.task+json; version=3.1; application/vnd.abiquo.task+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Task Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a Task example
curl --verbose -X GET -u user:password 'http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/'
* About to connect() to example.com port 80 (#0)
* Trying example.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to example.com (example.com) port 80 (#0)
* Server auth using Basic with user 'user'
> GET /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks HTTP/1.1
> Authorization: Basic YWRtaaLLSDFKLSADFeGFiaXF1bw==
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: example.com

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tasks>
    <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="self"/>
    <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21" rel="parent"/>
    <task>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/4887f058-7ecf-4765-b090-f6b3ee0f8d8a" rel="self"/>
        <jobs>
            <job>
                <description></description>
                <id>4887f058-7ecf-4765-b090-f6b3ee0f8d8a.b8ece5a2-6382-42e3-809d-b9ecbb5d3c42</id>
                <parentTaskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1325692664</timestamp>
                <type>CONFIGURE</type>
            </job>
            <job>
                <description></description>
                <id>4887f058-7ecf-4765-b090-f6b3ee0f8d8a.78c5c510-35a7-4938-abe4-092c4227c756</id>
                <parentTaskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1325692664</timestamp>
                <type>POWER_ON</type>
            </job>
        </jobs>
        <ownerId>21</ownerId>
        <state>FINISHED_SUCCESSFULLY</state>
        <taskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</taskId>
        <timestamp>1325692664</timestamp>
        <type>DEPLOY</type>
        <userId>admin</userId>
    </task>
    <task>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/2efd9192-84ab-4b3f-b58f-4665dc42d21b" rel="self"/>
        <jobs>
            <job>
                <description></description>
                <id>2efd9192-84ab-4b3f-b58f-4665dc42d21b.1a09eb1e-cc6b-4009-af48-02633ec920a1</id>
                <parentTaskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1325605822</timestamp>
                <type>CONFIGURE</type>
            </job>
            <job>
                <description></description>
                <id>2efd9192-84ab-4b3f-b58f-4665dc42d21b.40461ea7-b25e-4f13-9095-998b111f920c</id>
                <parentTaskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1325605822</timestamp>
                <type>POWER_ON</type>
            </job>
        </jobs>
        <ownerId>21</ownerId>
        <state>FINISHED_SUCCESSFULLY</state>
        <taskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</taskId>
        <timestamp>1325605822</timestamp>
        <type>DEPLOY</type>
        <userId>admin</userId>
    </task>
    <task>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/2610719a-1601-482e-aebb-6bdcad9b038d" rel="self"/>
        <jobs>
            <job>
                <description></description>
                <id>2610719a-1601-482e-aebb-6bdcad9b038d.27010ecf-dbf7-4535-b229-75cec9df5c2d</id>
                <parentTaskId>2610719a-1601-482e-aebb-6bdcad9b038d</parentTaskId>
                <rollbackState>ROLLBACK_DONE</rollbackState>
                <state>ROLLBACK_DONE</state>
                <timestamp>1324310064</timestamp>
                <type>CONFIGURE</type>
            </job>
            <job>
                <description></description>
                <id>2610719a-1601-482e-aebb-6bdcad9b038d.2cc82257-09c7-4fc8-802c-295b0693ffd7</id>
                <parentTaskId>2610719a-1601-482e-aebb-6bdcad9b038d</parentTaskId>
                <rollbackState>ROLLBACK_DONE</rollbackState>
                <state>FAILED</state>
                <timestamp>1324310064</timestamp>
                <type>POWER_ON</type>
            </job>
        </jobs>
        <ownerId>21</ownerId>
        <state>FINISHED_UNSUCCESSFULLY</state>
        <taskId>2610719a-1601-482e-aebb-6bdcad9b038d</taskId>
        <timestamp>1324310064</timestamp>
        <type>DEPLOY</type>
        <userId>admin</userId>
    </task>
</tasks>


Retrieve a Virtual Machine

Retrieve the Virtual Machine

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Roles Required: ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_ASSIGN_NETWORK,ROLE_VAPP_PERFORM_ACTIONS,ROLE_VAPP_DEPLOY_UNDEPLOY,ROLE_VAPP_CREATE_STATEFUL,ROLE_VAPP_ASSIGN_VOLUME,ROLE_MANAGE_HARD_DISKS,ROLE_VAPP_CREATE_INSTANCE
Request Headers: Accept: application/vnd.abiquo.virtualmachine+json; version=3.1; application/vnd.abiquo.virtualmachine+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VirtualMachine Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a Virtual Machine example
curl -X GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36\
        -u user:password \
        -H 'Accept: application/vnd.abiquo.virtualmachine+xml;version=2.4'\
        --verbose

GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36 HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.virtualmachine+xml;version=2.4

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:08:41 GMT
Set-Cookie: JSESSIONID=345EEEEB15CD6FF5933058A46DC55649; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzEyMTk0MjoxZmYyZmM4ODZhMzI3YzA3NGIxNjE1NTQ1Y2I5NjU3MDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:41 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachine+xml;version=2.4
Content-Length: 3484
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachine>
    <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/network/configurations"/>
    <link rel="conversion" type="application/vnd.abiquo.conversion+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7/conversions/VMDK_FLAT"/>
    <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/deploy"/>
    <link rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36"/>
    <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/storage/disks"/>
    <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/instance"/>
    <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/network/nics"/>
    <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/reset"/>
    <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/state"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/tasks"/>
    <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/undeploy"/>
    <link rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com/api/admin/enterprises/1/users/1"/>
    <link rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.4" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/>
    <link title="VMX_04" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
    <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7"/>
    <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/storage/volumes"/>
    <cpu>2</cpu>
    <dvd/>
    <hdInBytes>27262976</hdInBytes>
    <highDisponibility>0</highDisponibility>
    <id>36</id>
    <idState>1</idState>
    <idType>1</idType>
    <name>ABQ_2eff8933-697e-4dcf-aa3b-73ed783aa110</name>
    <ram>128</ram>
    <state>NOT_ALLOCATED</state>
    <uuid>2eff8933-697e-4dcf-aa3b-73ed783aa110</uuid>
    <vdrpPort>0</vdrpPort>
</virtualmachine>


Delete a Virtual Machine

If the Virtual Machine exists in the hypervisor, it will be removed from the hypervisor as well. A virtual machine can be deleted if its state is DEPLOYED, NOT_ALLOCATED or UNKNOWN.

Synopsis: DELETE http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Roles Required: ROLE_VDC_MANAGE_VAPP
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example
Delete a Virtual Machine example
curl -X DELETE http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/15\
	 -u user:password --verbose


DELETE http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/15 HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==


HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:08:38 GMT
Set-Cookie: JSESSIONID=28222FCF3CF9E2F47A8B07DE884155E0; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzExOTY3Njo3ZGZmODJjY2JlMDM0ZDdjODM0YjM4ODYxYmM2Zjk2NjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:39 GMT; Path=/api
Server: Apache-Coyote/1.1



Release a Captured Virtual Machine

Returns a captured virtual machine into the imported state, it means that the virtual machine won't be managed by abiquo and it is ready to be captured again.

Note: Useful as "undo capture" if the virtual machine was been captured into a incorrect virtual appliance or with incorrect networks.

Note 2: This request only differs with the delete action in the release query parameter, so if you forget it or give it the value false the virtual machine will be deleted instead of released.

Synopsis: DELETE http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Roles Required: ROLE_VDC_MANAGE_VAPP, PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

release

true 

false

Convertes the delete action into a release action 

Request Message Body Entity: 
Response Message Body Entity: 
Request Example:

 Click here to show or hide the request example
Delete a Virtual Machine example
curl --verbose -u user:password example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3?release=true -X DELETE

> DELETE /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3?release=true HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept: */*
 
< HTTP/1.1 204 Sin Contenido
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM3NTg5NTYxNDM3OTpjZDc1YWU2MjYxNzJlMDU4MTA4MWIwZmUyYTdjMjVmMjpBQklRVU8; Expires=Wed, 07-Aug-2013 17:13:34 GMT; Path=/api
< Set-Cookie: JSESSIONID=7E87E3C988B2B9DBEB703B92E6220865; Path=/api
< Date: Wed, 07 Aug 2013 16:43:34 GMT

Deploy a Virtual Machine

Deploys the Virtual Machine. This call returns a 202 HTTP code(accepted) and a URI where you can keep track of the deploy.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/deploy
Roles Required: ROLE_VAPP_DEPLOY_UNDEPLOY
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

force

NO

false

Possible values are "true" or "false". If "true", soft limits of virtual datacenters could be surpassed.

Request Message Body Entity:
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Deploy a Virtual Machine example
curl --verbose -X POST -u user:password 'http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/deploy?force=true'
* About to connect() to example.com port 80 (#0)
* Trying example.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to example.com (example.com) port 80 (#0)
* Server auth using Basic with user 'user'
> POST /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/deploy HTTP/1.1
> Authorization: Basic YWRtaaLLSDFKLSADFeGFiaXF1bw==
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: example.com

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
  <link href="http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c54" rel=”task"/>
</acceptedrequest>


Deploy a Virtual Machine

Deploys the Virtual Machine with the given options. There is also possible to do not specify any options and assume the defaults. This call returns a 202 HTTP code(accepted) and a URI where you can keep track of the deploy.

The options are not mandatory.

The options are : ** -forceVdcLimits This flag forces a check on the enterprise soft limits when calculating the available resources. If this check fails the deploy won't be performed.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/deploy
Roles Required: ROLE_VAPP_DEPLOY_UNDEPLOY
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachinetask+json; version=3.1; application/vnd.abiquo.virtualmachinetask+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineTask Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Deploy a Virtual Machine example
curl --verbose -X POST -u user:password 'http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/deploy'
* About to connect() to example.com port 80 (#0)
* Trying example.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to example.com (example.com) port 80 (#0)
* Server auth using Basic with user 'user'
> POST /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/deploy HTTP/1.1
> Authorization: Basic YWRtaaLLSDFKLSADFeGFiaXF1bw==
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: example.com

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
  <link href="http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c54" rel=”task"/>
</acceptedrequest>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Retrieve bootstrap configuration for Virtual Machine

Retrieve bootstrap configuration for Virtual Machine.

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/config/bootstrap
Roles Required: ROLE_ONE_TIME
Request Headers: Accept: application/vnd.abiquo.extended-bootstrap+json; version=3.1; application/vnd.abiquo.extended-bootstrap+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Bootstrap Media Type
Request Example:

 Click here to show or hide the request example
Retrieve bootstrap configuration for Virtual Machine example
curl --verbose 'http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/config/runlist' -X GET -u "user:password"
> GET /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/config/runlist HTTP/1.1
> Authorization: Basic YWRtaaLLSDFKLSADFeGFiaXF1bw== > User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: */*

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=ADE28672605A34711A2E4F8B5A0618A3; Path=/api; HttpOnly
< Content-Type: application/atom+xml < Content-Length: 432 < Date: Wed, 01 Dec 2010 13:55:57 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<runlist>
    <element>
        <name>recipe[openssh]</name>
        <description>Installs openssh</description>
        <priority>0</priority>
        <selected>true</selected>
    </element>
</runlist>


Retrieve all Tasks for this Virtual Machine

Displays the Tasks on the Virtual Machine. Tasks are a set of jobs (operations on hypervisors). Any of these Tasks may still be in progress.

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}//tasks
Roles Required:
Request Headers: Accept: application/vnd.abiquo.tasks+json; version=3.1; application/vnd.abiquo.tasks+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Tasks Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all Tasks for this Virtual Machine example
curl --verbose -X GET -u user:password 'http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks'
* About to connect() to example.com port 80 (#0)
* Trying example.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to example.com (example.com) port 80 (#0)
* Server auth using Basic with user 'user'
> GET /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks HTTP/1.1
> Authorization: Basic YWRtaaLLSDFKLSADFeGFiaXF1bw==
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: example.com

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tasks>
    <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="self"/>
    <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21" rel="parent"/>
    <task>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/4887f058-7ecf-4765-b090-f6b3ee0f8d8a" rel="self"/>
        <jobs>
            <job>
                <description></description>
                <id>4887f058-7ecf-4765-b090-f6b3ee0f8d8a.b8ece5a2-6382-42e3-809d-b9ecbb5d3c42</id>
                <parentTaskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1325692664</timestamp>
                <type>CONFIGURE</type>
            </job>
            <job>
                <description></description>
                <id>4887f058-7ecf-4765-b090-f6b3ee0f8d8a.78c5c510-35a7-4938-abe4-092c4227c756</id>
                <parentTaskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1325692664</timestamp>
                <type>POWER_ON</type>
            </job>
        </jobs>
        <ownerId>21</ownerId>
        <state>FINISHED_SUCCESSFULLY</state>
        <taskId>4887f058-7ecf-4765-b090-f6b3ee0f8d8a</taskId>
        <timestamp>1325692664</timestamp>
        <type>DEPLOY</type>
        <userId>admin</userId>
    </task>
    <task>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/2efd9192-84ab-4b3f-b58f-4665dc42d21b" rel="self"/>
        <jobs>
            <job>
                <description></description>
                <id>2efd9192-84ab-4b3f-b58f-4665dc42d21b.1a09eb1e-cc6b-4009-af48-02633ec920a1</id>
                <parentTaskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1325605822</timestamp>
                <type>CONFIGURE</type>
            </job>
            <job>
                <description></description>
                <id>2efd9192-84ab-4b3f-b58f-4665dc42d21b.40461ea7-b25e-4f13-9095-998b111f920c</id>
                <parentTaskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1325605822</timestamp>
                <type>POWER_ON</type>
            </job>
        </jobs>
        <ownerId>21</ownerId>
        <state>FINISHED_SUCCESSFULLY</state>
        <taskId>2efd9192-84ab-4b3f-b58f-4665dc42d21b</taskId>
        <timestamp>1325605822</timestamp>
        <type>DEPLOY</type>
        <userId>admin</userId>
    </task>
    <task>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks" rel="parent"/>
        <link href="http://example.com/api/cloud/virtualdatacenters/13/virtualappliances/15/virtualmachines/21/tasks/2610719a-1601-482e-aebb-6bdcad9b038d" rel="self"/>
        <jobs>
            <job>
                <description></description>
                <id>2610719a-1601-482e-aebb-6bdcad9b038d.27010ecf-dbf7-4535-b229-75cec9df5c2d</id>
                <parentTaskId>2610719a-1601-482e-aebb-6bdcad9b038d</parentTaskId>
                <rollbackState>ROLLBACK_DONE</rollbackState>
                <state>ROLLBACK_DONE</state>
                <timestamp>1324310064</timestamp>
                <type>CONFIGURE</type>
            </job>
            <job>
                <description></description>
                <id>2610719a-1601-482e-aebb-6bdcad9b038d.2cc82257-09c7-4fc8-802c-295b0693ffd7</id>
                <parentTaskId>2610719a-1601-482e-aebb-6bdcad9b038d</parentTaskId>
                <rollbackState>ROLLBACK_DONE</rollbackState>
                <state>FAILED</state>
                <timestamp>1324310064</timestamp>
                <type>POWER_ON</type>
            </job>
        </jobs>
        <ownerId>21</ownerId>
        <state>FINISHED_UNSUCCESSFULLY</state>
        <taskId>2610719a-1601-482e-aebb-6bdcad9b038d</taskId>
        <timestamp>1324310064</timestamp>
        <type>DEPLOY</type>
        <userId>admin</userId>
    </task>
</tasks>


Retrieve a Virtual Machine with node info

Deprecated Functionality

This functionality was deprecated in version 3.0.

Retrieve a Virtual Machine with node information (label, Y and X).

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Roles Required: ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_ASSIGN_NETWORK,ROLE_VAPP_PERFORM_ACTIONS,ROLE_VAPP_DEPLOY_UNDEPLOY,ROLE_VAPP_CREATE_STATEFUL,ROLE_VAPP_ASSIGN_VOLUME,ROLE_MANAGE_HARD_DISKS,ROLE_VAPP_CREATE_INSTANCE
Request Headers: Accept: application/vnd.abiquo.virtualmachinewithnode+json; version=2.6; application/vnd.abiquo.virtualmachinewithnode+xml; version=2.6;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VirtualMachineWithNode Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a Virtual Machine with node info example
curl -X GET 'http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36 \
        -u user:password \
        -H 'Accept: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4' \
        --verbose \

GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36 HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4
HTTP/1.1 200 OK

Date: Wed, 16 Jan 2013 14:08:41 GMT
Set-Cookie: JSESSIONID=345EEEEB15CD6FF5933058A46DC55649; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzEyMTk0MjoxZmYyZmM4ODZhMzI3YzA3NGIxNjE1NTQ1Y2I5NjU3MDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:41 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4
Content-Length: 3474
<virtualmachinewithnode>
    <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/network/configurations"/>
    <link rel="conversion" type="application/vnd.abiquo.conversion+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7/conversions/VMDK_FLAT"/>
    <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/deploy"/>
    <link rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36"/>
    <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/storage/disks"/>
    <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/instance"/>
    <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/network/nics"/>
    <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/reset"/>
    <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/state"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/tasks"/>
    <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/undeploy"/>
    <link rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com/api/admin/enterprises/1/users/1"/>
    <link rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.4" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/>
    <link title="VMX_04" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
    <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7"/>
    <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/storage/volumes"/>
    <cpu>2</cpu>
    <dvd/>
    <hdInBytes>27262976</hdInBytes>
    <highDisponibility>0</highDisponibility>
    <id>36</id>
    <idState>1</idState>
    <idType>1</idType>
    <name>ABQ_2eff8933-697e-4dcf-aa3b-73ed783aa110</name>
    <ram>128</ram>
    <state>NOT_ALLOCATED</state>
    <uuid>2eff8933-697e-4dcf-aa3b-73ed783aa110</uuid>
    <vdrpPort>0</vdrpPort>
    <nodeId>36</nodeId>
    <nodeName>JC-VM Aloha</nodeName>
    <x>0</x>
    <y>0</y>
</virtualmachinewithnode>


Retrieve a Virtual Machine with node extended info

Deprecated Functionality

This functionality was deprecated in version 3.0.

Retrieve a Virtual Machine with node information extended (label, Y, X, user name, user surname and enterprise name)

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Roles Required: ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_ASSIGN_NETWORK,ROLE_VAPP_PERFORM_ACTIONS,ROLE_VAPP_DEPLOY_UNDEPLOY,ROLE_VAPP_CREATE_STATEFUL,ROLE_VAPP_ASSIGN_VOLUME,ROLE_MANAGE_HARD_DISKS,ROLE_VAPP_CREATE_INSTANCE
Request Headers: Accept: application/vnd.abiquo.virtualmachinewithnodeextended+json; version=2.6; application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.6;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VirtualMachineWithNodeExtended Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a Virtual Machine with node extended info example
curl -X GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36\
        -u user:password \
        -H 'Accept: application/vnd.abiquo.virtualmachinewithnodeextended;version=2.4' \
        --verbose

GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36 HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.4

HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:08:41 GMT
Set-Cookie: JSESSIONID=345EEEEB15CD6FF5933058A46DC55649; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzEyMTk0MjoxZmYyZmM4ODZhMzI3YzA3NGIxNjE1NTQ1Y2I5NjU3MDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:41 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.4
Content-Length: 3574
<virtualmachinewithnodeextended>
    <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/network/configurations"/>
    <link rel="conversion" type="application/vnd.abiquo.conversion+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7/conversions/VMDK_FLAT"/>
    <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/deploy"/>
    <link rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36"/>
    <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/storage/disks"/>
    <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/instance"/>
    <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/network/nics"/>
    <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/reset"/>
    <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/state"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/tasks"/>
    <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/action/undeploy"/>
    <link rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com/api/admin/enterprises/1/users/1"/>
    <link rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.4" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/>
    <link title="VMX_04" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
    <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/7"/>
    <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/36/storage/volumes"/>
    <cpu>2</cpu>
    <dvd/>
    <hdInBytes>27262976</hdInBytes>
    <highDisponibility>0</highDisponibility>
    <id>36</id>
    <idState>1</idState>
    <idType>1</idType>
    <name>ABQ_2eff8933-697e-4dcf-aa3b-73ed783aa110</name>
    <ram>128</ram>
    <state>NOT_ALLOCATED</state>
    <uuid>2eff8933-697e-4dcf-aa3b-73ed783aa110</uuid>
    <vdrpPort>0</vdrpPort>
    <nodeId>36</nodeId>
    <nodeName>JC-VM Aloha</nodeName>
    <x>0</x>
    <y>0</y>
    <enterpriseName>Abiquo</enterpriseName>
    <userName>Cloud</userName>
    <userSurname>Administrator</userSurname>
</virtualmachinewithnodeextended>


Change the state of a Virtual Machine

The allowed states are: OFF, PAUSED, ON.

Synopsis: PUT http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/state
Roles Required: ROLE_VAPP_PERFORM_ACTIONS
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachinestate+json; version=3.1; application/vnd.abiquo.virtualmachinestate+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineState Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Change the state of a Virtual Machine example
curl --verbose -X PUT -u user:password -H ‘Content-type: application/xml’ -d ‘<virtualmachinestate><state>ON</state></virtualmachinestate>’ 'http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/state'
* About to connect() to example.com port 80 (#0)
* Trying example.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to example.com (example.com) port 80 (#0)
* Server auth using Basic with user 'user' > PUT /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/state HTTP/1.1 > Authorization: Basic YWRtaaLLSDFKLSADFeGFiaXF1bw==
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22 > Host: example.com
<virtualmachinestate>
  <state>ON</state>
</virtualmachinestate>

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
  <link href="http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c43" rel=”task"/>
</acceptedrequest>
You can track the state task at this URL.


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Reset a Virtual Machine

Power cycles a Virtual Machine

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/reset
Roles Required: ROLE_VAPP_PERFORM_ACTIONS
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Reset a Virtual Machine example
curl --verbose -X PUT -u user:password -H ‘Content-type: application/xml’ -d ‘<virtualmachinestate><state>ON</state></virtualmachinestate>’ 'http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/state'
* About to connect() to example.com port 80 (#0)
* Trying example.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to example.com (example.com) port 80 (#0)
* Server auth using Basic with user 'user' 
> PUT /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/state HTTP/1.1 > Authorization: Basic YWRtaaLLSDFKLSADFeGFiaXF1bw==
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22 > Host: example.com
<virtualmachinestate>
  <state>ON</state>
</virtualmachinestate>

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
  <link href="http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c43" rel=”task"/>
</acceptedrequest>
You can track the state task at this URL.


Instance a Virtual Machine

Instance the Virtual Machine with the given name. This call returns a 202 HTTP code(accepted) and a URI where you can keep track of the instance task.

You must send the final name for the instance in a virtual machine instance DTO as shown in the example below.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/instance
Roles Required: ROLE_VAPP_CREATE_INSTANCE
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachineinstance+json; version=3.1; application/vnd.abiquo.virtualmachineinstance+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineInstance Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Instance a Virtual Machine example
curl --verbose -X POST 'http://example.com/api/cloud/virtualdatacenters/16/virtualappliances/15/virtualmachines/22/action/instance' \
      -H "Accept: application/vnd.abiquo.acceptedrequest+xml; version=2.4;" \
      -H "Content-Type: application/vnd.abiquo.virtualmachineinstance+xml; version=2.4;" \
      -u user:password \
      -d '<virtualmachineinstance>
  <instanceName>monowall_instance</instanceName>
</virtualmachineinstance>'


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Retrieve the state of the Virtual Machine

Retrieve the current state

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/state
Roles Required: ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_ASSIGN_NETWORK,ROLE_VAPP_PERFORM_ACTIONS,ROLE_VAPP_DEPLOY_UNDEPLOY,ROLE_VAPP_CREATE_STATEFUL,ROLE_VAPP_ASSIGN_VOLUME,ROLE_MANAGE_HARD_DISKS,ROLE_VAPP_CREATE_INSTANCE
Request Headers: Accept: application/vnd.abiquo.virtualmachinestate+json; version=3.1; application/vnd.abiquo.virtualmachinestate+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VirtualMachineState Media Type
Request Example:

 Click here to show or hide the request example
Retrieve the state of the Virtual Machine example
$ curl -X GET http://10.60.20.60:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state\
	 -H 'Accept: application/vnd.abiquo.virtualmachinestate+xml; version=2.4'	\
	 -u user:password --verbose


GET http://10.60.20.60:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.virtualmachinestate+xml;version=2.4


HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:08:41 GMT
Set-Cookie: JSESSIONID=6012FCE46F84B3482E838F2D212DDDC3; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzEyMjAwOTpjNjEyOTIyYTI4MmM0ZDNiYmIxMjc2MzZlN2E2Mjg4MDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:38:42 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.virtualmachinestate+xml;version=2.4
Content-Length: 469

<?xml version="1.0" encoding="UTF-8"?>
<virtualmachinestate>
  <link
    href="http://10.60.20.60:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state"
    rel="edit" type="application/vnd.abiquo.virtualmachinestate+xml"/>
  <link
    href="http://10.60.20.60:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
    rel="parent" type="application/vnd.abiquo.virtualmachine+xml"/>
  <state>NOT_ALLOCATED</state>
</virtualmachinestate>


Undeploy the Virtual Machine

Perform an undeploy. This means that after the call, the Virtual Machine in Abiquo will be in the NOT__ALLOCATED state. If the undeploy is successful, the Virtual Machine will be deleted from the hypervisor. If the Virtual Machine is in the ON state, Abiquo will perform a power off before the deconfigure. You can also set the force undeploy parameter in the Virtual Machine Task entity. If this is set to true, the imported Virtual Machines are also deleted.

This call returns a 202 HTTP code (accepted) and a URI where you can keep track of the undeploy.

The possible option for an undeploy is -forceUndeploy. If this flag is set to false we do not undeploy imported Virtual Machines.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/action/undeploy
Roles Required: ROLE_VAPP_DEPLOY_UNDEPLOY
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachinetask+json; version=3.1; application/vnd.abiquo.virtualmachinetask+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineTask Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Undeploy the Virtual Machine example
curl --verbose -X POST -u user:password -H 'Content-type: application/vnd.abiquo.virtualmachinetask+xml' -d '<virtualmachinetask><forceUndeploy>false</forceUndeploy></virtualmachinetask>' 'http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/undeploy'
* About to connect() to example.com port 80 (#0)
* Trying example.com... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to example.com (example.com) port 80 (#0)
* Server auth using Basic with user 'user' > POST /api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/action/undeploy HTTP/1.1
> Authorization: Basic YWRtaaLLSDFKLSADFeGFiaXF1bw==
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.22
> Host: example.com
<virtualmachinetask>
  <forceUndeploy>false</forceUndeploy>
</virtualmachinetask>

< HTTP/1.1 202 Accepted
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaaLLSDFKLSADFMTMwMjc3MjE5MzQ5NDozYzMwZmFlNGIwMDJkYWZjMjA2ZTQyNDAwOTFkYTkwNw; Expires=Thu, 14-Nov-2011 09:09:53 GMT; Path=/api
< Set-Cookie: JSESSIONID=AECBF199F8F60E25F2B93FCE64AF784B; Path=/api
< Date: Thu, 14 Nov 2011 08:39:55 GMT
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
  <link href="http://example.com/api/cloud/virtualdatacenters/4/virtualappliances/3/virtualmachines/1/tasks/169f1877-5f17-4f62-9563-974001295c53" rel=”task"/> 
</acceptedrequest>
You can track the undeploy task at this URL.


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Modify a Virtual Machine

Modify a Virtual Machine

Synopsis: PUT http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Roles Required: ROLE_VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachine+json; version=3.1; application/vnd.abiquo.virtualmachine+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

force

false

false

force to update

 

 

 

 

Request Message Body Entity: VirtualMachine Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Update a AcceptedRequestDto entity. example
curl -X PUT http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1?force=true\
	 -H 'Accept: application/vnd.abiquo.acceptedrequest+xml; version=2.4'	\
	 -H 'Content-Type: application/vnd.abiquo.virtualmachine+xml; version=2.4'	\
	 -d @entity.xml	\
	 -u user:password --verbose


PUT http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1?force=true HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.acceptedrequest+xml;version=2.4
Content-Type: application/vnd.abiquo.virtualmachine+xml;version=2.4
Content-Length: 4960


HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:09:32 GMT
Set-Cookie: JSESSIONID=CB6B4E503D4C3CAC6A076ADD7855A0BA; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE3MjAyMTo4NmY0NzIyNWYxMzFjMzNkMTRjM2YwZWFlMjY2YWE1NDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:32 GMT; Path=/api
Server: Apache-Coyote/1.1


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Modify the Virtual Machine node information

Deprecated Functionality

This functionality was deprecated in version 3.0.

This enables to modify the Virtual Machine plus its X, label and Y.

Synopsis: PUT http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Roles Required: ROLE_VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachinewithnode+json; version=2.6; application/vnd.abiquo.virtualmachinewithnode+xml; version=2.6;
Request Parameters:

Parameter

Required

Default Value

Description

force

false

false

force to update

 

 

 

 

Request Message Body Entity: VirtualMachineWithNode Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Modify the Virtual Machine node information example
curl -X PUT http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1?force=true\
	 -H 'Accept: application/vnd.abiquo.acceptedrequest+xml; version=2.4'	\
	 -H 'Content-Type: application/vnd.abiquo.virtualmachinewithnode+xml; version=2.4'	\
	 -d @entity.xml	\
	 -u user:password --verbose


PUT http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1?force=true HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.acceptedrequest+xml;version=2.4
Content-Type: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4
Content-Length: 4960


HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:09:32 GMT
Set-Cookie: JSESSIONID=CB6B4E503D4C3CAC6A076ADD7855A0BA; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE3MjAyMTo4NmY0NzIyNWYxMzFjMzNkMTRjM2YwZWFlMjY2YWE1NDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:32 GMT; Path=/api
Server: Apache-Coyote/1.1


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Modify the Virtual Machine node extended information

Deprecated Functionality

This functionality was deprecated in version 3.0.

This enables to modify the Virtual Machine plus its X, label and Y.

Synopsis: PUT http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}
Roles Required: ROLE_VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept:  application/vnd.abiquo.acceptedrequest+json; version=3.1; application/vnd.abiquo.acceptedrequest+xml; version=3.1;  Content-type:  application/vnd.abiquo.virtualmachinewithnodeextended+json; version=2.6; application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.6;
Request Parameters:

Parameter

Required

Default Value

Description

force

false

false

force to update

 

 

 

 

Request Message Body Entity: VirtualMachineWithNodeExtended Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Modify the Virtual Machine node information example
curl -X PUT http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1?force=true\
	 -H 'Accept: application/vnd.abiquo.acceptedrequest+xml; version=2.4'	\
	 -H 'Content-Type: application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.4'	\
	 -d @entity.xml	\
	 -u user:password --verbose


PUT http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1?force=true HTTP/1.1
Authorization: Basic ABCdeF12gHIjkLM3no==
Accept: application/vnd.abiquo.acceptedrequest+xml;version=2.4
Content-Type: application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.4
Content-Length: 4960


HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:09:32 GMT
Set-Cookie: JSESSIONID=CB6B4E503D4C3CAC6A076ADD7855A0BA; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE3MjAyMTo4NmY0NzIyNWYxMzFjMzNkMTRjM2YwZWFlMjY2YWE1NDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:32 GMT; Path=/api
Server: Apache-Coyote/1.1




Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

 

Retrieve Virtual Machine Metadata information

Retrieve metadata information of a virtual machine. BackupSchedule has information about what it is desired to backup. BackupsResults has information about last backups done and its state.

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/metadata
Roles Required: ROLE_VAPP_MANAGE_BACKUP
Request Headers: Accept: application/vnd.abiquo.metadata+json; version=3.1; application/vnd.abiquo.metadata+xml; version=3.1;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Metadata Media Type
Request Example:


 Click here to expand...
curl -X GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/2/metadata\
	 -H 'Accept: application/vnd.abiquo.metadata+xml; version=2.6'	\
	 -u user:password --verbose

HTTP/1.1 200 OK
Content-Type: application/vnd.abiquo.metadata+xml;version=2.6
Content-Length: 719
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinemetadata>
    <metadata>
        <backupSchedule>
            <complete>
                <defined_hour>
                    <time>10:30:00 -0300</time>
                    <disks>
                        <disk>256</disk>
                    </disks>
                </defined_hour>
            </complete>
            <snapshot>
                <weekly_planned>
                    <time>11:30:00 -0300</time>
                    <monday/>
                    <tuesday/>
                </weekly_planned>
                <defined_hour>
                    <time>10:30:00 -0300</time>
            	</defined_hour>
            </snapshot>
            <filesystem>
                <weekly_planned>
                    <time>10:30:00 -0300</time>
                    <paths>
                        <path>/home/user/Documents/doc1</path>
                    </paths>
                    <monday/>
                    <tuesday/>
                </weekly_planned>
                <defined_hour>
                    <paths>
                        <path>/home/user/doc1</path>
                        <path>/home/user/doc2</path>
                    </paths>
                </defined_hour>
            </filesystem>
        </backupSchedule>
 		<backupResults>
            <results>
                <result>
                    <status>done</status>
                    <name>defined_hour</name>
                    <type>1</type>
                    <date>2013/05/01 17:25:00 -0100</date>
                    <size>250</size>
                </result>
                <result>
                    <status>progress</status>
                    <name>hourly</name>
                    <type>1</type>
                    <date>2013/05/10 10:00:00 +0300</date>
                    <size>25</size>
                </result>
            </results>
        </backupResults>
	 </metadata>
</virtualmachinemetadata>


Modify the Virtual Machine Metadata information

Modify virtual machine metadata information. Notice date format accomplish ISO 8601 (hh:mm:ss  ±00:00). Complete and Snapshot admit disks info and in Filesystem paths could be indicated.

Synopsis: PUT http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/metadata
Roles Required: ROLE_VAPP_MANAGE_BACKUP
Request Headers: Accept: application/vnd.abiquo.metadata+json; version=3.1; application/vnd.abiquo.metadata+xml; version=3.1;  Content-type:  application/vnd.abiquo.metadata+json; version=3.1; application/vnd.abiquo.metadata+xml; version=3.1;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: Metadata Media Type
Response Message Body Entity: Metadata Media Type
Request Example:


 

 Click here to expand...
curl -X PUT http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/2/metadata\
	 -H 'Accept: application/vnd.abiquo.metadata+xml; version=2.6'	\
	 -H 'Content-Type: application/vnd.abiquo.metadata+xml; version=2.6'	\
	 -d @entity.xml	\
	 -u user:password --verbose

HTTP/1.1 200 OK
Content-Type: application/vnd.abiquo.metadata+xml;version=2.6
Content-Length: 679
Date: Tue, 04 Jun 2013 14:51:34 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinemetadata>
    <metadata>
        <backupSchedule>
            <complete>
                <defined_hour>
                    <time>10:30:00 -0300</time>
                    <disks>
                        <disk>256</disk>
                    </disks>
                </defined_hour>
            </complete>
            <snapshot>
                <weekly_planned>
                    <time>11:30:00 -0300</time>
                    <monday/>
                    <tuesday/>
                </weekly_planned>
                <defined_hour>
                    <time>10:30:00 -0300</time>
                </defined_hour>
            </snapshot>
            <filesystem>
                <weekly_planned>
                    <time>10:30:00 -0300</time>
                    <paths>
                        <path>/home/user/Documents/doc1</path>
                    </paths>
                    <monday/>
                    <tuesday/>
                </weekly_planned>
                <defined_hour>
                    <paths>
                        <path>/home/user/doc1</path>
                        <path>/home/user/doc2</path>
                    </paths>
                </defined_hour>
            </filesystem>
        </backupSchedule>
        <backupResults>
            <results>
                <result>
                    <status>done</status>
                    <name>defined_hour</name>
                    <type>1</type>
                    <date>2013/05/01 17:25:00 -0100</date>
                    <size>250</size>
                </result>
            </results>
        </backupResults>
 </metadata>
</virtualmachinemetadata>

Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

 

Delete Virtual Machine Metadata information

Delete metedata information of a virtual machine

Synopsis: DELETE http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/metadata
Roles Required: ROLE_VAPP_MANAGE_BACKUP
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 

 Click here to expand...
curl -X DELETE http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/2/metadata\
	 -u user:password --verbose

DELETE http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/2/metadata HTTP/1.1

HTTP/1.1 204 No Content
Date: Tue, 04 Jun 2013 15:15:18 GMT

 

 

Get all load balancers associated with a virtual machine

A new method has been added to retrieve all load balancers associated with a virtual machine.

Synopsis: GET /cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/loadbalancers
Roles required: ROLE_MANAGE_LOADBALANCERS
Request headers: Accept:  application/vnd.abiquo.loadbalancers+json; version=3.1; application/vnd.abiquo.loadbalancers+xml; version=3.1;
Request parameters:

Sample request

curl --verbose -XGET http://admin:xabiquo@10.60.1.223:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/1/loadbalancers

Response

 Click here to show/hide example
{ 
  "totalSize": 1,
  "collection": [
    {
      "providerId": "a",
      "algorithm": "ELBSecurityPolicy-2014-01",
      "name": "a",
      "links": [
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1/loadbalancers/1",
          "type": "application/vnd.abiquo.loadbalancer+json",
          "rel": "edit",
          "title": "a"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1",
          "type": "application/vnd.abiquo.publiccloudregion+json",
          "rel": "location",
          "title": "a"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1/loadbalancers/1/addresses",
          "type": "application/vnd.abiquo.loadbalanceraddresses+json",
          "rel": "addresses",
          "title": "addresses"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1/loadbalancers/1/routingrules",
          "type": "application/vnd.abiquo.routingrules+json",
          "rel": "routingrules",
          "title": "routingrules"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1/loadbalancers/1/healthchecks",
          "type": "application/vnd.abiquo.healthchecks+json",
          "rel": "healthchecks",
          "title": "healthchecks"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1/loadbalancers/1/healthstates",
          "type": "application/vnd.abiquo.healthstates+json",
          "rel": "healthstates",
          "title": "virtual machines health state"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1/loadbalancers/1/virtualmachines",
          "type": "application/vnd.abiquo.links+json",
          "rel": "virtualmachines",
          "title": "virtual machines"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/virtualdatacenters/2",
          "type": "application/vnd.abiquo.virtualdatacenter+json",
          "rel": "virtualdatacenter",
          "title": "a"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/virtualdatacenters/2/privatenetworks/1",
          "type": "application/vnd.abiquo.vlan+json",
          "rel": "privatenetwork",
          "title": "default_private_network"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1/loadbalancers/addresses/1",
          "type": "application/vnd.abiquo.loadbalanceraddress+json",
          "rel": "loadbalanceraddress",
          "title": "a-747436504.eu-west-1.elb.amazonaws.com"
        },
        {
          "href": "http://10.60.1.223:80/api/cloud/locations/1/firewalls/1",
          "type": "application/vnd.abiquo.firewallpolicy+json",
          "rel": "firewall",
          "title": "default"
        }
      ]
    }
  ],
  "links": [
    {
      "href": "http://10.60.1.223:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/1/loadbalancers?limit=25&by=name",
      "rel": "first"
    },
    {
      "href": "http://10.60.1.223:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/1/loadbalancers?startwith=0&limit=25&by=name",
      "rel": "last"
    }
  ]
}

This new endpoint is returned as a link in the virtualmachine representation

curl --verbose -XGET http://admin:xabiquo@10.60.1.223:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/1

Extract of response showing link to load balancers

 Click here to show/hide example
...
    {
      "href": "http://10.60.1.223:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/1/loadbalancers",
      "type": "application/vnd.abiquo.loadbalancers+json",
      "rel": "loadbalancers",
      "title": "load balancers"
    },
...