Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Virtual Machines by Infrastructure Resource

Exposed Resources Hierarchy
Virtual Machines by Infrastructure Resource

Contents:

Resource that contains all the methods related to a Virtual Machine Infrastructure lists. Exposes all the methods inside the URI http://\{host}/api/admin/datacenters/{dcid}/racks/{rackids}/machines/{machineid}/virtualmachines related to perform actions to a list of virtual machines from the infrastructure path.

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines

Exposed Methods

Retrieve all the virtual machines with node and user information deployed in a physical machine

Returns all the virtual machines with node and user information deployed in a physical machine. That method acceps a query param with the same results that .

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.virtualmachineswithnodeextended+xml; version=2.6; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

sync

false

false

synchronize call

 

 

 

 

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

 Click here to show or hide the request example
Retrieve all the virtual machines with node and user information deployed in a physical machine example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/1/virtualmachines -X GET -H "accept:application/vnd.abiquo.virtualmachineswithnodeextended+xml; version=2.6"

* Server auth using Basic with user 'admin'
> GET /api/admin/datacenters/1/racks/1/machines/1/virtualmachines HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> 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=YWRtaW46MTM3NTM2ODcyMTMwNjoxOTY2ZDM5ZWE3ZTcxNTFmODgzYzM2MWZmZjhjMTg2ZTpBQklRVU8; Expires=Thu, 01-Aug-2013 14:52:01 GMT; Path=/api
< Set-Cookie: JSESSIONID=3AA423FFF96325D6715E59B64B6AE317; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachineswithnodeextended+xml;version=2.6
< Content-Length: 4603
< Date: Thu, 01 Aug 2013 14:22:01 GMT
< 


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachineswithnodeextended>
    <virtualmachinewithnodeextended>
        <link rel="metadata" href="http://example.com:80/api/cloud/virtualdatacenters/6/virtualappliances/3/virtualmachines/18/metadata"/>
        <link title="VMX_04" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1"/>
        <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1/virtualmachines/18/action/sendmail"/>
        <link title="Enterprise C" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/12"/>
        <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com:80/api/admin/enterprises/12/users/1"/>
        <link title="VMX_04" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3"/>
        <link title="CAPTURED_VM" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.6" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6"/>
        <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/network/configurations"/>
        <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/network/nics"/>
        <link rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/storage/disks"/>
        <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/state"/>
        <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/undeploy"/>
        <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/deploy"/>
        <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/reset"/>
        <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/instance"/>
        <link rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/config/rdpaccess"/>
        <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/tasks"/>
        <link rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/storage/volumes"/>
        <link rel="disk1" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/disks/784"/>
        <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/disks/785"/>
        <link rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/527"/>
        <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com:80/api/admin/enterprises/12/datacenterrepositories/1/virtualmachinetemplates/83"/>
        <link title="vm_for_capture" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1/virtualmachines/18"/>
        <id>18</id>
        <uuid>564d72c9-6387-de33-e59f-dc21824f9162</uuid>
        <name>vm_for_capture</name>
        <description></description>
        <cpu>1</cpu>
        <ram>1024</ram>
        <hdInBytes>104857600</hdInBytes>
        <vdrpEnabled>false</vdrpEnabled>
        <vdrpPort>0</vdrpPort>
        <idState>6</idState>
        <state>OFF</state>
        <idType>0</idType>
        <type>CAPTURED</type>
        <highDisponibility>0</highDisponibility>
        <dvd/>
        <nodeId>8</nodeId>
        <nodeName>vm_for_capture_image_node</nodeName>
        <x>-394</x>
        <y>-267</y>
        <userName>Cloud</userName>
        <userSurname>Administrator</userSurname>
        <enterpriseName>Enterprise C</enterpriseName>
    </virtualmachinewithnodeextended>
</virtualmachineswithnodeextended>


Returns the list of Virtual Machines deployed in a Physical Machine

