Get List of vApp VSs

To get a list of a vApp VSs, use the following request:

1
2
GET /vapps/:vapp_id/virtual_machines.xml
GET /vapps/:vapp_id/virtual_machines.json

XML Request Example

1
curl -i -X GET -u user:userpass --url http://onapp.test/vapps/10/virtual_machines.xml -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

1
curl -i -X GET -u user:userpass --url http://onapp.test/vapps/10/virtual_machines.json -H 'Accept: application/json' -H 'Content-type: application/json'

XML Output Example

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
<virtual_machines type="array">
  <virtual_machine>
    <add_to_marketplace nil="true"/>
    <admin_note nil="true"/>
    <allowed_hot_migrate nil="true"/>
    <allowed_swap type="boolean">true</allowed_swap>
    <autoscale_service nil="true"/>
    <booted type="boolean">true</booted>
    <built type="boolean">true</built>
    <cdboot type="boolean">false</cdboot>
    <cores_per_socket type="integer">1</cores_per_socket>
    <cpu_shares type="integer">1</cpu_shares>
    <cpu_sockets nil="true"/>
    <cpu_threads nil="true"/>
    <cpu_units type="integer">10</cpu_units>
    <cpus type="integer">1</cpus>
    <created_at type="datetime">2016-02-01T11:46:48+00:00</created_at>
    <customer_network_id nil="true"/>
    <deleted_at nil="true"/>
    <draas_keys type="array">
    <draas_mode type="integer">0</draas_mode>
    <edge_server_type nil="true"/>
    <enable_autoscale nil="true"/>
    <firewall_notrack type="boolean">false</firewall_notrack>
    <hostname>Centos66-001</hostname>
    <hot_add_cpu type="boolean">false</hot_add_cpu>
    <hot_add_memory type="boolean">false</hot_add_memory>
    <hypervisor_id type="integer">4</hypervisor_id>
    <id type="integer">7</id>
    <identifier>vm-e6482ca1-b829-4d79-8f7a-8c4ed080857f</identifier>
    <initial_root_password></initial_root_password>
    <initial_root_password_encrypted type="boolean">false</initial_root_password_encrypted>
    <instance_type_id nil="true"/>
    <iso_id nil="true"/>
    <label>antonov12</label>
    <local_remote_access_ip_address nil="true"/>
    <local_remote_access_port nil="true"/>
    <locked type="boolean">false</locked>
    <memory type="integer">1024</memory>
    <min_disk_size nil="true"/>
    <note nil="true"/>
    <operating_system>linux</operating_system>
    <operating_system_distro>centos64Guest</operating_system_distro>
    <preferred_hvs type="array">
    <recovery_mode nil="true"/>
    <remote_access_password nil="true"/>
    <service_password nil="true"/>
    <state>delivered</state>
    <storage_server_type nil="true"/>
    <strict_virtual_machine_id nil="true"/>
    <suspended type="boolean">false</suspended>
    <template_id nil="true"/>
    <template_label nil="true"/>
    <time_zone nil="true"/>
    <updated_at type="datetime">2016-02-02T11:32:35+00:00</updated_at>
    <user_id type="integer">24</user_id>
    <vapp_id type="integer">10</vapp_id>
    <vip nil="true"/>
    <xen_id nil="true"/>
    <ip_addresses type="array">
      <ip_address>
        <address>10.1.1.2</address>
        <broadcast nil="true"/>
        <created_at type="datetime">2016-02-01T11:46:20+00:00</created_at>
        <customer_network_id nil="true"/>
        <disallowed_primary type="boolean">false</disallowed_primary>
        <gateway>10.1.1.254</gateway>
        <hypervisor_id nil="true"/>
        <id type="integer">2708</id>
        <ip_address_pool_id nil="true"/>
        <network_address nil="true"/>
        <network_id type="integer">21</network_id>
        <pxe type="boolean">false</pxe>
        <updated_at type="datetime">2016-02-01T11:46:20+00:00</updated_at>
        <user_id nil="true"/>
        <free type="boolean">false</free>
        <netmask>255.255.255.0</netmask>
      </ip_address>
      <ip_address>
        <address>10.1.1.1</address>
        <broadcast nil="true"/>
        <created_at type="datetime">2016-02-01T11:46:20+00:00</created_at>
        <customer_network_id nil="true"/>
        <disallowed_primary type="boolean">false</disallowed_primary>
        <gateway>10.1.1.254</gateway>
        <hypervisor_id nil="true"/>
        <id type="integer">2707</id>
        <ip_address_pool_id nil="true"/>
        <network_address nil="true"/>
        <network_id type="integer">21</network_id>
        <pxe type="boolean">false</pxe>
        <updated_at type="datetime">2016-02-01T11:46:20+00:00</updated_at>
        <user_id nil="true"/>
        <free type="boolean">false</free>
        <netmask>255.255.255.0</netmask>
      </ip_address>
    </ip_addresses>
    <monthly_bandwidth_used>0</monthly_bandwidth_used>
    <total_disk_size type="integer">8</total_disk_size>
    <support_incremental_backups type="boolean">true</support_incremental_backups>
    <cpu_priority type="integer">1</cpu_priority>
    <built_from_iso type="boolean">false</built_from_iso>
    <acceleration type="boolean">false</acceleration>
    <acceleration_status>Inactive</acceleration_status>
    <price_per_hour type="float">0.0</price_per_hour>
    <price_per_hour_powered_off type="float">0.0</price_per_hour_powered_off>
  </virtual_machine>