Returns all the virtual machines deployed in a physical machine. This method accepts a query param . If this is the api will request to the nodecollector for any virtual machines not managed by abiquo but existent in the hypervisor, these virtual machines will be stored in the database waiting for a future capture action to be managed by abiquo, the response will contains a list of all virtual machines deployed in the physical machine. If the param is false that will work as a simple retrieve of the virtual machines stored in abiquo database and deployed in the physical machines.

Its important to know that the funtionality to obtain virtual machines deployed in the hypervisor will synchronize any virtual machine already existent in abiquo but not allocated in any hypervisor. So that recovers an old abiquo virtual machines deployed in a physical machine.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.virtualmachines+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

sync

false

false

synchronize call.

 

 

 

 

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

 Click here to show or hide the request example
Returns the list of Virtual Machines deployed in a Physical Machine example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/1/virtualmachines -X GET -H "accept:application/vnd.abiquo.virtualmachines+xml; version=2.6"

> GET /api/admin/datacenters/1/racks/1/machines/1/virtualmachines HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> 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=YWRtaW46MTM3NTM2ODgyNTQ4NzowNTNhNjEwZGVjNmQyMzg5Y2Q5NTViY2Y1MTQ0NTE2YTpBQklRVU8; Expires=Thu, 01-Aug-2013 14:53:45 GMT; Path=/api
< Set-Cookie: JSESSIONID=430222C9E3318EB3782AFF44ACB590FF; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachines+xml;version=2.6
< Content-Length: 5201
< Date: Thu, 01 Aug 2013 14:23:45 GMT



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachines>
    <virtualMachine>
        <link title="VMX_04" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1"/>
        <link title="DataONTAP docu" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1/virtualmachines/14"/>
        <id>14</id>
        <uuid>564dfeca-cf35-d674-0ce5-b9c4880f0e43</uuid>
        <name>DataONTAP docu</name>
        <description></description>
        <cpu>2</cpu>
        <ram>1600</ram>
        <hdInBytes>1108344832</hdInBytes>
        <vdrpEnabled>false</vdrpEnabled>
        <vdrpPort>0</vdrpPort>
        <idState>6</idState>
        <state>OFF</state>
        <idType>0</idType>
        <type>NOT_MANAGED</type>
        <highDisponibility>0</highDisponibility>
    </virtualMachine>
    <virtualMachine>
        <link rel="metadata" href="http://example.com:80/api/cloud/virtualdatacenters/6/virtualappliances/3/virtualmachines/18/metadata"/>
        <link title="VMX_04" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1"/>
        <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1/virtualmachines/18/action/sendmail"/>
        <link title="Enterprise C" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/12"/>
        <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com:80/api/admin/enterprises/12/users/1"/>
        <link title="VMX_04" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3"/>
        <link title="CAPTURED_VM" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.6" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6"/>
        <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/network/configurations"/>
        <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/network/nics"/>
        <link rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/storage/disks"/>
        <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/state"/>
        <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/undeploy"/>
        <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/deploy"/>
        <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/reset"/>
        <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/instance"/>
        <link rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/config/rdpaccess"/>
        <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/tasks"/>
        <link rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/storage/volumes"/>
        <link rel="disk1" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/disks/784"/>
        <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/disks/785"/>
        <link rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/527"/>
        <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com:80/api/admin/enterprises/12/datacenterrepositories/1/virtualmachinetemplates/83"/>
        <link title="vm_for_capture" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1/virtualmachines/18"/>
        <id>18</id>
        <uuid>564d72c9-6387-de33-e59f-dc21824f9162</uuid>
        <name>vm_for_capture</name>
        <description></description>
        <cpu>1</cpu>
        <ram>1024</ram>
        <hdInBytes>104857600</hdInBytes>
        <vdrpEnabled>false</vdrpEnabled>
        <vdrpPort>0</vdrpPort>
        <idState>6</idState>
        <state>OFF</state>
        <idType>0</idType>
        <type>CAPTURED</type>
        <highDisponibility>0</highDisponibility>
        <dvd/>
        <metadata>
            <backupSchedule>
                <snapshot>
                    <hourly>
                        <disks>
                            <disk>785</disk>
                            <disk>784</disk>
                        </disks>
                    </hourly>
                </snapshot>
            </backupSchedule>
        </metadata>
    </virtualMachine>