</virtual_machines>

Where:

  • add_to_marketplace — empty for VSs; used for edge servers only
  • admin_note — an optional note of the administrator
  • allowed_hot_migratetrue if the template, on which the VS is based, supports hot migration; otherwise, false
  • allowed_swaptrue if swap disk is allowed (depends on the template the VS is based on); otherwise, false
  • bootedtrue if the VS is running; otherwise, false
  • builttrue if the VS is built; otherwise, false
  • cores_per_socket - the amount of cores per socket
  • cpu_shares — CPU priority in percent’s
  • cpu_sockets - this output parameter does not currently apply to vCloud VSs
  • cpu_threads - the amount of CPU threads per core. This parameter can be set for KVM compute resources only by those users who have Enable CPU topology permission granted
  • cpu_units - the amount of CPU units per core if the CPU priority is replaced with CPU units in user bucket.
  • cpus — the number of allocated CPU cores
  • created_at — the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
  • customer_network_id - ID of a customer network
  • deleted_at - time when the VS was deleted
  • edge_server_type - true if this is the edge server
  • enable_autoscaletrue if autoscaling is allowed for this VS
  • enable_monitis - deprecated attribute; will be removed in upcoming release
  • firewall_notrack - true if the NOTRACK rule is set in iptables
  • hostname — the name of your host
  • hypervisor_id — the ID of the compute resource used by this VS
  • id — the VS ID
  • identifier — the VS identifier
  • initial_root_password — the VS root password
  • initial_root_password_encrypted - true if the root password is encrypted; otherwise, false.
  • iso_id - the ID of the ISO the VS is based on
  • label — the VS label
  • local_remote_access_ip_address - IP address used for remote access
  • local_remote_access_port — the port ID used for console access
  • lockedtrue if the VS is locked; otherwise, false
  • memory — the RAM size allocated to this VS
  • min_disk_size — the minimum disk size required to build a VS from a specified template
  • note — an optional reminder for this VS made by a user account
  • operating_system — operating system used by the VS
  • operating_system_distro — the distribution of the OS from which this VS is built
  • preferred_hvs - the array of preferable compute resources based on compute zone that meet some VS configuration settings
  • recovery_modetrue if recovery mode allowed. Otherwise, false
  • remote_access_password — the password for the remote access
  • service_password - service account password
  • state – parameter reserved for future use
  • storage_server_type - true if this is a storage server
  • strict_virtual_machine_id — the ID of a virtual server that will never reside on the same compute resource with this VS
  • suspendedtrue if VS is suspended; otherwise, false
  • template_id — the ID of the template the VS is based on
  • template_label — the name of the template from which this VS is built
  • updated_at — the date when the VS was updated in the [YYYY][MM][DD]T[hh][mm][ss]Z format
  • user_id — the ID of a user assigned to this VS
  • viptrue if the VS has VIP status (gives migration priority)
  • xen_id — the VS ID set by the virtualization engine
  • ip_addresses - an array of IP addresses assigned to this VS and their details:
    • address - IP address
    • broadcast - broadcast address
    • created_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
    • customer_network_id - the ID of the customer VLAN the IP address belongs to
    • disallowed_primary - true if not allowed to be used as primary; otherwise, false
    • gateway - gateway address
    • hypervisor_id - the ID of a compute resource the IP address is associated with
    • id - the ID of the IP address
    • ip_address_pool_id - ID of the IP address pool the IP address is associated with
    • network_address - the address of the network
    • network_id - the ID of the network
    • pxe - true if this address can be used for cloudbooting a compute resource
    • updated_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
    • user_id - the ID of the user this IP address is assigned to
    • free - true if free; otherwise, false
    • netmask - netmask for the IP address
  • monthly_bandwidth_used - VS monthly bandwidth in KB
  • total_disk_size — the total disk size in GB of all disks assigned to VS
  • price_per_hour - server’s price per hour*
  • price_per_hour_powered_off - price per hour when server is powered off
  • support_incremental_backups - 1 if virtual server supports incremental backups, and 0 if it does not
  • cpu_priority - this is a new parameter reserved for further use; currently will have the same value as cpu_shares