</virtualMachines>


Retrieve all the virtual machines with node information deployed in a physical machine

Returns all the virtual machines with node information deployed in a physical machine. That method acceps a query param with the same results that .

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.virtualmachineswithnode+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

sync

false

false

synchronize call.

 

 

 

 

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

 Click here to show or hide the request example
Retrieve all the virtual machines with node information deployed in a physical machine example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/1/virtualmachines -X GET -H "accept:application/vnd.abiquo.virtualmachineswithnode+xml; version=2.6"

> GET /api/admin/datacenters/1/racks/1/machines/1/virtualmachines HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> 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=YWRtaW46MTM3NTM2OTA4MzExMDoyZjg0M2VhYTBjNTNlZTNlZWIxMmQwZWVjMDE0ODg5ZDpBQklRVU8; Expires=Thu, 01-Aug-2013 14:58:03 GMT; Path=/api
< Set-Cookie: JSESSIONID=EACC5C8341B2C09C1DF848A877F10218; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachineswithnode+xml;version=2.6
< Content-Length: 4460
< Date: Thu, 01 Aug 2013 14:28:02 GMT


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachineswithnode>
    <virtualmachinewithnode>
        <link rel="metadata" href="http://example.com:80/api/cloud/virtualdatacenters/6/virtualappliances/3/virtualmachines/18/metadata"/>
        <link title="VMX_04" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1"/>
        <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1/virtualmachines/18/action/sendmail"/>
        <link title="Enterprise C" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/12"/>
        <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com:80/api/admin/enterprises/12/users/1"/>
        <link title="VMX_04" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3"/>
        <link title="CAPTURED_VM" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml; version=2.6" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6"/>
        <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/network/configurations"/>
        <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/network/nics"/>
        <link rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/storage/disks"/>
        <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/state"/>
        <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/undeploy"/>
        <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/deploy"/>
        <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/reset"/>
        <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/action/instance"/>
        <link rel="rdpaccess" type="application/vnd.abiquo.remoteaccess+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/config/rdpaccess"/>
        <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/tasks"/>
        <link rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/virtualappliances/6/virtualmachines/18/storage/volumes"/>
        <link rel="disk1" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/disks/784"/>
        <link rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/disks/785"/>
        <link rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com:80/api/cloud/virtualdatacenters/3/privatenetworks/3/ips/527"/>
        <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com:80/api/admin/enterprises/12/datacenterrepositories/1/virtualmachinetemplates/83"/>
        <link title="vm_for_capture" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/1/virtualmachines/18"/>
        <id>18</id>
        <uuid>564d72c9-6387-de33-e59f-dc21824f9162</uuid>
        <name>vm_for_capture</name>
        <description></description>
        <cpu>1</cpu>
        <ram>1024</ram>
        <hdInBytes>104857600</hdInBytes>
        <vdrpEnabled>false</vdrpEnabled>
        <vdrpPort>0</vdrpPort>
        <idState>6</idState>
        <state>OFF</state>
        <idType>0</idType>
        <type>CAPTURED</type>
        <highDisponibility>0</highDisponibility>
        <dvd/>
        <nodeId>8</nodeId>
        <nodeName>vm_for_capture_image_node</nodeName>
        <x>-394</x>
        <y>-267</y>
    </virtualmachinewithnode>
</virtualmachineswithnode>


Delete virtual machines not managed by Abiquo in a machine

This action removes from our system the virtual machines that we don't manage but that exist in the hypervisor and have been imported into Abiquo.

Synopsis: DELETE http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
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 virtual machines non managed by Abiquo by hypervisor's machine example
curl --verbose -u user:password example.com/api/admin/datacenters/1/racks/1/machines/3/virtualmachines -X DELETE 

> DELETE /api/admin/datacenters/1/racks/1/machines/3/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: */*

< HTTP/1.1 204 Sin Contenido


Retrieve a virtual machine deployed on a physical machine

Returns the requested virtual machine that is deployed on a physical machine and is actually managed by Abiquo. This means that the virtual machine exists in the database and in the hypervisor.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.virtualmachine+xml; version=2.4; 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 deployed on a physical machine example
curl --verbose -u user:password example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2 -X GET -H "accept:application/vnd.abiquo.virtualmachine+xml;version=2.4" 

> GET /api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2 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.virtualmachine+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTQ3OTUwOTk3OTo1NDNjMWQ4MjM2M2NlYTEwOTk4NWU3ZWNmNTcwOWFlOTpBQklRVU8; Expires=Tue, 29-Jan-2013 17:11:49 GMT; Path=/api
< Set-Cookie: JSESSIONID=BEA03A990C56A8092AB0357651FE75FC; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachine+xml;version=2.4
< Content-Length: 3877
< Date: Tue, 29 Jan 2013 16:41:50 GMT

<?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/2/virtualappliances/2/virtualmachines/2/network/configurations"/>
    <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/deploy"/>
    <link rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2"/>
    <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/2/virtualappliances/2/virtualmachines/2/storage/disks"/>
    <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/instance"/>
    <link title="KVM" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/2"/>
    <link rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/network/configurations/2"/>
    <link rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com/api/cloud/virtualdatacenters/2/privatenetworks/2/ips/257"/>
    <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/network/nics"/>
    <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/reset"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/sendmail"/>
    <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/state"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/tasks"/>
    <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/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/2/virtualappliances/2"/>
    <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/2"/>
    <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/5"/>
    <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/volumes"/>
    <cpu>1</cpu>
    <description>Core</description>
    <hdInBytes>104857600</hdInBytes>
    <highDisponibility>0</highDisponibility>
    <id>2</id>
    <idState>4</idState>
    <idType>1</idType>
    <name>ABQ_2bd1461d-9b35-40d9-91ab-1772547351fe</name>
    <ram>64</ram>
    <state>ON</state>
    <uuid>2bd1461d-9b35-40d9-91ab-1772547351fe</uuid>
    <vdrpIP>10.60.1.62</vdrpIP>
    <vdrpPort>5901</vdrpPort>
</virtualMachine>



Retrieve a virtual machine with resources deployed on a physical machine

Return a virtual machine deployed in the given physical machine with flat representation. That means all the resources are represented by dtos instead of links.

This method may receive a sync parameter with a boolean value. In case of true the virtual machine will be synchronized with the data in the hypervisor before return it in the response. These synchronization won't be effective in the database, so the virtual machine won't be modified.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.virtualmachine+xml; version=2.6; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

sync 

 false

false 

synchronize call

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

 Click here to show or hide the request example
Retrieve a virtual machine with node info deployed on a physical machine example
curl --verbose -u user:password example.com/api/admin/datacenters/2/racks/2/machines/2/virtualmachines/2?sync=true -X GET -H "accept:application/vnd.abiquo.virtualmachineflat+xml;version=2.6"

> GET /api/admin/datacenters/2/racks/2/machines/2/virtualmachines/2?sync=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:application/vnd.abiquo.virtualmachineflat+xml;version=2.6


< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM3NTg4NzMzMTkwNzpiMGFkYTlhYzlhYzlmMzRhNjdlOGZhNWU5Y2UxNmE3NTpBQklRVU8; Expires=Wed, 07-Aug-2013 14:55:31 GMT; Path=/api
< Set-Cookie: JSESSIONID=CC332B5109879683E12178F5CB064C2A; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachineflat+xml;version=2.6
< Content-Length: 1074
< Date: Wed, 07 Aug 2013 14:25:38 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 title="vm to be captured" rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/admin/datacenters/2/racks/2/machines/2/virtualmachines/2"/>
    <id>2</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>NOT_MANAGED</type>
    <highDisponibility>0</highDisponibility>
    <password>qMiCjSPZ</password>
    <keymap></keymap>
    <volumes/>
    <disks>
        <disk>
            <sequence>1</sequence>
            <sizeInMb>200</sizeInMb>
        </disk>
        <disk>
            <sequence>2</sequence>
            <sizeInMb>300</sizeInMb>
        </disk>
    </disks>
    <nics>
        <nic>
            <mac>00:50:56:36:1C:81</mac>
            <sequence>0</sequence>
            <tag>2</tag>
        </nic>
    </nics>
</virtualMachineFlat>


Retrieve a virtual machine with node info deployed on a physical machine

Returns the requested virtual machine with node information that is deployed on a physical machine and is actually managed by Abiquo. This means that the virtual machine exists in the database and in the hypervisor.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.virtualmachinewithnode+xml; version=2.4; 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 deployed on a physical machine example
curl --verbose -u user:password example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2 -X GET -H "accept:application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2 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.4
 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTQ3OTcyNTEzOTozODY2NjBmMmEwMmNmNjFiZmZjMzBmZjIzMzJiNzBlMjpBQklRVU8; Expires=Tue, 29-Jan-2013 17:15:25 GMT; Path=/api
< Set-Cookie: JSESSIONID=A2B57B2AE98FD27CDE092851580DD8DE; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinewithnode+xml;version=2.4
< Content-Length: 3960
< Date: Tue, 29 Jan 2013 16:45:25 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinewithnode>
    <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/network/configurations"/>
    <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/deploy"/>
    <link rel="edit" type="application/vnd.abiquo.virtualmachinewithnode+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2"/>
    <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/2/virtualappliances/2/virtualmachines/2/storage/disks"/>
    <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/instance"/>
    <link title="KVM" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/2"/>
    <link rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/network/configurations/2"/>
    <link rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com/api/cloud/virtualdatacenters/2/privatenetworks/2/ips/257"/>
    <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/network/nics"/>
    <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/reset"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/sendmail"/>
    <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/state"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/tasks"/>
    <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/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/2/virtualappliances/2"/>
    <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/2"/>
    <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/5"/>
    <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/volumes"/>
    <cpu>1</cpu>
    <description>Core</description>
    <hdInBytes>104857600</hdInBytes>
    <highDisponibility>0</highDisponibility>
    <id>2</id>
    <idState>4</idState>
    <idType>1</idType>
    <name>ABQ_2bd1461d-9b35-40d9-91ab-1772547351fe</name>
    <ram>64</ram>
    <state>ON</state>
    <uuid>2bd1461d-9b35-40d9-91ab-1772547351fe</uuid>
    <vdrpIP>10.60.1.62</vdrpIP>
    <vdrpPort>5901</vdrpPort>
    <nodeId>2</nodeId>
    <nodeName>Core</nodeName>
    <x>0</x>
    <y>0</y>
</virtualmachinewithnode>


Retrieve a virtual machine with node and user information deployed on a physical machine

Returns the requested virtual machine with node and user information that is deployed on a physical machine and is actually managed by Abiquo. This means that the virtual machine exists in the database and in the hypervisor.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.virtualmachinewithnodeextended+xml; version=2.4; 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 and user information deployed on a physical machine example
curl --verbose -u user:password example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2 -X GET -H "accept:application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2 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.4
 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTQ3OTg4MDQyMzo4ZmYxZGI2MWI5ZTU1ZTJhYmQwNzIwNDVkOWY3MmYwMjpBQklRVU8; Expires=Tue, 29-Jan-2013 17:18:00 GMT; Path=/api
< Set-Cookie: JSESSIONID=F827479B40753E2FF23CC228B3831E21; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinewithnodeextended+xml;version=2.4
< Content-Length: 4089
< Date: Tue, 29 Jan 2013 16:48:00 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualmachinewithnodeextended>
    <link rel="configurations" type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/network/configurations"/>
    <link rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/deploy"/>
    <link rel="edit" type="application/vnd.abiquo.virtualmachinewithnodeextended+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2"/>
    <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/2/virtualappliances/2/virtualmachines/2/storage/disks"/>
    <link rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/instance"/>
    <link title="KVM" rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/2"/>
    <link rel="network_configuration" type="application/vnd.abiquo.virtualmachinenetworkconfiguration+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/network/configurations/2"/>
    <link rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com/api/cloud/virtualdatacenters/2/privatenetworks/2/ips/257"/>
    <link rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/network/nics"/>
    <link rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/action/reset"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/sendmail"/>
    <link rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/state"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/tasks"/>
    <link rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/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/2/virtualappliances/2"/>
    <link title="KVM" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/2"/>
    <link rel="virtualmachinetemplate" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/5"/>
    <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2/storage/volumes"/>
    <cpu>1</cpu>
    <description>Core</description>
    <hdInBytes>104857600</hdInBytes>
    <highDisponibility>0</highDisponibility>
    <id>2</id>
    <idState>4</idState>
    <idType>1</idType>
    <name>ABQ_2bd1461d-9b35-40d9-91ab-1772547351fe</name>
    <ram>64</ram>
    <state>ON</state>
    <uuid>2bd1461d-9b35-40d9-91ab-1772547351fe</uuid>
    <vdrpIP>10.60.1.62</vdrpIP>
    <vdrpPort>5901</vdrpPort>
    <nodeId>2</nodeId>
    <nodeName>Core</nodeName>
    <x>0</x>
    <y>0</y>
    <enterpriseName>Abiquo</enterpriseName>
    <userName>Cloud</userName>
    <userSurname>Administrator</userSurname>
</virtualmachinewithnodeextended>


Retrieve the list of hard disks of a virtual machine in the cloud infrastructure

Get a list of disks on a virtual machine

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}/action/disk
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS, ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.harddisks+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Retrieve the list of hard disks of a virtual machine in the cloud infrastructure example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/7/virtualmachines/3/action/disk -H "accept:application/vnd.abiquo.harddisks+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/7/virtualmachines/3/action/disk 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.harddisks+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTc0MzQyNzU1NDo0YTIxMmVmYTJkOTk1NmY4ZDU0MjI2ODBiYjQ1NjNjNzpBQklRVU8; Expires=Fri, 01-Feb-2013 18:30:27 GMT; Path=/api
< Set-Cookie: JSESSIONID=1C8416D5AFBC50770177E6B025642111; Path=/api
< Content-Type: application/vnd.abiquo.harddisks+xml;version=2.4
< Content-Length: 398
< Date: Fri, 01 Feb 2013 18:00:27 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<disks>
    <disk>
        <link rel="edit" type="application/vnd.abiquo.harddisk+xml" href="http://example.com/api/cloud/virtualdatacenters/2/disks/513"/>
        <link rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/2"/>
        <sequence>0</sequence>
        <sizeInMb>50</sizeInMb>
    </disk>
</disks>


Send a mail

Send an email to Owner and / or ''EnterpriseAdmins'' of the current virtual machine.

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}/action/sendmail
Roles Required: ROLE_AUTHENTICATED
Request Headers: Accept: ; Content-type: application/vnd.abiquo.mail+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

sendermail

false

false

boolean to indicate if the sender of the mail will be the user

admins

false

false

boolean to indicate if the mail will be sent to the enterprise
admins

owners

false

false

boolean to indicate if the mail will be sent to the owners of the virtual
machine

 

 

 

 

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

 Click here to show or hide the request example
Send a mail example
curl --verbose -u user:password example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/sendmail?owners=true -X POST -H "content-type:application/vnd.abiquo.mail+xml;version=2.4" -d'<mail><subject>Virtual machine actions</subject><body>You virtual machine will be undeployed in order to...</body></mail>'

> POST /api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/sendmail?owners=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: */*
> content-type:application/vnd.abiquo.mail+xml;version=2.4
> Content-Length: 121

< HTTP/1.1 204 No Content


Download a template

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

Capture a non-managed virtual machine

Capture a non-managed virtual machine and use it in an Abiquo Virtual Appliance. A virtual appliance must be supplied to this functionality using a link. This virtual appliance must belong to a virtual datacenter from an enterprise with permissions in the datacenter.

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}/action/capture
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS, ROLE_VDC_MANAGE_VAPP
Request Headers: Accept: ; Content-type: application/vnd.abiquo.links+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Capture a non-managed virtual machine example
curl --verbose -u user:password example.com/api/admin/datacenters/1/racks/1/machines/3/virtualmachines/4/action/capture -X POST -H "content-type:application/vnd.abiquo.links+xml;version=2.4" -d '<links><link rel="virtualappliance" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2" /></links>'

> POST /api/admin/datacenters/1/racks/1/machines/3/virtualmachines/4/action/capture 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: */*
> content-type:application/vnd.abiquo.links+xml;version=2.4
> Content-Length: 123

< HTTP/1.1 204 Sin Contenido


Download a template

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

Retrieve the list of all NICs attached to the virtual machine

Returns the list of NICs used by the virtual machine.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}/action/nics
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS, ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.nics+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Retrieve the list of all NICs attached to the virtual machine example
curl --verbose -u user:password example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/nics -X GET -H "accept:application/vnd.abiquo.nics+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/nics 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.nics+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTQ4MDAxNjY5Mjo3OGU3MjA4OTIyMjRjZDkwZGU1ZTVhMTZiMjQ3ZmYyNjpBQklRVU8; Expires=Tue, 29-Jan-2013 17:20:16 GMT; Path=/api
< Set-Cookie: JSESSIONID=0E63210CCEBECE85F9F79AE1F123840E; Path=/api
< Content-Type: application/vnd.abiquo.nics+xml;version=2.4
< Content-Length: 486
< Date: Tue, 29 Jan 2013 16:50:16 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<nics>
    <nic>
        <link rel="nic0" type="application/vnd.abiquo.privateip+xml" href="http://example.com/api/cloud/virtualdatacenters/2/privatenetworks/2/ips/257"/>
        <link title="default_private_network" rel="privatenetwork" type="application/vnd.abiquo.vlan+xml" href="http://example.com/api/cloud/virtualdatacenters/2/privatenetworks/2"/>
        <id>257</id>
        <ip>192.168.0.2</ip>
        <mac>52:54:00:9e:83:e1</mac>
        <sequence>0</sequence>
    </nic>
</nics>



Retrieve the list of all volumes attached to the virtual machine

Get the list of all volumes that are attached to the virtual machine.

Paging Method

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

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/virtualmachines/{virtualmachine}/action/volumes
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS, ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.iscsivolumes+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

id

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.

 

 

 

 

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

 Click here to show or hide the request example
Retrieve the list of all volumes attached to the virtual machine example
curl --verbose -u user:password example.com/api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/volumes -X GET -H "accept:application/vnd.abiquo.iscsivolumes+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/2/virtualmachines/2/action/volumes 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.iscsivolumes+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTQ4MTA5ODQ1NDo3NjNiMDBmNDMyZGEwNDdlYzljNTUxZjYyMGVmMTg4ZjpBQklRVU8; Expires=Tue, 29-Jan-2013 17:38:18 GMT; Path=/api
< Set-Cookie: JSESSIONID=EAA944F9F2DA161AB39C317EBB64B964; Path=/api
< Content-Type: application/vnd.abiquo.iscsivolumes+xml;version=2.4
< Content-Length: 1232
< Date: Tue, 29 Jan 2013 17:08:18 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<volumes>
    <volume>
        <link rel="edit" type="application/vnd.abiquo.volume+xml" href="http://example.com/api/cloud/virtualdatacenters/2/volumes/255"/>
        <link rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml" href="http://example.com/api/cloud/virtualdatacenters/2/volumes/255/action/initiatormappings"/>
        <link title="Default Tier 1" rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/cloud/virtualdatacenters/2/tiers/1"/>
        <link title="vapp" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2"/>
        <link title="VDC" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/2"/>
        <link title="ABQ_2bd1461d-9b35-40d9-91ab-1772547351fe" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/2"/>
        <id>255</id>
        <name>volumen</name>
        <description></description>
        <state>ATTACHED</state>
        <sizeInMB>307</sizeInMB>
        <sequence>0</sequence>
    </volume>
</volumes>


  • No labels