Using the Red Hat Enterprise Virtualization Representational State Transfer Application Programming Interface
Edition 1
Legal Notice
Abstract
- Preface
- 1. Introduction
- 2. Authentication and Security
- 3. Beginner Example
- 3.1. Access API Entry Point
- 3.2. List Data Center Collection
- 3.3. List Host Cluster Collection
- 3.4. List Logical Networks Collection
- 3.5. List Host Collection
- 3.6. Approve Host
- 3.7. Create NFS Data Storage
- 3.8. Create NFS ISO Storage
- 3.9. Attach Storage Domains to Data Center
- 3.10. Activate Storage Domains
- 3.11. Create Virtual Machine
- 3.12. Create Virtual Machine NIC
- 3.13. Create Virtual Machine Storage Disk
- 3.14. Attach ISO Image to Virtual Machine
- 3.15. Start Virtual Machine
- 3.16. Check System Events
- 3.17. Example Completion
- 4. Entry Point
- 5. Compatibility Level Versions
- 6. Capabilities
- 6.1. Version-Dependent Capabilities
- 6.1.1. Current Version
- 6.1.2. Features
- 6.1.3. CPUs
- 6.1.4. Power Managers
- 6.1.5. Fence Types
- 6.1.6. Storage Types
- 6.1.7. Storage Domain Types
- 6.1.8. Virtual Machine Types
- 6.1.9. Boot Devices
- 6.1.10. Display Types
- 6.1.11. NIC Interface Types
- 6.1.12. Disk Types
- 6.1.13. OS Types
- 6.1.14. Disk Formats
- 6.1.15. Disk Interfaces
- 6.1.16. Virtual Machine Affinities
- 6.1.17. Custom Properties
- 6.1.18. Boot Protocols
- 6.1.19. Error Handling
- 6.1.20. Storage Formats
- 6.1.21. Resource Status States
- 6.2. Permits
- 6.3. Scheduling Policies
- 6.4. Capabilities Example
- 7. Common Features
- 8. Data Centers
- 9. Host Clusters
- 10. Networks
- 11. Storage Domains
- 12. Hosts
- 13. Virtual Machines
- 14. Templates
- 15. Virtual Machine Pools
- 16. Domains
- 17. Groups
- 18. Roles
- 19. Users
- 20. Tags
- 21. Events
- A. API Usage with cURL
- B. Java Keystores
- C. Event Codes
- D. Timezones
- E. Revision History
The Red Hat Enterprise Virtualization documentation suite
- Red Hat Enterprise Virtualization Hypervisor Release Notes contain release specific information for Red Hat Enterprise Virtualization Hypervisors.
- Red Hat Enterprise Virtualization Manager Release Notes contain release specific information for Red Hat Enterprise Virtualization Managers.
- Red Hat Enterprise Virtualization Installation Guide describes the installation prerequisites and procedures. Read this if you need to install Red Hat Enterprise Virtualization. The installation of hosts, manager and storage are covered in this guide. You will need to refer to the Red Hat Enterprise Virtualization Administration Guide to configure the system before you can start using the platform.
- Red Hat Enterprise Virtualization Administration Guide describes how to setup, configure and manage Red Hat Enterprise Virtualization. It assumes that you have successfully installed the Red Hat Enterprise Virtualization manager and hosts.
- Red Hat Enterprise Virtualization User Portal Guide describes how users of the Red Hat Enterprise Virtualization system can access and use virtual desktops.
- Red Hat Enterprise Virtualization Storage and Networking Guide provides detailed information on the storage and networking subsystems of Red Hat Enterprise Virtualization.
- Red Hat Enterprise Linux Hypervisor Deployment Guide describes how to deploy and install the hypervisor. Read this guide if you need advanced information about installing and deploying Hypervisors. The basic installation of Hypervisor hosts is also described in the Red Hat Enterprise Virtualization Installation Guide.
- Red Hat Enterprise Linux V2V Guide describes importing virtual machines from KVM, Xen and VMware ESX to Red Hat Enterprise Virtualization and KVM managed by libvirt.
- Red Hat Enterprise Virtualization REST API Guide (the book you are reading) describes how to use the REST API to set up and manage virtualization tasks. Use this guide if you wish to develop systems which integrate with Red Hat Enterprise Virtualization, using an open and platform independent API.
- Red Hat Enterprise Virtualization Security Guide describes security concepts, features and best practices surrounding Red Hat Enterprise Virtualization.
- Red Hat Enterprise Virtualization Technical Reference Guide describes the technical architecture of Red Hat Enterprise Virtualization and its interactions with existing infrastructure.
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F2 to switch to a virtual terminal.
mono-spaced bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose → → from the main menu bar to launch Mouse Preferences. In the Buttons tab, select the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose → → from the main menu bar. Next, choose → from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose → from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
Publican is a DocBook publishing system.
mono-spaced roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
mono-spaced roman but add syntax highlighting as follows:
static int kvm_vm_ioctl_deassign_device(struct kvm *kvm,
struct kvm_assigned_pci_dev *assigned_dev)
{
int r = 0;
struct kvm_assigned_dev_kernel *match;
mutex_lock(&kvm->lock);
match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head,
assigned_dev->assigned_dev_id);
if (!match) {
printk(KERN_INFO "%s: device hasn't been assigned before, "
"so cannot be deassigned\n", __func__);
r = -EINVAL;
goto out;
}
kvm_deassign_device(kvm, match);
kvm_free_assigned_device(kvm, match);
out:
mutex_unlock(&kvm->lock);
return r;
}Note
Important
Warning
- search or browse through a knowledgebase of technical support articles about Red Hat products.
- submit a support case to Red Hat Global Support Services (GSS).
- access other product documentation.
- Broad client support - Any programming language, framework, or system with support for HTTP protocol can use the API;
- Self descriptive - Client applications require minimal knowledge of the virtualization infrastructure as many details are discovered at runtime;
- Resource-based model - The resource-based REST model provides a natural way to manage a virtualization platform.
- Integrate with enterprise IT systems.
- Integrate with third-party virtualization software.
- Perform automated maintenance or error checking tasks.
- Automate repetitive tasks in a Red Hat Enterprise Virtualization environment with scripts.
GET, POST, PUT, and DELETE. This provides a stateless communication between the client and server where each request acts independent of any other request and contains all necessary information to complete the request.
- A networked installation of Red Hat Enterprise Virtualization Manager 3.0, which includes the REST API;
- A client or programming library that initiates and receives HTTP requests from the REST API. As an example, this guide includes basic instructions on use with cURL in Appendix A, API Usage with cURL;
- Knowledge of Hypertext Transfer Protocol (HTTP), which is the protocol used for REST API interactions. The Internet Engineering Task Force provides a Request for Comments (RFC) explaining the Hypertext Transfer Protocol at http://www.ietf.org/rfc/rfc2616.txt; and,
- Knowledge of Extensible Markup Language (XML), which the API uses to construct resource representations. The W3C provides a full specification on XML at http://www.w3.org/TR/xml/.
Procedure 2.1. Attain a certificate
- Method 1 - Use a command line tool to download the certificate from the server. Examples of command line tools include cURL and Wget; both are available for multiple platforms.
- If using cURL:
curl -o rhevm.cer http://[rhevm-server]:8080/ca.crt
- If using Wget:
wget -O rhevm.cer http://[rhevm-server]:8080/ca.crt
- Method 2 - Use a web browser to navigate to the certificate located at:
http://[rhevm-server]:8080/ca.crt
Depending on the chosen browser, the certificate either downloads or imports into the browser's keystore.- If the browser downloads the certificate: save the file as
rhevm.cer.If the browser imports the certificate: export it from the browser's certification options and save it asrhevm.cer.
- Method 3 - Access your Red Hat Enterprise Virtualization Manager server either physically or through a secure shell (SSH) client, export the certificate from the server's keystore and copy it to your client machine.
- Access your Red Hat Enterprise Virtualization Manager server as the
rootuser. - Export a certificate from the server's keystore using the Java keytool management utility:
keytool -exportcert -keystore /etc/pki/rhevm/.keystore -alias rhevm -storepass mypass -file rhevm.cer
This creates a certificate file calledrhevm.cer. - Copy the certificate to the client machine using the
scpcommand:scp rhevm.cer [username]@[client-machine]:[directory]
rhevm.cer on your client machine. An API user imports this file into the client's certificate store.
Procedure 2.2. Import a certificate to your client
- A certificate import for your client relies on how the client itself stores and interprets certificates. This guide contains an example on importing to a Java keystore in Appendix B, Java Keystores. For other clients, please refer to your client documentation for more information on importing a certificate.
Authorization header, the API sends a 401 Authorization Required as a result:
Example 2.1. Access to the REST API without appropriate credentials
HEAD [base] HTTP/1.1 Host: [host] HTTP/1.1 401 Authorization Required
Authorization header for the specified realm. An API user encodes an appropriate Red Hat Enterprise Virtualization Manager domain and user in the supplied credentials with the username@domain:password convention.
Table 2.1. Encoding credentials for access to the API
| Item | Value |
|---|---|
| username | rhevmadmin |
| domain | domain.example.com |
| password | 123456 |
| unencoded credentials | rhevmadmin@domain.example.com:123456 |
| base64 encoded credentials | cmhldm1hZG1pbkBibGFjay5xdW1yYW5ldC5jb206MTIzNDU2 |
Example 2.2. Access to the REST API with appropriate credentials
HEAD [base] HTTP/1.1 Host: [host] Authorization: Basic cmhldm1hZG1pbkBibGFjay5xdW1yYW5ldC5jb206MTIzNDU2 HTTP/1.1 200 OK ...
Important
Important
- 3.1. Access API Entry Point
- 3.2. List Data Center Collection
- 3.3. List Host Cluster Collection
- 3.4. List Logical Networks Collection
- 3.5. List Host Collection
- 3.6. Approve Host
- 3.7. Create NFS Data Storage
- 3.8. Create NFS ISO Storage
- 3.9. Attach Storage Domains to Data Center
- 3.10. Activate Storage Domains
- 3.11. Create Virtual Machine
- 3.12. Create Virtual Machine NIC
- 3.13. Create Virtual Machine Storage Disk
- 3.14. Attach ISO Image to Virtual Machine
- 3.15. Start Virtual Machine
- 3.16. Check System Events
- 3.17. Example Completion
- A networked and configured host containing Red Hat Enterprise Virtualization Hypervisor;
- An ISO file containing a desired virtual machine operating system to install. This chapter uses Red Hat Enterprise Linux Server 6 for our installation ISO example; and
- Red Hat Enterprise Virtualization Platform's uploader tool to upload your chosen operating system ISO file.
Important
Host: and Authorization: fields. However, these fields are mandatory and require data specific to your installation of Red Hat Enterprise Virtualization Manager.
Important
USER:PASS) and certificate location (CERT). Ensure all requests performed with cURL fulfil certification and authentication requirements. See Chapter 2, Authentication and Security and Appendix A, API Usage with cURL for more information.
Note
id attribute for each resource. Identifier codes in this example might appear different to the identifier codes in your Red Hat Enterprise Virtualization environment.
Example 3.1. Access the API entry point
GET /api HTTP/1.1 Accept: application/xml
curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHEVM Host]:8443/api
HTTP/1.1 200 OK
Content-Type: application/xml
<api>
<link rel="capabilities" href="/api/capabilities"/>
<link rel="clusters" href="/api/clusters"/>
<link rel="clusters/search" href="/api/clusters?search={query}"/>
<link rel="datacenters" href="/api/datacenters"/>
<link rel="datacenters/search" href="/api/datacenters?search={query}"/>
<link rel="events" href="/api/events"/>
<link rel="events/search" href="/api/events?search={query}"/>
<link rel="hosts" href="/api/hosts"/>
<link rel="hosts/search" href="/api/hosts?search={query}"/>
<link rel="networks" href="/api/networks"/>
<link rel="roles" href="/api/roles"/>
<link rel="storagedomains" href="/api/storagedomains"/>
<link rel="storagedomains/search" href="/api/storagedomains?search={query}"/>
<link rel="tags" href="/api/tags"/>
<link rel="templates" href="/api/templates"/>
<link rel="templates/search" href="/api/templates?search={query}"/>
<link rel="users" href="/api/users"/>
<link rel="groups" href="/api/groups"/>
<link rel="domains" href="/api/domains"/>
<link rel="vmpools" href="/api/vmpools"/>
<link rel="vmpools/search" href="/api/vmpools?search={query}"/>
<link rel="vms" href="/api/vms"/>
<link rel="vms/search" href="/api/vms?search={query}"/>
<special_objects>
<link rel="templates/blank"
href="/api/templates/00000000-0000-0000-0000-000000000000"/>
<link rel="tags/root"
href="/api/tags/00000000-0000-0000-0000-000000000000"/>
</special_objects>
<product_info>
<name>Red Hat Enterprise Virtualization</name>
<vendor>Red Hat</vendor>
<version revision="0" build="0" minor="0" major="3"/>
</product_info>
<summary>
<vms>
<total>5</total>
<active>0</active>
</vms>
<hosts>
<total>1</total>
<active>1</active>
</hosts>
<users>
<total>1</total>
<active>1</active>
</users>
<storage_domains>
<total>2</total>
<active>2</active>
</storage_domains>
</summary>
</api>
rel= attribute of each collection link provides a reference point for each link. The next step in this example examines the datacenter collection, which is available through the rel="datacenter" link.
product_info, special_objects and summary. This data is covered in chapters outside this example.
Default data center on installation. This example uses the Default data center as the basis for our virtual environment.
Example 3.2. List data center collection
GET /api/datacenters HTTP/1.1 Accept: application/xml
curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHEVM Host]:8443/api/datacenters
HTTP/1.1 200 OK
Content-Type: application/xml
<data_centers>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988">
<name>Default</name>
<description>The default Data Center</description>
<link rel="storagedomains"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/
storagedomains"/>
<link rel="permissions"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/permissions"/>
<storage_type>nfs</storage_type>
<storage_format>v1</storage_format>
<version minor="0" major="3"/>
<supported_versions>
<version minor="0" major="3"/>
</supported_versions>
<status>
<state>up</state>
</status>
</data_center>
</data_centers>
id code of your Default data center. This code identifies this data center in relation to other resources of your virtual environment.
storagedomains sub-collection. The data center uses this sub-collection to attach storage domains from the storagedomains main collection, which this example covers later.
Default host cluster on installation. This example uses the Default cluster to group resources in your Red Hat Enterprise Virtualization environment.
Example 3.3. List host clusters collection
GET /api/clusters HTTP/1.1 Accept: application/xml
curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHEVM Host]:8443/api/clusters
HTTP/1.1 200 OK
Content-Type: application/xml
<clusters>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95">
<name>Default</name>
<description>The default server cluster</description>
<link rel="networks"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks"/>
<link rel="permissions"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/permissions"/>
<cpu id="Intel Penryn Family"/>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988"/>
<memory_policy>
<overcommit percent="100"/>
<transparent_hugepages>
<enabled>false</enabled>
</transparent_hugepages>
</memory_policy>
<scheduling_policy/>
<version minor="0" major="3"/>
<error_handling>
<on_error>migrate</on_error>
</error_handling>
</cluster>
</clusters>
id code of your Default host cluster. This code identifies this host cluster in relation to other resources of your virtual environment.
Default cluster is associated with the Default data center through a relationship using the id and href attributes of the data_center element.
networks sub-collection contains a list of associated network resources for this cluster. The next section examines the networks collection in more detail.
rhevm network on installation. This network acts as the management network for Red Hat Enterprise Virtualization Manager to access hypervisor hosts.
Default cluster and is a member of the Default data center. This example uses the rhevm network to connect our virtual machines.
Example 3.4. List logical networks collection
GET /api/networks HTTP/1.1 Accept: application/xml
curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHEVM Host]:8443/api/networks
HTTP/1.1 200 OK
Content-Type: application/xml
<networks>
<network id="00000000-0000-0000-0000-000000000009"
href="/api/networks/00000000-0000-0000-0000-000000000009">
<name>rhevm</name>
<description>Management Network</description>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988"/>
<stp>false</stp>
<status>
<state>operational</state>
</status>
<display>false</display>
</network>
</networks>
rhevm network is attached to the Default data center through a relationship using the data center's id code.
rhevm network is also attached to the Default cluster through a relationship in the cluster's network sub-collection.
hypervisor registered with the virtualization environment.
Example 3.5. List hosts collection
GET /api/hosts HTTP/1.1 Accept: application/xml
curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHEVM Host]:8443/api/hosts
HTTP/1.1 200 OK
Accept: application/xml
<hosts>
<host id="0656f432-923a-11e0-ad20-5254004ac988"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988">
<name>hypervisor</name>
<actions>
<link rel="install"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/install"/>
<link rel="activate"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/activate"/>
<link rel="fence"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/fence"/>
<link rel="deactivate"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/deactivate"/>
<link rel="approve"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/approve"/>
<link rel="iscsilogin"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/iscsilogin"/>
<link rel="iscsidiscover"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/iscsidiscover"/>
<link rel="commitnetconfig"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/
commitnetconfig"/>
</actions>
<link rel="storage"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/storage"/>
<link rel="nics"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/nics"/>
<link rel="tags"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/tags"/>
<link rel="permissions"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/permissions"/>
<link rel="statistics"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/statistics"/>
<address>10.64.14.110</address>
<status>
<state>non_operational</state>
</status>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/>
<port>54321</port>
<storage_manager>true</storage_manager>
<power_management>
<enabled>false</enabled>
<options/>
</power_management>
<ksm>
<enabled>false</enabled>
</ksm>
<transparent_hugepages>
<enabled>true</enabled>
</transparent_hugepages>
<iscsi>
<initiator>iqn.1994-05.com.example:644949fe81ce</initiator>
</iscsi>
<cpu>
<topology cores="2"/>
<name>Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz</name>
<speed>2993</speed>
</cpu>
<summary>
<active>0</active>
<migrating>0</migrating>
<total>0</total>
</summary>
</host>
</hosts>
id code of your Default host. This code identifies this host in relation to other resources of your virtual environment.
Default cluster and accessing the nics sub-collection shows this host has a connection to the rhevm network.
hypervisor host resource contains an approve action. A user accesses this action's URI with a POST request.
Example 3.6. Approve a pre-configured Red Hat Enterprise Virtualization Hypervisor host
POST /api/hosts/0656f432-923a-11e0-ad20-5254004ac988/approve HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<action/>" https://[RHEVM Host]:8443/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/approve
action element.
approve action only for Red Hat Enterprise Virtualization Hypervisor hosts. Red Hat Enterprise Linux hosts require a different process to connect to the virtualization environment.
status for hypervisor changes from non_operational to up.
POST request, with the storage domain representation included, sent to the URL of the storage domain collection.
Example 3.7. Create an NFS data storage domain
POST /api/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
<storage_domain>
<name>data1</name>
<type>data</type>
<storage>
<type>nfs</type>
<address>192.168.0.10</address>
<path>/data1</path>
</storage>
<host>
<name>hypervisor</name>
</host>
</storage_domain>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<storage_domain><name>data1</name><type>data</type><storage><type>nfs</type><address>192.168.0.10</address><path>/data1</path></storage><host><name>hypervisor</name></host></storage_domain>" https://[RHEVM Host]:8443/api/storagedomains
data1 with an export path of 192.168.0.10:/data1 and sets access to the storage domain through the hypervisor host. The API also returns the following representation of the newly created storage domain resource:
HTTP/1.1 200 OK
Accept: application/xml
<storage_domain id="9ca7cb40-9a2a-4513-acef-dc254af57aac"
href="/api/storagedomains/9ca7cb40-9a2a-4513-acef-dc254af57aac">
<name>data1</name>
<link rel="permissions"
href="/api/storagedomains/9ca7cb40-9a2a-4513-acef-dc254af57aac/
permissions"/>
<link rel="files"
href="/api/storagedomains/9ca7cb40-9a2a-4513-acef-dc254af57aac/files"/>
<type>data</type>
<master>false</master>
<storage>
<type>nfs</type>
<address>192.168.0.10</address>
<path>/data1</path>
</storage>
<available>175019917312</available>
<used>27917287424</used>
<committed>10737418240</committed>
<storage_format>v1</storage_format>
<host id="0656f432-923a-11e0-ad20-5254004ac988"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988">
</storage_domain>
POST request, with the storage domain representation included, sent to the URL of the storage domain collection.
Example 3.8. Create an NFS ISO storage domain
POST /api/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
<storage_domain>
<name>iso1</name>
<type>iso</type>
<storage>
<type>nfs</type>
<address>192.168.0.10</address>
<path>/iso1</path>
</storage>
<host>
<name>hypervisor</name>
</host>
</storage_domain>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<storage_domain><name>iso1</name><type>iso</type><storage><type>nfs</type><address>192.168.0.10</address><path>/iso1</path></storage><host><name>hypervisor</name></host></storage_domain>" https://[RHEVM Host]:8443/api/storagedomains
iso1 with an export path of 192.168.0.10:/iso1 and gets access to the storage domain through the hypervisor host. The API also returns the following representation of the newly created storage domain resource:
HTTP/1.1 200 OK
Accept: application/xml
<storage_domain id="00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da">
<name>iso1</name>
<link rel="permissions"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/
permissions"/>
<link rel="files"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files"/>
<type>iso</type>
<host id="" href="">
<master>false</master>
<storage>
<type>nfs</type>
<address>192.168.0.10</address>
<path>/iso1</path>
</storage>
<available>82678120448</available>
<used>18253611008</used>
<committed>0</committed>
<storage_format>v1</storage_format>
<host id="0656f432-923a-11e0-ad20-5254004ac988"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988">
</storage_domain>
data1 and iso1 storage domains to the Default data center.
Example 3.9. Attach data1 storage domain to the Default data center
POST /api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/storagedomains HTTP/1.1 Accept: application/xml Content-type: application/xml <storage_domain> <name>data1</name> </storage_domain>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<storage_domain><name>data1</name></storage_domain>" https://[RHEVM Host]:8443/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/storagedomains
Example 3.10. Attach iso1 storage domain to the Default data center
POST /api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/storagedomains HTTP/1.1 Accept: application/xml Content-type: application/xml <storage_domain> <name>iso1</name> </storage_domain>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<storage_domain><name>iso1</name></storage_domain>" https://[RHEVM Host]:8443/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/storagedomains
POST requests place our two new storage_domain resources in the storagedomains sub-collection of the Default data center. This means the storagedomain sub-collection contains attached storage domains of the data center.
data1 and iso1 storage domains for the Red Hat Enterprise Virtualization Manager's use.
Example 3.11. Activate data1 storage domain
POST /api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains/ 9ca7cb40-9a2a-4513-acef-dc254af57aac/activate HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<action/>" https://[RHEVM Host]:8443/api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains/9ca7cb40-9a2a-4513-acef-dc254af57aac/activate
Example 3.12. Activate iso1 storage domain
POST /api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains/ 00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/activate HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<action/>" https://[RHEVM Host]:8443/api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/activate
vm1 on the Default cluster using the virtualization environment's Blank template as a basis. The request also defines the virtual machine's memory as 512 MB and sets the boot device to a virtual hard disk.
Example 3.13. Create a virtual machine
POST /api/vms HTTP/1.1
Accept: application/xml
Content-type: application/xml
<vm>
<name>vm1</name>
<cluster>
<name>default</name>
</cluster>
<template>
<name>Blank</name>
</template>
<memory>536870912</memory>
<os>
<boot dev="hd"/>
</os>
</vm>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<vm><name>vm1</name><cluster><name>default</name></cluster><template><name>Blank</name></template><memory>536870912</memory><os><boot dev='hd'/></os></vm>" https://[RHEVM Host]:8443/api/vms
HTTP/1.1 200 OK
Accept: application/xml
<vm id="6efc0cfa-8495-4a96-93e5-ee490328cf48"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48">
<name>vm1</name>
<actions>
<link rel="shutdown"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/shutdown"/>
<link rel="start"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/start"/>
<link rel="stop"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/stop"/>
<link rel="suspend"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/suspend"/>
<link rel="detach"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/detach"/>
<link rel="export"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/export"/>
<link rel="move"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/move"/>
<link rel="ticket"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/ticket"/>
<link rel="migrate"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/migrate"/>
</actions>
<link rel="disks"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/disks"/>
<link rel="nics"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/nics"/>
<link rel="cdroms"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/cdroms"/>
<link rel="snapshots"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/snapshots"/>
<link rel="tags"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/tags"/>
<link rel="permissions"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/permissions"/>
<link rel="statistics"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/statistics"/>
<type>desktop</type>
<status>
<state>down</state>
</status>
<memory>536870912</memory>
<cpu>
<topology cores="1" sockets="1"/>
</cpu>
<os type="Unassigned">
<boot dev="cdrom"/>
</os>
<high_availability>
<enabled>false</enabled>
<priority>0</priority>
</high_availability>
<display>
<type>spice</type>
<monitors>1</monitors>
</display>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/>
<template id="00000000-0000-0000-0000-000000000000"
href="/api/templates/00000000-0000-0000-0000-000000000000"/>
<start_time>2011-06-15T04:48:02.167Z</start_time>
<creation_time>2011-06-15T14:48:02.078+10:00</creation_time>
<origin>rhev</origin>
<stateless>false</stateless>
<placement_policy>
<affinity>migratable</affinity>
</placement_policy>
<memory_policy>
<guaranteed>536870912</guaranteed>
</memory_policy>
</vm>
rhevm network.
Example 3.14. Create a virtual machine NIC
POST /api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/nics HTTP/1.1
Accept: application/xml
Content-type: application/xml
<nic>
<interface>virtio</interface>
<name>nic1</name>
<network>
<name>rhevm</name>
</network>
</nic>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<nic><name>nic1</name><network><name>rhevm</name></network></nic>" https://[RHEVM Host]:8443/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/nics
Example 3.15. Create a virtual machine storage disk
POST /api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/disks HTTP/1.1
Accept: application/xml
Content-type: application/xml
<disk>
<storage_domains>
<storage_domain id="9ca7cb40-9a2a-4513-acef-dc254af57aac"/>
</storage_domains>
<size>8589934592</size>
<type>system</type>
<interface>virtio</interface>
<format>cow</format>
<bootable>true</bootable>
</disk>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<disk><storage_domains><storage_domain id='9ca7cb40-9a2a-4513-acef-dc254af57aac'/></storage_domains><size>8589934592</size><type>system</type><interface>virtio</interface><format>cow</format><bootable>true</bootable></disk>" https://[RHEVM Host]:8443/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/disks
storage_domain element tells the API to store the disk on the data1 storage domain.
iso1 ISO domain for the virtual machines to use. Red Hat Enterprise Virtualization Platform provides an uploader tool that ensures that the ISO images are uploaded into the correct directory path with the correct user permissions.
files sub-collection to view the file resource:
Example 3.16. View the files sub-collection in an ISO storage domain
GET /api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files HTTP/1.1 Accept: application/xml
curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHEVM Host]:8443/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files
<files>
<file id="rhel-server-6.0-x86_64-dvd.iso"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/
files/rhel-server-6.0-x86_64-dvd.iso.iso">
<name>rhel-server-6.0-x86_64-dvd.iso.iso</name>
<storage_domain id="00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"/>
</file>
</files>
rhel-server-6.0-x86_64-dvd.iso to our example virtual machine.
Example 3.17. Attach an ISO image to the virtual machine
POST /api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/cdroms HTTP/1.1 Accept: application/xml Content-type: application/xml <cdrom> <file id="rhel-server-6.0-x86_64-dvd.iso"/> </cdrom>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<cdrom><file id='rhel-server-6.0-x86_64-dvd.iso'/></cdrom>" https://[RHEVM Host]:8443/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/cdroms
start action.
Example 3.18. Start the virtual machine
POST /api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/start HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<vm>
<os>
<boot dev="cdrom"/>
</os>
</vm>
</action>
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<action><vm><os><boot dev='cdrom'/></os></vm></action>" https://[RHEVM Host]:8443/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/start
disk for all future boots.
start action for the vm1 creates several entries in the events collection. This example lists the events collection and identifies events specific to the API starting a virtual machine.
Example 3.19. List the events collection
GET /api/events HTTP/1.1 Accept: application/xml
curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHEVM Host]:8443/api/events
<events>
...
<event id="103" href="/api/events/103">
<description>User admin logged out.</description>
<code>31</code>
<severity>normal</severity>
<time>2011-06-29T17:42:41.544+10:00</time>
<user id="80b71bae-98a1-11e0-8f20-525400866c73"
href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
</event>
<event id="102" href="/api/events/102">
<description>vm1 was started by admin (Host: hypervisor).</description>
<code>153</code>
<severity>normal</severity>
<time>2011-06-29T17:42:41.499+10:00</time>
<user id="80b71bae-98a1-11e0-8f20-525400866c73"
href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
<vm id="6efc0cfa-8495-4a96-93e5-ee490328cf48"
href="/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48"/>
<host id="0656f432-923a-11e0-ad20-5254004ac988"
href="/api/hosts/0656f432-923a-11e0-ad20-5254004ac988"/>
</event>
<event id="101" href="/api/events/101">
<description>User admin logged in.</description>
<code>30</code>
<severity>normal</severity>
<time>2011-06-29T17:42:40.505+10:00</time>
<user id="80b71bae-98a1-11e0-8f20-525400866c73"
href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
</event>
...
</events>
id="101"- The API authenticates with theadminuser's username and password.id="102"- The API, acting as theadminuser, startsvm1on thehypervisorhost.id="103"- The API logs out of theadminuser account.
GET request on the entry point URI consisting of a host and base.
Example 4.1. Accessing the API Entry Point
www.example.com and the base is /api, the entry point appears with the following request:
GET /api HTTP/1.1
Accept: application/xml
Host: www.example.com
Authorization: [base64 encoded credentials]
HTTP/1.1 200 OK
Content-Type: application/xml
<api>
<link rel="hosts" href="/api/hosts"/>
<link rel="vms" href="/api/vms"/>
...
<product_info>
<name>Red Hat Enterprise Virtualization</name>
<vendor>Red Hat</vendor>
<version revision="0" build="0" minor="0" major="3"/>
</product_info>
<special_objects>
<link rel="templates/blank" href="..."/>
<link rel="tags/root" href="..."/>
</special_objects>
<summary>
<vms>
<total>10</total>
<active>3</active>
</vms>
<hosts>
<total>2</total>
<active>2</active>
</hosts>
<users>
<total>8</total>
<active>2</active>
</users>
<storage_domains>
<total>2</total>
<active>2</active>
</storage_domains>
</summary>
</api>
Note
Host: and Authorization: request headers and assume the base is the default /api path. This base path differs depending on your implementation.
product_info element to help an API user determine the legitimacy of the Red Hat Enterprise Virtualization environment. This includes the name of the product, the vendor and the version.
Example 4.2. Verify a genuine Red Hat Enterprise Virtualization environment
<api>
...
<product_info>
<name>Red Hat Enterprise Virtualization</name>
<vendor>Red Hat</vendor>
<version revision="0" build="0" minor="0" major="3"/>
</product_info>
...
</api>
link elements and URIs for all of the resource collections the API exposes. Each collection uses a relation type to identify the URI a client needs.
Table 4.1. Available Relationship Types
| Relationship | Description |
|---|---|
capabilities
| Supported capabilities of the Red Hat Enterprise Virtualization Manager. |
datacenters
| Data centers. |
clusters
| Host clusters. |
networks
| Virtual networks. |
storagedomains
| Storage domains. |
hosts
| Hosts. |
vms
| Virtual machines. |
templates
| Templates. |
vmpools
| Virtual machine pools. |
domains
| Identity service domains. |
groups
| Imported identity service groups. |
roles
| Roles. |
users
| Users. |
tags
| Tags. |
events
| Events. |

Figure 4.1. The relationship between the API entry point and the resource collections exposed by the API
Note
link element's href attribute, so clients are required to handle either form.
link elements also contain a set of search URIs for certain collections. These URIs use URI templates [4] to integrate search queries. The purpose of the URI template is to accept a search expression using the natural HTTP pattern of a query parameter. The client does not require prior knowledge of the URI structure. Thus clients should treat these templates as being opaque and access them with a URI template library.
"collection/search".
Table 4.2. Relationships associated with search query URIs
| Relationship | Description |
|---|---|
datacenters/search
| Query data centers. |
clusters/search
| Query host clusters. |
storagedomains/search
| Query storage domains. |
hosts/search
| Query hosts. |
vms/search
| Query virtual machines. |
templates/search
| Query templates. |
vmpools/search
| Query virtual machine pools. |
events/search
| Query events. |
users/search
| Query users. |
Table 4.3. Special Objects
| Relationship | Description |
|---|---|
templates/blank
|
The default blank virtual machine template for your virtualization environment. This template exists in every cluster as opposed to a standard template, which only exists in a single cluster.
|
tags/root
|
The root tag that acts a base for tag hierarchy in your virtualization environment.
|
Table 4.4. Summary Elements
| Element | Description |
|---|---|
vms
| Total number of vms and total number of active vms. |
hosts
| Total number of hosts and total number of active hosts. |
users
| Total number of users and total number of active users. |
storage_domains
| Total number of storage domains and total number of active storage domains. |
compatibility level for each host, corresponding to the version of VDSM installed. A version element contains major and minor attributes, which describe the compatibility level.
version level appears under a supported_versions element. This indicates the cluster's version is now updatable to that level. Once the administrator updates all clusters within a data center to a given level, the data center is updatable to that level.
Example 5.1. Upgrading compatibility levels
<host ...>
...
<version major="2" minor="2"/>
...
</host>
<cluster ...>
...
<version major="2" minor="2"/>
<supported_versions/>
...
</cluster>
<data_center ...>
...
<version major="2" minor="2"/>
<supported_versions/>
...
</data_center>
3.0 and the API reports:
<host ...>
...
<version major="3" minor="0"/>
...
</host>
<cluster ...>
...
<version major="2" minor="2"/>
<supported_versions>
<version major="3" minor="0"/>
</supported_versions>
...
</cluster>
<data_center ...>
...
<version major="2" minor="2"/>
<supported_versions/>
...
</data_center>
3.0. When the cluster is updated, the API reports:
<cluster ...>
...
<version major="3" minor="0"/>
<supported_versions/>
...
</cluster>
<data_center ...>
...
<version major="2" minor="2"/>
<supported_versions>
<version major="3" minor="0"/>
</supported_versions>
...
</data_center>
3.0. Once upgraded, the API exposes features available in Red Hat Enterprise Virtualization 3.0 for this data center.
- 6.1. Version-Dependent Capabilities
- 6.1.1. Current Version
- 6.1.2. Features
- 6.1.3. CPUs
- 6.1.4. Power Managers
- 6.1.5. Fence Types
- 6.1.6. Storage Types
- 6.1.7. Storage Domain Types
- 6.1.8. Virtual Machine Types
- 6.1.9. Boot Devices
- 6.1.10. Display Types
- 6.1.11. NIC Interface Types
- 6.1.12. Disk Types
- 6.1.13. OS Types
- 6.1.14. Disk Formats
- 6.1.15. Disk Interfaces
- 6.1.16. Virtual Machine Affinities
- 6.1.17. Custom Properties
- 6.1.18. Boot Protocols
- 6.1.19. Error Handling
- 6.1.20. Storage Formats
- 6.1.21. Resource Status States
- 6.2. Permits
- 6.3. Scheduling Policies
- 6.4. Capabilities Example
capabilities collection provides information about the supported capabilities of a Red Hat Enterprise Virtualization Manager version. These capabilities include active features and available enumerated values for specific properties. An API user accesses this information through the rel="capabilities" link obtained from the entry point URI (see Chapter 4, Entry Point).
capabilities element contains any number of version elements that describe capabilities dependent on a compatibility level.
version element includes attributes for major and minor version numbers. This indicates the current version level, which this document discusses in Chapter 5, Compatibility Level Versions.
3.0 and 2.2 respectively:
<capabilities>
<version major="3" minor="0">
...
</version>
<version major="2" minor="2">
...
</version>
...
</capabilities>
version contains a series of capabilities dependent on the version specified.
Table 6.1. Version-Dependent Capabilities
| Capability Element | Description |
|---|---|
current
|
Signifies if this version most recent supported compatibility level.
|
features
| The list of features the version supports. |
cpus
| List of supported CPU types. |
power_managers
| List of supported fence agents and their configuration options. |
fence_types
| Supported fence actions for hosts. |
storage_types
| Supported storage types for a version. |
storage_domain_types
| List of all domain types. |
vm_types
| List of all virtual machine types. |
boot_devices
| Boot devices for a virtual machine. |
display_types
| Available display protocols for a virtual machine. |
nic_interfaces
| Network interface types for a virtual machine. |
disk_types
| List of storage device types. |
os_types
| List of operating system types. |
disk_formats
| List of storage device formats. |
disk_interfaces
| List of interfaces for storage devices. |
vm_affinities
| Affinities for a host's placement policy. |
custom_properties
| Environment variables for a virtual machine's custom scripts. |
boot_protocols
| List of available protocols for IP assignment. |
error_handling
| Options to determine virtual machine handling when a host in a cluster becomes non-operational. |
storage_formats
| The format versions for storage meta-data. |
current element signifies if the version specified is the most recent supported compatibility level. The value is either a Boolean true or false.
<capabilities>
<version major="3" minor="0">
...
<current>true</current>
...
</version>
</capabilities>
version contains a list of compatible features.
Table 6.2. Feature Types
| Feature Element | Type | Description |
|---|---|---|
transparent_hugepages
| Boolean: true or false | Defines the availability of Transparent Hugepages for hosts. |
<capabilities>
<version major="3" minor="0">
...
<features>
<transparent_hugepages>true</transparent_hugepages>
</features>
...
</version>
</capabilities>
Table 6.3. CPU properties
| Element | Description |
|---|---|
id
| An opaque identifier for the CPU model. |
level
| An indication as to the relative priority/preference for the CPUs in the list. |
<capabilities>
<version major="3" minor="0">
...
<cpus>
<cpu id="Intel Conroe Family">
<level>3</level>
</cpu>
<cpu id="Intel Penryn Family">
<level>4</level>
</cpu>
...
</cpus>
...
</version>
</capabilities>
power_managers for host fencing configuration. Each power_management option contains a set of properties.
Table 6.4. Power Management Properties
| Element | Description |
|---|---|
type
| The supported fencing device type. |
options
|
A list of options available to the supported fencing device. Options include a name and a value type.
|
<capabilities>
<version major="3" minor="0">
...
<power_managers>
<power_management type="alom">
<options>
<option type="bool" name="secure"/>
<option type="int" name="port"/>
</options>
</power_management>
<power_management type="apc">
<options>
<option type="bool" name="secure"/>
<option type="int" name="port"/>
<option type="int" name="slot"/>
</options>
</power_management>
<power_management type="bladecenter">
<options>
<option type="bool" name="secure"/>
<option type="int" name="port"/>
<option type="int" name="slot"/>
</options>
</power_management>
...
</power_managers>
...
</version>
</capabilities>
fence_types element defines fence_type options to fence a host and reduce power usage.
<capabilities>
<version major="3" minor="0">
...
<fence_types>
<fence_type>manual</fence_type>
<fence_type>restart</fence_type>
<fence_type>start</fence_type>
<fence_type>stop</fence_type>
<fence_type>status</fence_type>
</fence_types>
...
</version>
</capabilities>
storage_types element defines the available physical storage_type options.
<capabilities>
<version major="3" minor="0">
...
<storage_types>
<storage_type>iscsi</storage_type>
<storage_type>fcp</storage_type>
<storage_type>nfs</storage_type>
<storage_type>localfs</storage_type>
</storage_types>
...
</version>
</capabilities>
storage_domain_types element shows the available storage_domain_type options a user creates in a virtualization environment.
<capabilities>
<version major="3" minor="0">
...
<storage_domain_types>
<storage_domain_type>data</storage_domain_type>
<storage_domain_type>iso</storage_domain_type>
<storage_domain_type>export</storage_domain_type>
</storage_domain_types>
...
</version>
</capabilities>
vm_types element defines each virtual machine type (vm_type) available for creation in a virtual environment.
<capabilities>
<version major="3" minor="0">
...
<vm_types>
<vm_type>desktop</vm_type>
<vm_type>server</vm_type>
</vm_types>
...
</version>
</capabilities>
boot_devices element lists such boot_device options.
<capabilities>
<version major="3" minor="0">
...
<boot_devices>
<boot_device>cdrom</boot_device>
<boot_device>hd</boot_device>
<boot_device>network</boot_device>
</boot_devices>
...
</version>
</capabilities>
display_types element lists each display_type protocol.
<capabilities>
<version major="3" minor="0">
...
<display_types>
<display_type>vnc</display_type>
<display_type>spice</display_type>
</display_types>
...
</version>
</capabilities>
nic_interfaces element defines the supported NIC types available. Each nic_interface depends on the drivers available for different types of virtual machines. VirtIO drivers are available for Red Hat Enterprise Linux 4.8 and above, and for Windows virtual machines. Windows supports rtl8139 without the need for drivers. Other Linux machines, or earlier versions of Red Hat Enterprise Linux, use e1000 or rtl8139.
<capabilities>
<version major="3" minor="0">
...
<nic_interfaces>
<nic_interface>e1000</nic_interface>
<nic_interface>virtio</nic_interface>
<nic_interface>rtl8139</nic_interface>
<nic_interface>rtl8139_virtio</nic_interface>
</nic_interfaces>
...
</version>
</capabilities>
disk_types element lists the available virtual disk_type options.
<capabilities>
<version major="3" minor="0">
...
<disk_types>
<disk_type>data</disk_type>
<disk_type>system</disk_type>
<disk_types
...
</version>
</capabilities>
os_type value to define the virtual machine operating system. The default is unassigned.
<capabilities>
<version major="3" minor="0">
...
<os_types>
<os_type>unassigned</os_type>
<os_type>windows_xp</os_type>
<os_type>windows_2003</os_type>
<os_type>windows_2008</os_type>
<os_type>other_linux</os_type>
<os_type>other</os_type>
<os_type>rhel_5</os_type>
<os_type>rhel_4</os_type>
<os_type>rhel_3</os_type>
<os_type>windows_2003x64</os_type>
<os_type>windows_7</os_type>
<os_type>windows_7x64</os_type>
<os_type>rhel_5x64</os_type>
<os_type>rhel_4x64</os_type>
<os_type>rhel_3x64</os_type>
<os_type>windows_2008x64</os_type>
<os_type>windows_2008r2x64</os_type>
<os_type>rhel_6</os_type>
<os_type>rhel_6x64</os_type>
<os_types>
...
</version>
</capabilities>
disk_formats element defines the format types. The disk_format types include pre-allocated (raw) or thin-provisioned (Copy-On-Write or cow).
<capabilities>
<version major="3" minor="0">
...
<disk_formats>
<disk_format>cow</disk_format>
<disk_format>raw</disk_format>
</disk_formats>
...
</version>
</capabilities>
disk_interfaces element lists disk_interface options for emulated protocols to interface with virtual disks.
<capabilities>
<version major="3" minor="0">
...
<disk_interfaces>
<disk_interface>ide</disk_interface>
<disk_interface>virtio</disk_interface>
</disk_interfaces>
...
</version>
</capabilities>
vm_affinities element defines each available migration affinity for virtual machines.
<capabilities>
<version major="3" minor="0">
...
<vm_affinities>
<affinity>migratable</affinity>
<affinity>user_migratable</affinity>
<affinity>pinned</affinity>
</vm_affinities>
...
</version>
</capabilities>
custom_properties element lists a set of environment variables for a virtual environment. The virtual environment uses these variables as parameters for event-triggered VDSM scripts. Each custom_property includes attributes for a property name and a regular expression (regexp) to define the format of the property value.
<capabilities>
<version major="3" minor="0">
...
<custom_properties>
<custom_property name="sap_agent" regexp="^(true|false)$"/>
<custom_property name="sndbuf" regexp="^[0-9]+$"/>
<custom_property name="vhost"
regexp="^(([a-zA-Z0-9_]*):(true|false))
(,(([a-zA-Z0-9_]*):(true|false)))*$"/>
<custom_property name="viodiskcache"
regexp="^(none|writeback|writethrough)$"/>
</custom_properties>
...
</version>
</capabilities>
boot_protocol element lists each possible IP assignment boot_protocol for hosts when booting.
<capabilities>
<version major="3" minor="0">
...
<boot_protocols>
<boot_protocol>dhcp</boot_protocol>
<boot_protocol>static</boot_protocol>
</boot_protocols>
...
</version>
</capabilities>
on_error options the in the error_handling element.
<capabilities>
<version major="3" minor="0">
...
<error_handling>
<on_error>migrate</on_error>
<on_error>do_not_migrate</on_error>
<on_error>migrate_highly_available</on_error>
</error_handling>
...
</version>
</capabilities>
storage_formats element lists the available format versions for storage meta-data.
<capabilities>
<version major="3" minor="0">
...
<storage_formats>
<format>v1</format>
<format>v2</format>
</storage_formats>
...
</version>
</capabilities>
version contains a set of states for resource statuses. These resource status elements include creation_states, power_management_states, host_states, host_non_operational_details, network_states, storage_domain_states, template_states, vm_states, vm_pause_details, disk_states, host_nic_states, and data_center_states.
permit contains a set of properties.
Table 6.5. Permit properties
| Element | Type | Description |
|---|---|---|
id=
| integer | The opaque identifier for a permit. |
name
| string | The name of the permit. |
administrative
| Boolean: true or false | The permit is assigned to only administrative roles. |
<capabilities>
...
<permits>
<permit id="1">
<name>create_vm</name>
<administrative>false</administrative>
</permit>
<permit id="2">
<name>delete_vm</name>
<administrative>false</administrative>
</permit>
...
</permits>
...
</capabilities>
scheduling_policies element defines the load-balancing and power sharing modes for hosts in the cluster.
<capabilities>
...
<scheduling_policies>
<policy>evenly_distributed</policy>
<policy>power_saving</policy>
</scheduling_policies>
...
</capabilities>
capabilities.
Example 6.1. XML representation of capabilities
GET /api/capabilities HTTP/1.1 Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<capabilities>
<version minor="0" major="3">
<current>true</current>
<features>
<transparent_hugepages/>
</features>
<cpus>
<cpu id="Intel Conroe Family">
<level>3</level>
</cpu>
<cpu id="Intel Penryn Family">
<level>4</level>
</cpu>
<cpu id="Intel Nehalem Family">
<level>5</level>
</cpu>
<cpu id="Intel Westmere Family">
<level>6</level>
</cpu>
<cpu id="AMD Opteron G1">
<level>2</level>
</cpu>
<cpu id="AMD Opteron G2">
<level>3</level>
</cpu>
<cpu id="AMD Opteron G3">
<level>4</level>
</cpu>
</cpus>
<power_managers>
<power_management type="alom">
<options>
<option type="bool" name="secure"/>
<option type="int" name="port"/>
</options>
</power_management>
<power_management type="apc">
<options>
<option type="bool" name="secure"/>
<option type="int" name="port"/>
<option type="int" name="slot"/>
</options>
</power_management>
<power_management type="bladecenter">
<options>
<option type="bool" name="secure"/>
<option type="int" name="port"/>
<option type="int" name="slot"/>
</options>
</power_management>
...
</power_managers>
<fence_types>
<fence_type>manual</fence_type>
<fence_type>restart</fence_type>
<fence_type>start</fence_type>
<fence_type>stop</fence_type>
<fence_type>status</fence_type>
</fence_types>
<storage_types>
<storage_type>iscsi</storage_type>
<storage_type>fcp</storage_type>
<storage_type>nfs</storage_type>
<storage_type>localfs</storage_type>
</storage_types>
<storage_domain_types>
<storage_domain_type>data</storage_domain_type>
<storage_domain_type>iso</storage_domain_type>
<storage_domain_type>export</storage_domain_type>
</storage_domain_types>
<vm_types>
<vm_type>desktop</vm_type>
<vm_type>server</vm_type>
</vm_types>
<boot_devices>
<boot_device>cdrom</boot_device>
<boot_device>hd</boot_device>
<boot_device>network</boot_device>
</boot_devices>
<display_types>
<display_type>vnc</display_type>
<display_type>spice</display_type>
</display_types>
<nic_interfaces>
<nic_interface>e1000</nic_interface>
<nic_interface>virtio</nic_interface>
<nic_interface>rtl8139</nic_interface>
<nic_interface>rtl8139_virtio</nic_interface>
</nic_interfaces>
<disk_types>
<disk_type>data</disk_type>
<disk_type>system</disk_type>
</disk_types>
<os_types>
<os_type>unassigned</os_type>
<os_type>windows_xp</os_type>
<os_type>windows_2003</os_type>
<os_type>windows_2008</os_type>
<os_type>other_linux</os_type>
<os_type>other</os_type>
<os_type>rhel_5</os_type>
<os_type>rhel_4</os_type>
<os_type>rhel_3</os_type>
<os_type>windows_2003x64</os_type>
<os_type>windows_7</os_type>
<os_type>windows_7x64</os_type>
<os_type>rhel_5x64</os_type>
<os_type>rhel_4x64</os_type>
<os_type>rhel_3x64</os_type>
<os_type>windows_2008x64</os_type>
<os_type>windows_2008r2x64</os_type>
<os_type>rhel_6</os_type>
<os_type>rhel_6x64</os_type>
</os_types>
<disk_formats>
<disk_format>cow</disk_format>
<disk_format>raw</disk_format>
</disk_formats>
<disk_interfaces>
<disk_interface>ide</disk_interface>
<disk_interface>virtio</disk_interface>
</disk_interfaces>
<vm_affinities>
<affinity>migratable</affinity>
<affinity>user_migratable</affinity>
<affinity>pinned</affinity>
</vm_affinities>
<custom_properties>
<custom_property regexp="^(true|false)$" name="sap_agent"/>
<custom_property regexp="^[0-9]+$" name="sndbuf"/>
<custom_property
regexp="^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$" name="vhost"/>
<custom_property
regexp="^(none|writeback|writethrough)$" name="viodiskcache"/>
</custom_properties>
<boot_protocols>
<boot_protocol>dhcp</boot_protocol>
<boot_protocol>static</boot_protocol>
</boot_protocols>
<error_handling>
<on_error>migrate</on_error>
<on_error>do_not_migrate</on_error>
<on_error>migrate_highly_available</on_error>
</error_handling>
<storage_formats>
<format>v1</format>
<format>v2</format>
</storage_formats>
</version>
...
<permits>
<permit id="1">
<name>create_vm</name>
<administrative>false</administrative>
</permit>
<permit id="2">
<name>delete_vm</name>
<administrative>false</administrative>
</permit>
<permit id="3">
<name>edit_vm_properties</name>
<administrative>false</administrative>
</permit>
<permit id="4">
<name>vm_basic_operations</name>
<administrative>false</administrative>
</permit>
...
</permits>
<scheduling_policies>
<policy>evenly_distributed</policy>
<policy>power_saving</policy>
</scheduling_policies>
</capabilities>
Note
Table 7.1. Element property icons
| Property | Description | Icon |
|---|---|---|
| Required for creation | These elements must be included in the client-provided representation of a resource on creation, but are not mandatory for an update of a resource. |
|
| Non-updateable | These elements cannot have their value changed when updating a resource. Include these elements in a client-provided representation on update only if their values are not altered by the API user. If altered, the API reports an error. |
|
| Read-only | These elements are read-only. Values for read-only elements are not created or modified. |
|
<resource id="resource_id" href="/api/collection/resource_id">
<name>Resource-Name</name>
<description>A description of the resource</description>
...
</resource>
In the context of a virtual machine, the representation appears as follows:
<vm id="5b9bbce5-0d72-4f56-b931-5d449181ee06"
href="/api/vms/5b9bbce5-0d72-4f56-b931-5d449181ee06">
<name>RHEL6-Machine</name>
<description>Red Hat Enterprise Linux 6 Virtual Machine</description>
...
</vm>
Table 7.2. Common attributes to resource representations
| Attribute | Type | Description | Properties |
|---|---|---|---|
id
| GUID |
Each resource in the virtualization infrastructure contains an id, which acts as a globally unique identifier (GUID). The GUID is the primary method of resource identification.
|
|
href
| string | The canonical location of the resource as an absolute path. |
|
Table 7.3. Common elements to resource representations
| Element | Type | Description | Properties |
|---|---|---|---|
name
| string |
A user-supplied human readable name for the resource. The name is unique across all resources of its type.
|
|
description
| string | A free-form user-supplied human readable description of the resource. |
GET request on the collection URI obtained from the entry point.
GET /api/collection HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<collection>
<resource id="resource_id" href="/api/collection/resource_id">
<name>Resource-Name</name>
<description>A description of the resource</description>
...
</resource>
...
</collection>
Accept header includes the detail parameter.
GET /api/collection HTTP/1.1 Accept: application/xml; detail=subcollection
detail parameters:
GET /api/collection HTTP/1.1 Accept: application/xml; detail=subcollection1; detail=subcollection2
detail parameter that separates the sub-collection with the + operator:
GET /api/collection HTTP/1.1 Accept: application/xml; detail=subcollection1+subcollection2+subcollection3
Table 7.4. Collections that use extended sub-collections
| Collection | Extended Sub-Collection Support |
|---|---|
hosts
|
statistics
|
vms
|
statistics, nics, disks
|
Example 7.1. An request for extended statistics, nics and disks sub-collections in the vms collection
GET /api/vms HTTP/1.1 Accept: application/xml; detail=statistics+nics+disks
GET request on a "collection/search" link results in a search query of that collection. The API only returns resources within the collection that satisfy the search query constraints.
GET /api/collection?search={query} HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<collection>
<resource id="resource_id" href="/api/collection/resource_id">
...
</resource>
...
</collection>
query with a GET request:
GET /api/collection?search={query} HTTP/1.1
Accept: application/xml
query template value refers to the search query the API directs to the collection. This query uses the same format as Red Hat Enterprise Virtualization Manager search query language:
(criteria) [sortby (element) asc|desc]
sortby clause is optional and only needed when ordering results.
Table 7.5. Example search queries
| Collection | Criteria | Result |
|---|---|---|
hosts
|
vms.status=up
|
Displays a list of all hosts running virtual machines that are up.
|
vms
|
domain=qa.company.com
| Displays a list of all virtual machines running on the specified domain. |
vms
|
users.name=mary
|
Displays a list of all virtual machines belonging to users with the username mary.
|
events
|
severity>normal sortby time
|
Displays the list of all events with severity higher than normal and sorted by the time element values.
|
events
|
severity>normal sortby time desc
|
Displays the list of all events with severity higher than normal and sorted by the time element values in descending order.
|
query template to be URL-encoded to translate reserved characters, such as operators and spaces.
Example 7.2. URL-encoded search query
GET /api/vms?search=name%3Dvm1 HTTP/1.1 Accept: application/xml
Important
Example 7.3. Wildcard search query for name=vm*
GET /api/vms?search=name%3Dvm* HTTP/1.1 Accept: application/xml
vm, such as vm1, vm2, vma or vm-webserver.
Example 7.4. Wildcard search query for name=v*1
GET /api/vms?search=name%3Dv*1 HTTP/1.1 Accept: application/xml
v and ending with 1, such as vm1, vr1 or virtualmachine1.
page command.
Example 7.5. Paginating resources
GET /api/collection?search=page%201 HTTP/1.1 Accept: application/xml
page value to view the next page of results.
GET /api/collection?search=page%202 HTTP/1.1 Accept: application/xml
page command also in conjunction with other commands in a search query. For example:
GET /api/collection?search=sortby%20element%20asc%20page%202 HTTP/1.1 Accept: application/xml
POST request to the collection URI containing a representation of the new resource.
POST request requires a Content-Type: application/xml header. This informs the API of the XML representation in the body content as part of the request.
fault representation indicating the missing elements.
POST /api/collection HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<resource>
<name>Resource-Name</name>
</resource>
HTTP/1.1 201 Created
Content-Type: application/xml
<resource id="resource_id" href="/api/collection/resource_id">
<name>Resource-Name</name>
...
</resource>
Location header in the response gives the URI of the queried resource. The response body contains either a complete representation, partial representation or no representation of the resource. It is recommended that clients rely only on fetching the representation via the URI in the response header.
POST requests unless the user overrides them with a Expect: 201-created header.
202 Accepted status. The initial document structure for a 202 Accepted resource also contains a creation_status element and link for creation status updates. For example:
POST /api/collection HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<resource>
<name>Resource-Name</name>
</resource>
HTTP/1.1 202 Accepted
Content-Type: application/xml
<resource id="resource_id" href="/api/collection/resource_id">
<name>Resource-Name</name>
<creation_status>
<state>pending</state>
</creation status>
<link rel="creation_status"
href="/api/collection/resource_id/creation_status/creation_status_id"/>
...
</resource>
GET request to the creation_status link provides a creation status update:
GET /api/collection/resource_id/creation_status/creation_status_id HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<creation id="creation_status_id"
href="/api/collection/resource_id/creation_status/creation_status_id">
<status>
<state>complete</state>
</status>
</creation>
Expect: 201-created header:
POST /api/collection HTTP/1.1
Accept: application/xml
Content-Type: application/xml
Expect: 201-created
<resource>
<name>Resource-Name</name>
</resource>
GET request on a URI obtained from a collection listing.
GET /api/collection/resource_id HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<resource id="resource_id" href="/api/collection/resource_id">
...
</resource>
PUT request containing an updated description from a previous GET request for the resource URI. Details on modifiable properties are found in the individual resource type documentation.
PUT request requires a Content-Type: application/xml header. This informs the API of the XML representation in the body content as part of the request.
PUT /api/collection/resource_id HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<resource>
<name>New-Resource-Name</name>
</resource>
HTTP/1.1 200 OK
Content-Type: application/xml
<resource id="resource_id" href="/api/collection/resource_id">
<name>New-Resource-Name</name>
...
</resource>
409 Conflict error with a fault representation in the response body.
DELETE request sent to its URI.
DELETE /api/collection/resource_id HTTP/1.1 Accept: application/xml HTTP/1.1 204 No Content
DELETE request to specify additional properties. A DELETE request with optional body content requires a Content-Type: application/xml header to inform the API of the XML representation in the body content. If a DELETE request contains no body content, omit the Content-Type: application/xml header.
- 1:N mappings, where mapped resources are dependent on a parent resources. Without the parent resource, the dependent resource cannot exist. For example, the link between a virtual machine and its disk resources.
- 1:N mappings, where mapped resources exist independently from parent resources but data is still associated with the relationship. For example, the link between a network and a cluster.
- N:M mappings, where one mapped resources only belongs to one parent resource. For example, the link between a storage domain and a data center.
link rel= attribute:
GET /api/collection/resource_id HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<resource id="resource_id" href="/api/collection/resource_id">
...
<link rel="subcollection"
href="/api/collection/resource_id/subcollection"/>
...
</resource>
GET /api/collection/resource_id/subcollection HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<subcollection>
<subresource id="subresource_id"
href="/api/collection/resource_id/subcollection/subresource_id">
...
</subresource>
...
</subcollection>
- Backlinks from a resource in a sub-collection to a parent resource; or
- Links between resources with an arbitrary relationship.
Example 7.6. Backlinking from a sub-collection resource to a resource using an XML element
GET /api/collection/resource_id/subcollection/subresource_id HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/xml
<subcollection>
<subresource id="subresource_id"
href="/api/collection/resource_id/subcollection/subresource_id">
<resource id="resource_id" href="/api/collection/resource_id"/>
...
</subresource>
</subcollection>
<resource>
...
<actions>
<link rel="start" href="/api/collection/resource_id/start"/>
<link rel="stop" href="/api/collection/resource_id/stop"/>
...
</actions>
...
</resource>
POST request to the supplied URI. The body of the POST requires an action representation encapsulating common and task-specific parameters.
Table 7.6. Common action parameters
| Element | Description |
|---|---|
async
|
true if the server responds immediately with 202 Accepted and an action representation contains a href link to be polled for completion.
|
grace_period
| a grace period in milliseconds, which must expire before the action is initiated. |
fault response.
Content-Type: application/xml header since the POST request requires an XML representation in the body content.
202 Accepted response provides a link to monitor the status of the task:
POST /api/collection/resource_id/action HTTP/1.1
Content-Type: application/xml
Accept: application/xml
<action>
<async>true</async>
</action>
HTTP/1.1 202 Accepted
Content-Type: application/xml
<action id="action_id"
href="/api/collection/resource_id/action/action_id">
<async>true</async>
...
<action>
GET on the action URI provides an indication of the status of the asynchronous task.
Table 7.7. Action statuses
| Status | Description |
|---|---|
pending
| Task has not yet started. |
in_progress
| Task is in operation. |
complete
| Task completed successfully. |
failed
|
Task failed. The returned action representation would contain a fault describing the failure.
|
GETs are 301 Moved Permanently redirected back to the target resource.
GET /api/collection/resource_id/action/action_id HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<action id="action_id"
href="/api/collection/resource_id/action/action_id">
<status>
<state>pending</state>
</status>
<link rel="parent" /api/collection/resource_id"/>
<link rel="replay" href="/api/collection/resource_id/action"/>
<action>
rel attribute:
Table 7.8. Action relationships
| Type | Description |
|---|---|
parent
| A link back to the resource of this action. |
replay
| A link back to the original action URI. POSTing to this URI causes the action to be re-initiated. |
permissions sub-collection. Each permission contains a user, an assigned role and the specified resource. For example:
GET /api/collection/resource_id/permissions HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<permissions>
<permission id="permission-id"
href="/api/collection/resource_id/permissions/permission_id">
<role id="role_id" href="/api/roles/role_id"/>
<user id="user_id" href="/api/users/user_id"/>
<resource id="resource_id" href="/api/collection/resource_id"/>
</permission>
...
</permissions>
POST request with a permission representation and a Content-Type: application/xml header to the resource's permissions sub-collection. Each new permission requires a role and a user:
POST /api/collection/resource_id/permissions HTTP/1.1
Content-Type: application/xml
Accept: application/xml
<permission>
<role id="role_id"/>
<user id="user_id"/>
</permission>
HTTP/1.1 201 Created
Content-Type: application/xml
<permission id="permission_id"
href="/api/resources/resource_id/permissions/permission_id">
<role id="role_id" href="/api/roles/role_id"/>
<user id="user_id" href="/api/users/user_id"/>
<resource id="resource_id" href="/api/collection/resource_id"/>
</permission>
fault representation in the response entity body. The fault contains a reason and detail strings. Clients must accomodate failed requests via extracting the fault or the expected resource representation depending on the response status code. Such cases are clearly indicated in the individual resource documentation.
PUT /api/collection/resource_id HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<resource>
<id>id-update-test</id>
</resource>
HTTP/1.1 409 Conflict
Content-Type: application/xml
<fault>
<reason>Broken immutability constraint</reason>
<detail>Attempt to set immutable field: id</detail>
</fault>
datacenters collection provides information about the data centers in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="datacenters" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 8.1. Data center elements
| Element | Type | Description | Properties |
|---|---|---|---|
link rel="storagedomains"
| relationship | A link to the sub-collection for storage domains attached to this data center. | |
link rel="permissions"
| relationship | A link to the sub-collection for data center permissions. See Section 7.3.7, “ Permissions ”. | |
storage_type
| enumerated |
Describes the storage type in this datacenter. A list of enumerated values is available in capabilities. See Section 6.1.6, “Storage Types”.
|
|
storage_format
| enumerated |
Describes the storage format version for the data center. A list of enumerated values are available in capabilities. See Section 6.1.20, “Storage Formats”.
|
|
version major= minor=
| complex | The compatibility level of the data center. See Chapter 5, Compatibility Level Versions. |
|
supported_versions
| complex |
A list of possible version levels for the data center. See Chapter 5, Compatibility Level Versions.
|
|
status
| see below | The data center status. |
|
status contains one of the following enumerative values: uninitialized, up, maintenance, not_operational, problematic and contend. These states are listed in data_center_states under capabilities (See Section 6.1.21, “Resource Status States”).
Example 8.1. An XML representation of a data center
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988">
<name>Default</name>
<description>The default Data Center</description>
<link rel="storagedomains"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/
storagedomains"/>
<link rel="permissions"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/permissions"/>
<storage_type>nfs</storage_type>
<storage_format>v1</storage_format>
<version minor="0" major="3"/>
<supported_versions>
<version minor="0" major="3"/>
</supported_versions>
<status>
<state>up</state>
</status>
</data_center>
name, storage_type and version elements. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 8.2. Creating a data center
POST /api/datacenters HTTP/1.1
Accept: application/xml
Content-type: application/xml
<data_center>
<name>NewDatacenter</name>
<storage_type>nfs</storage_type>
<version minor="0" major="3"/>
</data_center>
name and description elements are updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 8.3. Updating a data center
PUT /api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<data_center>
<name>UpdatedName</name>
<description>An updated description for the data center</description>
</data_center>
DELETE request.
Example 8.4. Removing a data center
DELETE /api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988 HTTP/1.1 HTTP/1.1 204 No Content
status and set of actions. States for the status element are listed in storage_domain_states under capabilities (See Section 6.1.21, “Resource Status States”)
Important
POSTs to the data center's storage domains sub-collection.
id or name must be supplied. An example of attaching a storage domain to a data center:
Example 8.5. Attach a storage domain to a data center
POST /api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed"/>
HTTP/1.1 201 Created
Location: /datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed
Content-Type: application/xml
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed"
href="/api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains/
fabe0451-701f-4235-8f7e-e20e458819ed">
<name>images0</name>
<type>data</type>
<status>
<state>inactive</state>
</status>
<master>true</master>
<storage>
<type>nfs</type>
<address>172.31.0.6</address>
<path>/exports/RHEVX/images/0</path>
</storage>
<data_center id="d70d5e2d-b8ad-494a-a4d2-c7a5631073c4"
href="/api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4"/>
<actions>
<link rel="activate"
href="/api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/
storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/activate"/>
<link rel="deactivate"
href="/api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/
storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/deactivate"/>
</actions>
</storage_domain>
activate and deactivate.
Example 8.6. Action to active a storage domain on a datacenter
POST /api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/activate HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
Example 8.7. Action to deactivate a storage domain on a datacenter
POST /api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/deactivate HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
force action to help with these situations.
DELETE method. The request body contains an action representation with the force parameter set to true. The request also requires an additional Content-type: application/xml header to process the XML representation in the body.
Example 8.8. Force remove action on a data center
DELETE /api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988 HTTP/1.1 Accept: application/xml Content-type: application/xml <action> <force>true</force> </action>
- Deletes all database information for
datastorage domains associated the data center; - Deletes all database information for resources, such as virtual machines and templates, on
datastorage domains associated the data center; - Detaches
isoandexportstorage domains from the data center; and - Deletes the database information for the data center.
Important
data storage domains associated with the data center require manual format before reuse. Metadata for iso and export domains require manual cleaning prior to use on another data center.
clusters collection provides information about host clusters in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="clusters" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 9.1. Host cluster elements
| Element | Type | Description | Properties |
|---|---|---|---|
link rel="networks"
| relationship | A link to the sub-collection for networks associated with this cluster. | |
link rel="permissions"
| relationship | A link to the sub-collection for cluster permissions. See Section 7.3.7, “ Permissions ”. | |
cpu id=
| complex | A server CPU reference that defines the CPU type all hosts must support in the cluster. See Section 6.1.3, “CPUs”. |
|
data_center id=
| GUID | A reference to the data center membership of this cluster. See Chapter 8, Data Centers. |
|
memory_policy
| complex | Defines the cluster's policy on host memory utilization. See Table 9.2, “Memory policy elements”. |
|
scheduling_policy
| complex | Defines the load-balancing or power sharing modes for hosts in the cluster. See Table 9.3, “Scheduling policy elements”. |
|
version major= minor=
| complex | The compatibility level of the cluster. See Chapter 5, Compatibility Level Versions. |
|
supported_versions
| complex |
A list of possible version levels for the cluster. See Chapter 5, Compatibility Level Versions.
|
|
error_handling
| complex/enumerated |
Defines virtual machine handling when a host within a cluster becomes non-operational. Requires a single on_error element containing an enumerated type property listed in capabilities. See Section 6.1.19, “Error Handling”.
|
memory_policy element contains the following elements:
Table 9.2. Memory policy elements
| Element | Type | Description | Properties |
|---|---|---|---|
overcommit percent=
| complex |
The percentage of host memory allowed in use before no more virtual machines can start on a host. Virtual machines can use more than the available host memory due to memory sharing under KSM. Recommended values include 100 (None), 150 (Server Load) and 200 (Desktop Load).
|
|
transparent_hugepages
| complex |
Define the enabled status of Transparent Hugepages. The status is either true or false. Check capabilities feature set (see Section 6.1.2, “Features”) to ensure your version supports transparent hugepages.
|
|
scheduling_policy element contains the following elements:
Table 9.3. Scheduling policy elements
| Element | Type | Description | Properties |
|---|---|---|---|
policy
| enumerated |
The VM scheduling mode for hosts in the cluster. A list of enumerated types are listed in capabilities. See Section 6.3, “Scheduling Policies”.
|
|
thresholds low= high= duration=
| complex |
Defines CPU limits for the host. The high attribute controls the highest CPU usage percentage the host can have before being considered overloaded. The low attribute controls the lowest CPU usage percentage the host can have before being considered underutilized. The duration attribute refers to the number of seconds the host needs to be overloaded before the scheduler starts and moves the load to another host.
|
|
Example 9.1. An XML representation of a host cluster
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95">
<name>Default</name>
<description>The default server cluster</description>
<link rel="networks"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks"/>
<link rel="permissions"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/permissions"/>
<cpu id="Intel Penryn Family"/>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988"/>
<memory_policy>
<overcommit percent="100"/>
<transparent_hugepages>
<enabled>false</enabled>
</transparent_hugepages>
</memory_policy>
<scheduling_policies>
<policy>evenly_distributed</policy>
<thresholds low="10" high="75" duration="120"/>
</scheduling_policies>
<version minor="0" major="3"/>
<supported_versions>
<version minor="0" major="3"/>
</supported_versions>
<error_handling>
<on_error>migrate</on_error>
</error_handling>
</cluster>
name, cpu id= and datacenter elements. Identify the datacenter with either the id attribute or name element. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 9.2. Creating a host cluster
POST /api/clusters HTTP/1.1
Accept: application/xml
Content-type: application/xml
<cluster>
<name>cluster1</name>
<cpu id="Intel Penryn Family"/>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"/>
</cluster>
name, description, cpu id= and error_handling elements are updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 9.3. Updating a host cluster
PUT /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<cluster>
<description>Cluster 1</description>
</cluster>
DELETE request.
Example 9.4. Removing a cluster
DELETE /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95 HTTP/1.1 HTTP/1.1 204 No Content
networks sub-collection. Every host within a cluster connects to these associated networks.
network sub-collection is the same as a standard network resource with an additional cluster id= to signify a relationship to the cluster and a display element to represent the display network status in the cluster.
networks sub-collection as described in Chapter 7, Common Features. POSTing a network id or name reference to the networks sub-collection associates the network with the cluster.
Example 9.5. Associating a network resource with a cluster
POST /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<network>
<name>rhevm</name>
</network>
HTTP/1.1 201 Created
Location: http://{host}/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks/da05ac09-00be-45a1-b0b5-4a6a2438665f
Content-Type: application/xml
<network id="da05ac09-00be-45a1-b0b5-4a6a2438665f"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks/
da05ac09-00be-45a1-b0b5-4a6a2438665f">
<name>rhevm</name>
<status>
<state>operational</state>
</status>
<description>Display Network</description>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/>
<data_center id="d70d5e2d-b8ad-494a-a4d2-c7a5631073c4"
href="/api/datacenters/d70d5e2d-b8ad-494a-a4d2-c7a5631073c4"/>
<display>true</display>
</network>
PUT request to specify the Boolean value (true or false) of the display element.
Example 9.6. Setting the display network status
PUT /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks/da05ac09-00be-45a1-b0b5-4a6a2438665f HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<network>
<display>false</display>
</network>
DELETE request to the appropriate element in the collection.
Example 9.7. Removing a network association from a cluster
DELETE /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks/da05ac09-00be-45a1-b0b5-4a6a2438665f HTTP/1.1 HTTP/1.1 204 No Content
networks collection provides information about the logical networks in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="networks" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 10.1. Network elements
| Element | Type | Description | Properties |
|---|---|---|---|
data_center id=
| GUID | A reference to the data center of which this cluster is a member. See Chapter 8, Data Centers. |
|
vlan id=
| integer | A VLAN tag. | |
stp
| Boolean: true or false |
true if Spanning Tree Protocol is enabled on this network.
| |
status
|
One of operational or non_operational
|
The status of the network. These states are listed in network_states under capabilities (See Section 6.1.21, “Resource Status States”).
|
|
Example 10.1. An XML representation of a network resource
<network id="00000000-0000-0000-0000-000000000009"
href="/api/networks/00000000-0000-0000-0000-000000000009">
<name>rhevm</name>
<description>Management Network</description>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"
href="/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988"/>
<stp>false</stp>
<status>
<state>operational</status>
</status>
<display>false</display>
</network>
name and datacenter elements. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 10.2. Creating a network resource
POST /api/networks HTTP/1.1
Accept: application/xml
Content-type: application/xml
<network>
<name>network 1</name>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"/>
</network>
name, description, ip, vlan, stp and display elements are updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 10.3. Updating a network resource
PUT /api/networks/e6575a87-377c-4f67-9c1b-7b94eff76b17 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<network>
<description>Network 1</description>
</network>
DELETE request.
Example 10.4. Removing a network
DELETE /api/networks/e6575a87-377c-4f67-9c1b-7b94eff76b17 HTTP/1.1 HTTP/1.1 204 No Content
Important
storagedomains collection provides information about the storage domains in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="storagedomains" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 11.1. Storage domain elements
| Element | Type | Description | Properties |
|---|---|---|---|
link rel="permissions"
| relationship | A link to the sub-collection for storage domain permissions. See Section 7.3.7, “ Permissions ”. | |
link rel="files"
| relationship |
A link to the files sub-collection for this storage domains.
| |
link rel="vms"
| relationship |
A link to the vms sub-collection for a storage domain with type set to export.
| |
link rel="templates"
| relationship |
A link to the templates sub-collection for a storage domain with type set to export.
| |
type
| enumerated |
The storage domain type. A list of enumerated values are available in capabilities. See Section 6.1.7, “Storage Domain Types”.
|
|
master
| Boolean: true or false |
true if this is the master storage domain of a data center.
|
|
host
| complex | A reference to the host on which this storage domain should be initialized. The only restriction on this host is that it should have access to the physical storage specified. |
|
storage
| complex | Describes the underlying storage of the storage domain. For more information see Section 11.1, “ Storage types ”. |
|
available
| integer | Space available in bytes. |
|
used
| integer | Space used in bytes. |
|
committed
| integer | Space committed in bytes. |
|
storage_format
| enumerated |
Describes the storage format version for the storage domain. A list of enumerated values are available in capabilities. See Section 6.1.20, “Storage Formats”.
|
|
Example 11.1. An XML representation of a storage domain
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed"
href="/api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed">
<name>data0</name>
<link rel="permissions"
href="/api/storagedomains/be24cd98-8e23-49c7-b425-1a12bd12abb0/permissions"/>
<link rel="files"
href="/api/storagedomains/be24cd98-8e23-49c7-b425-1a12bd12abb0/files"/>
<type>data</type>
<master>true</master>
<storage>
<type>nfs</type>
<address>172.31.0.6</address>
<path>/exports/RHEVX/images/0</path>
</storage>
<available>156766306304</available>
<used>433791696896</used>
<committed>617401548800</committed>
<storage_format>v1</storage_format>
</storage_domain>
name, type, host and storage elements. Identify the host element with the id attribute or name element. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 11.2. Creating a storage domain
POST /api/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
<storage_domain>
<name>data1</name>
<type>data</type>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
<storage>
<type>nfs</type>
<address>172.31.0.6</address>
<path>/exports/RHEVX/images/0</path>
</storage>
</storage_domain>
name element is updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 11.3. Updating a storage domain
PUT /api/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
<storage_domain>
<name>data2</name>
...
</storage_domain>
DELETE request.
Example 11.4. Removing a storage domain
DELETE /api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed HTTP/1.1 HTTP/1.1 204 No Content
Important
storage element contains a type element, which is an enumerated value found under the capabilities collection. See Section 6.1.6, “Storage Types”.
type. The next few section examine these additional storage type elements.
nfs specific elements in a storage description.
Table 11.2. NFS specific elements
| Element | Type | Description | Properties |
|---|---|---|---|
address
| string | The host name or IP address of the NFS server. |
|
path
| string | The path of NFS mountable directory on the server. |
|
iscsi and fcp specific elements in a storage description.
Table 11.3. iSCSI and FCP specific elements
| Element | Type | Description | Properties |
|---|---|---|---|
logical_unit id=
| complex |
The id of the logical unit. A storage domain also accepts multiple iSCSI or FCP logical units.
|
|
logical_unit contains a set of sub-elements.
Table 11.4. Logical unit elements
| Element | Type | Description | Properties |
|---|---|---|---|
address
| string | The address of the server containing the storage device. |
|
port
| integer | The port number of the server. |
|
target
| string | The target IQN for the storage device. |
|
username
| string | A CHAP user name for logging into a target. |
|
password
| string | A CHAP password for logging into a target. |
|
serial
| string | The serial ID for the target. |
|
vendor_id
| string | The vendor name for the target. |
|
product_id
| string | The product code for the target. |
|
lun_mapping
| integer | The Logical Unit Number device mapping for the target. |
|
logical_unit description also contains details of the iSCSI target with the LUN in question, the target performs an automatic login when the storage domain is created.
localfs specific elements in a storage description are:
Table 11.5. Localfs specific elements
| Element | Type | Description | Properties |
|---|---|---|---|
path
| string | The path of local storage domain on the host. |
|
localfs storage domain requires a data center with storage_type set to localfs (see Chapter 8, Data Centers). This data center only contains a single host cluster, and the host cluster only contains a single host.
type set to export contain vms and templates sub-collections, which list the import candidate VMs and templates stored on that particular storage domain.
Example 11.5. Listing the virtual machines sub-collection of an export storage domain
GET /api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/vms
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<vms>
<vm id="082c794b-771f-452f-83c9-b2b5a19c0399"
href="/api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/
vms/082c794b-771f-452f-83c9-b2b5a19c0399">
<name>vm1</name>
...
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed"
href="/api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed"/>
<actions>
<link rel="import" href="/api/storagedomains/
fabe0451-701f-4235-8f7e-e20e458819ed/vms/
082c794b-771f-452f-83c9-b2b5a19c0399/import"/>
</actions>
</vm>
</vms>
storage_domain reference and an import action.
import action imports a virtual machine or a template from an export storage domain. The destination cluster and storage domain is specified with cluster and storage_domain references.
Example 11.6. Action to import a virtual machine from an export storage domain
POST /api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/vms/
082c794b-771f-452f-83c9-b2b5a19c0399/import HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<storage_domain>
<name>images0</name>
</storage_domain>
<cluster>
<name>Default</name>
</cluster>
</action>
Example 11.7. Action to import a template from an export storage domain
POST /api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/templates/
082c794b-771f-452f-83c9-b2b5a19c0399/import HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<storage_domain>
<name>images0</name>
</storage_domain>
<cluster>
<name>Default</name>
</cluster>
</action>
export storage domain with a DELETE request.
Example 11.8. Delete virtual machine from an export storage domain
DELETE /api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed/vms/ 082c794b-771f-452f-83c9-b2b5a19c0399 HTTP/1.1 Accept: application/xml HTTP/1.1 204 No Content
files sub-collection under each storage domain provides a way for clients to list available files. This sub-collection is specifically targeted to ISO storage domains, which contain ISO images and virtual floppy disks (VFDs) that an administrator uploads through Red Hat Enterprise Virtualization Manager.
files sub-collection of an ISO storage domain.
Example 11.9. Listing the files sub-collection of an ISO storage domain
GET /api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<files>
<file id="en_winxp_pro_with_sp2.iso"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files/
en_winxp_pro_with_sp2.iso">
<name>en_winxp_pro_with_sp2.iso</name>
<type>iso</type>
<storage_domain id="00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"/>
</file>
<file id="boot.vfd"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files/
boot.vfd">
<name>boot.vfd</name>
<type>vfd</type>
<storage_doman id="00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"
href="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"/>
</file>
</files>
id and href attributes. The name element contains the filename.
name is not specified.
Example 11.10. Importing an existing export storage domain
POST /api/storagedomains HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<storage_domain>
<type>export</type>
<storage>
<type>nfs</type>
<address>172.31.0.6</address>
<path>/exports/RHEVX/export-domain</path>
</storage>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
</storage_domain>
HTTP/1.1 201 Created
Content-Type: application/xml
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed"
href="/api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed">
<name>export1</name>
...
</storage_domain>
storage_domain reference is passed in the body of a DELETE request for a storage domain. The storage_domain reference is in the following form:
<storage_domain>
<host id="..."/>
</storage_domain>
<storage_domain>
<host>
<name>...</name>
</host>
</storage_domain>
format element to specify whether or not to format the storage domain after deletion.
Example 11.11. Formatting a storage domain after deletion
<storage_domain>
<host id="..."/>
<format>true</format>
</storage_domain>
format element is passed, the storage domain remains unformatted.
destroy element to logically remove the storage domain and retain the data.
Example 11.12. Logical removal of a storage domain
<storage_domain>
<host id="..."/>
<destroy>true</destroy>
</storage_domain>
hosts collection provides information about the hosts in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="hosts" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 12.1. Host elements
| Element | Type | Description | Properties |
|---|---|---|---|
link rel="storage"
| relationship |
A link to the storage sub-collection for host storage.
|
|
link rel="nics"
| relationship |
A link to the nics sub-collection for host network interfaces.
| |
link rel="tags"
| relationship |
A link to the tags sub-collection for host tags.
| |
link rel="permissions"
| relationship |
A link to the permissions sub-collection for host permissions. See Section 7.3.7, “ Permissions ”.
| |
link rel="statistics"
| relationship |
A link to the statistics sub-collection for host statistics.
|
|
type
|
One of rhel or rhev-h
| The host type. |
|
address
| string | The IP address or hostname of the host. |
|
status
| See below | The host status. |
|
cluster id=
| GUID | A reference to the cluster that includes this host. | |
port
| integer | The listen port of the VDSM daemon running on this host. |
|
storage_manager
| Boolean: true or false |
true if the host is the storage pool manager (SPM).
|
|
power_management
| complex | Configuration options for host power management. See Section 12.1, “Power Management”. | |
ksm
| Boolean: true or false |
true if Kernel SamePage Merging (KSM) is enabled.
| |
transparent_hugepages
| Boolean: true or false |
true if Transparent Hugepages is enabled.
| |
iscsi
| complex |
The SCSI initiator for the host.
|
|
cpu
| complex |
Statistics for the host CPU. Includes sub-elements for the CPU's name, topology cores=, topology sockets= and speed. The topology cores= aggregates the total cores while the topology sockets= aggregates the total physical CPUs.
|
|
summary
| complex |
Summary statistics of the virtual machines on the host. Includes sub-elements for numbers of active, migrating and total VMs.
|
|
version major= minor=
| complex | The compatibility level of the host See Chapter 5, Compatibility Level Versions. |
|
root_password
| string | The root password of this host, by convention only included in the client-provided host representation on creation. |
|
status contains one of the following enumerative values: down, error, initializing, installing, install_failed, maintenance, non_operational, non_responsive, pending_approval, preparing_for_maintenance, connecting, reboot, unassigned and up. These states are listed in host_states under capabilities (See Section 6.1.21, “Resource Status States”).
Example 12.1. An XML representation of a host
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3">
<name>host1</name>
<actions>
<link rel="install"
href="/api/hosts/762f3276-9d1e-11e0-a27c-525400d75548/install"/>
<link rel="activate"
href="/api/hosts/762f3276-9d1e-11e0-a27c-525400d75548/activate"/>
<link rel="fence"
href="/api/hosts/762f3276-9d1e-11e0-a27c-525400d75548/fence"/>
<link rel="deactivate"
href="/api/hosts/762f3276-9d1e-11e0-a27c-525400d75548/deactivate"/>
<link rel="approve"
href="/api/hosts/762f3276-9d1e-11e0-a27c-525400d75548/approve"/>
<link rel="iscsilogin"
href="/api/hosts/762f3276-9d1e-11e0-a27c-525400d75548/iscsilogin"/>
<link rel="iscsidiscover"
href="/api/hosts/762f3276-9d1e-11e0-a27c-525400d75548/iscsidiscover"/>
<link rel="commitnetconfig"
href="/api/hosts/762f3276-9d1e-11e0-a27c-525400d75548/commitnetconfig"/>
</actions>
<link rel="storage"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/storage"/>
<link rel="nics"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics"/>
<link rel="tags"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/tags"/>
<link rel="permissions"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/permissions"/>
<link rel="statistics"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/statistics"/>
<type>rhev-h</type>
<address>host1.example.com</address>
<status>
<state>up</state>
</status>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/>
<port>54321</port>
<storage_manager>true</storage_manager>
<power_management>
<enabled>false</enabled>
<options/>
</power_management>
<ksm>
<enabled>true</enabled>
</ksm>
<transparent_hugepages>
<enabled>true</enabled>
</transparent_hugepages>
<iscsi>
<initiator>iqn.2001-04.com.example:diskarrays-sn-a8675309</initiator>
</iscsi>
<cpu>
<topology cores="2" sockets="1"/>
<name>Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz</name>
<speed>2993</speed>
</cpu>
<summary>
<active>2</active>
<migrating>0</migrating>
<total>3</total>
</summary>
<version major="3" minor="0"/>
</host>
name, address and root_password elements. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 12.2. Creating a host
POST /api/hosts HTTP/1.1 Accept: application/xml Content-type: application/xml <host> <name>host2</name> <address>host2.example.com</address> <root_password>p@55w0Rd!</root_password> </host>
root_password element is only included in the client-provided initial representation and is not exposed in the representations returned from subsequent requests.
name, name, cluster, power_management, transparent_hugepages and ksm elements are updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 12.3. Updating a host
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3 HTTP/1.1 Accept: application/xml Content-type: application/xml <host> <name>host3</name> </host>
DELETE request.
Example 12.4. Removing a host
DELETE /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3 HTTP/1.1 HTTP/1.1 204 No Content
power_management element provides users with the ability to set a power management configuration, which is required for host fencing. Certain sub-elements are required when configuring power_management.
Table 12.2. Power management options
| Element | Type | Description | Properties |
|---|---|---|---|
type=
| fencing device code |
A list of valid fencing device codes are available in the capabilities collection. See Section 6.1.4, “Power Managers”.
|
|
enabled
| Boolean: true or false | Indicates whether power management configuration is enabled or disabled. |
|
address
| string | The host name or IP address of the host. |
|
username
| string | A valid user name for power management. | |
password
| string | A valid, robust password for power management. | |
options
| complex |
Fencing options for the selected type=.
|
options element requires a list of option sub-elements. Each option requires a name and type attributes. Certain options are only available for specific fencing types as defined in the capabilities collection (see Section 6.1.4, “Power Managers”).
power_management configuration when POSTing to the host resource. The power_management configuration is updatable using a PUT request.
Example 12.5. An XML representation of a host's power management configuration
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3">
<name>host1</name>
...
<power_management type="ilo">
<enabled>true</enabled>
<address>192.168.1.107</address>
<username>admin</username>
<password>p@55w0Rd!</password>
<options>
<option name="secure" value="true"/>
<option name="port" value="54345"/>
<option name="slot" value="3"/>
</options>
</power_management>
...
</host>
ksm element.
Example 12.6. Setting KSM memory management
PUT /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3 HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3">
<ksm>true</ksm>
</host>
transparent_hugepages element.
Example 12.7. Setting Transparent Hugepage memory management
PUT /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3 HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3">
<transparent_hugepages>true</transparent_hugepages>
</host>
capabilities collection. See Section 6.1.2, “Features”.
nics sub-collection represents a host's physical network interfaces. Each host_nic element in the representation acts as a network interface and contains the following elements:
Note
Table 12.3. Elements for a host's network interfaces
| Element | Type | Description | Properties |
|---|---|---|---|
name
| string |
The name of the host network interface, e.g. eth0
|
[a]
|
link rel="statistics"
| relationship |
A link to the statistics sub-collection for a host's network interface statistics.
|
|
link rel="master"
| relationship | A reference to the master bonded interface, if this is a slave interface. |
|
host id=
| GUID | A reference to the host. |
|
network id=
| GUID | A reference to the network, if any, that the interface is attached. |
[b]
|
mac address=
| string | The MAC address of the interface. |
|
ip address= netmask= gateway=
| complex | The IP level configuration of the interface. | |
boot_protocol
| enumerated |
The protocol for IP address assignment when the host is booting. A list of enumerated values is available in capabilities. See Section 6.1.18, “Boot Protocols”.
| |
speed
| integer | The network interface speed in bits per second. |
|
status
| enumerated |
The link status for the network interface. These states are listed in host_nic_states under capabilities (See Section 6.1.21, “Resource Status States”).
|
|
vlan id
| integer | The VLAN which this interface represents. |
|
bonding
| complex |
A list of options and slave NICs for bonded interfaces.
|
[c]
|
[a]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[b]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[c]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
| |||
Example 12.8. An XML representation of a network interface on a host
<host_nic id="e8f02fdf-3d7b-4135-86e1-1bf185570cd8"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/
e8f02fdf-3d7b-4135-86e1-1bf185570cd8">
<name>bond0</name>
<link rel="statistics"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/
e8f02fdf-3d7b-4135-86e1-1bf185570cd8/statistics"/>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
<network id="e657d631-657d-42bb-a536-73501a085d85"
href="/api/networks/e657d631-657d-42bb-a536-73501a085d85"/>
<mac address="D6:76:F1:3A:AF:74"/>
<ip address="192.168.0.128" netmask="255.255.255.0" gateway="192.168.0.1"/>
<boot_protocol>dhcp</boot_protocol>
<speed>1000000000</speed>
<status>
<state>up</state>
</status>
<bonding>
<options>
...
</options>
<slaves>
<host_nic id="eb14e154-5e73-4f7f-bf6b-7f52609d94ec"/>
<host_nic id="6aede5ca-4c54-4b37-a81b-c0d6b53558ea"/>
</slaves>
</bonding>
<actions>
<link rel="attach"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/
e8f02fdf-3d7b-4135-86e1-1bf185570cd8/attach"/>
<link rel="detach"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/
e8f02fdf-3d7b-4135-86e1-1bf185570cd8/detach"/>
</actions>
</host_nic>
network, ip and boot_protocol elements using a PUT request.
name and network elements are required. Identify the network element with the id attribute or name element.
PUT request.
PUT /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/
e8f02fdf-3d7b-4135-86e1-1bf185570cd8 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<nic>
<ip address="192.168.0.129" netmask="255.255.255.0" gateway="192.168.0.1"/>
</nic>
DELETE request.
DELETE /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/ e8f02fdf-3d7b-4135-86e1-1bf185570cd8 HTTP/1.1 HTTP/1.1 204 No Content
Important
host_nic resource containing a bonding element.
Table 12.4. Bonded interface properties
| Element | Type | Description | Properties |
|---|---|---|---|
options
| complex |
A list of option elements for a bonded interface. Each option contains property name and value attributes.
|
[a]
|
slaves
| complex |
A list of slave host_nic id= elements for a bonded interface.
|
[b]
|
[a]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[b]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
| |||
POSTing to a host_nic with bonding options and slave interfaces. The name, network and bonded elements are required when creating a new bonded interface. Either the id or name elements identify the network and slave host_nics.
Example 12.9. Creating a bonded interface
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<host_nic>
<name>bond4</name>
<network id="e657d631-657d-42bb-a536-73501a085d85"/>
<bonding>
<options>
...
</options>
<slaves>
<host_nic id="eb14e154-5e73-4f7f-bf6b-7f52609d94ec"/>
<host_nic id="6aede5ca-4c54-4b37-a81b-c0d6b53558ea"/>
</slaves>
</bonding>
</host_nic>
Important
bond0, bond1, bond2, bond3 and bond4 are the only valid names for a bonded interface.
DELETE request to a bonded interface URI deletes it.
Important
statistics sub-collection for a host's network interface statistics. Each statistic contains the following elements:
Table 12.5. Elements for a host's network interface statistics
| Element | Type | Description |
|---|---|---|
name
| string | The unique identifier for the statistic entry. |
description
| string | A plain text description of the statistic. |
unit
| string | The unit or rate to measure the statistical values. |
type
|
One of GAUGE or COUNTER
| The type of statistic measures. |
values type=
|
One of INTEGER or DECIMAL
| The data type for the statistical values that follow. |
value
| complex |
A data set that contains datum.
|
datum
|
see values type
|
An individual piece of data from a value.
|
host_nic id=
| relationship |
A relationship to the containing host_nic resource.
|
Table 12.6. Host NIC statistic types
|
Name
|
Description
|
|---|---|
data.current.rx
|
The rate in bytes per second of data received.
|
data.current.tx
|
The rate in bytes per second of data transmitted.
|
errors.total.rx
|
Total errors from receiving data.
|
errors.total.tx
|
Total errors from transmitting data.
|
Example 12.10. An XML representation of a host's network interface statistics sub-collection
<statistics>
<statistic id="ecd0559f-e88f-3330-94b4-1f091b0ffdf7"
href="/api/hosts/25fcdd2e-d452-11e0-bb4d-525400d75548/nics/
c34728e8-4338-4540-ac9b-86b8582e602e/statistics/
ecd0559f-e88f-3330-94b4-1f091b0ffdf7">
<name>data.current.rx</name>
<description>Receive data rate</description>
<values type="DECIMAL">
<value>
<datum>0</datum>
</value>
</values>
<type>GAUGE</type>
<unit>BYTES_PER_SECOND</unit>
<host_nic id="c34728e8-4338-4540-ac9b-86b8582e602e"
href="/api/hosts/25fcdd2e-d452-11e0-bb4d-525400d75548/nics/
c34728e8-4338-4540-ac9b-86b8582e602e"/>
</statistic>
...
</statistics>
Note
statistics sub-collection is read-only.
id or name elements identify the network.
Example 12.11. Action to attach a host network interface to a network
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/e8f02fdf-3d7b-4135-86e1-1bf185570cd8/attach HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<network id="e657d631-657d-42bb-a536-73501a085d85"/>
</action>
Important
id or name elements identify the network.
Example 12.12. Action to detach a host network interface to a network
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/e8f02fdf-3d7b-4135-86e1-1bf185570cd8/detach HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<network id="e657d631-657d-42bb-a536-73501a085d85"/>
</action>
Important
storage sub-collection provides a list of the iSCSI and FCP storage representations available on the host. This storage is used to create storage domains, as described in Chapter 11, Storage Domains.
storage representation in the sub-collection represents a SCSI LUN.
Example 12.13. An XML representation of the storage sub-collection on a host
<host_storage>
<storage id="82fb123b-321e-40a1-9889-95dcd2654463"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/storage/
82fb123b-321e-40a1-9889-95dcd2654463">
<name>LUN0</name>
<type>iscsi</type>
<logical_unit id="LUN0">
<address>mysan.example.com</address>
<target>iqn.2009-08.com.example:mysan.foobar</target>
</logical_unit>
</storage>
</host_storage>
Note
host_storage collection is read-only.
Important
statistics sub-collection for host-specific statistics. Each statistic contains the following elements:
Table 12.7. Elements for host statistics
| Element | Type | Description |
|---|---|---|
name
| string | The unique identifier for the statistic entry. |
description
| string | A plain text description of the statistic. |
unit
| string | The unit or rate to measure the statistical values. |
type
|
One of GAUGE or COUNTER
| The type of statistic measures. |
values type=
|
One of INTEGER or DECIMAL
| The data type for the statistical values that follow. |
value
| complex |
A data set that contains datum.
|
datum
|
see values type
|
An individual piece of data from a value.
|
host id=
| relationship |
A relationship to the containing host resource.
|
Table 12.8. Host statistic types
|
Name
|
Description
|
|---|---|
memory.total
|
Total memory in bytes on the host.
|
memory.used
|
Memory in bytes used on the host.
|
memory.free
|
Memory in bytes free on the host.
|
memory.buffers
|
I/O buffers in bytes.
|
memory.cached
|
OS caches in bytes.
|
swap.total
|
Total swap memory in bytes on the host.
|
swap.free
|
Swap memory in bytes free on the host.
|
swap.used
|
Swap memory in bytes used on the host.
|
swap.cached
|
Swap memory in bytes also cached in host's memory.
|
ksm.cpu.current
|
Percentage of CPU usage for Kernel SamePage Merging.
|
cpu.current.user
|
Percentage of CPU usage for users.
|
cpu.current.system
|
Percentage of CPU usage for system.
|
cpu.current.idle
|
Percentage of idle CPU usage.
|
cpu.load.avg.5m
|
CPU load average per five minutes.
|
Example 12.14. An XML representation of the host's statistics sub-collection
<statistics>
<statistic id="4ae97794-f56d-3f05-a9e7-8798887cd1ac"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/
statistics/4ae97794-f56d-3f05-a9e7-8798887cd1ac">
<name>memory.total</name>
<description>Total memory</description>
<unit>BYTES</unit>
<type>GUAGE</type>
<values type="INTEGER">
<value>
<datum>3983540224<datum>
</value>
</values>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
</statistic>
...
</statistics>
Note
statistics sub-collection is read-only.
host resources.
install, activate, fence, deactivate, approve, iscsilogin, iscsidiscover and commitnetconfig.
- Red Hat Enterprise Linux host - This host type requires an
root_passwordelement that refers to the password for the host'srootuser. - Red Hat Enterprise Virtualization Hypervisor host - This host type requires an
imageelement that refers to an ISO file stored on the Red Hat Enterprise Virtualization Manager server.
Example 12.15. Action to install VDSM to a Red Hat Enterprise Linux host
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/install HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<root_password>p@55w0Rd!</root_password>
</action>
Example 12.16. Action to install VDSM to a Red Hat Enterprise Virtualization Hypervisor host
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/install HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<image>/usr/share/rhev-hypervisor/rhev-hypervisor.iso</image>
</action>
Example 12.17. Action to activate a host
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/activate HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
fence action. See Section 12.1, “Power Management” for details on configuring a fencing device for a host.
capabilities lists available fence_type options. See Section 6.1.5, “Fence Types” for details on accessing this list.
Example 12.18. Action to fence a host
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/fence
Accept: application/xml
Content-Type: application/xml
<action>
<fence_type>start</fence_type>
</action>
Example 12.19. Action to deactivate a host
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/deactivate HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
cluster element to define the target cluster for this host.
Example 12.20. Action to approve a host
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/approve HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"/>
<action>
iscsilogin action enables a host to login to an iSCSI target. Logging into a target makes the contained LUNs available in the host_storage collection. See Section 12.4, “Storage Sub-Collection”.
Example 12.21. Action to enable a host to login to iSCSI target
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/iscsilogin HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<action>
<iscsi>
<address>mysan.example.com</address>
<target>iqn.2009-08.com.example:mysan.foobar</target>
<username>jimmy</username>
<password>s3kr37</password>
</iscsi>
</action>
iscsidiscover action enables an iSCSI portal to be queried for its list of LUNs.
Example 12.22. Action to query a list of LUNs for iSCSI portal
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/iscsidiscover HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<action>
<iscsi>
<address>mysan.example.com</address>
</iscsi>
</action>
HTTP/1.1 202 Accept
Content-Type: application/xml
<action id="e9126d04-0f74-4e1a-9139-13f11fcbb4ab"
href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/iscsidiscover/
e9126d04-0f74-4e1a-9139-13f11fcbb4ab">
<iscsi_target>iqn.2009-08.com.example:mysan.foobar</iscsi_target>
...
<action>
Example 12.23. Action to commit network configuration
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/commitnetconfig HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
Important
vms collection provides information about virtual machines in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="vms" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 13.1. Virtual machine elements
| Element | Type | Description | Properties |
|---|---|---|---|
link rel="disks"
| relationship |
A link to the disks sub-collection for virtual machine resources.
| |
link rel="nics"
| relationship |
A link to the nics sub-collection for virtual machine resources.
| |
link rel="cdroms"
| relationship |
A link to the cdroms sub-collection for virtual machine resources.
| |
link rel="snapshots"
| relationship |
A link to the snapshots sub-collection for virtual machine resources.
| |
link rel="tags"
| relationship |
A link to the tags sub-collection for virtual machine resources.
| |
link rel="permissions"
| relationship |
A link to the permissions sub-collection for virtual machine permissions. See Section 7.3.7, “ Permissions ”.
| |
link rel="statistics"
| relationship |
A link to the statistics sub-collection for virtual machine resources.
|
|
type
| enumerated |
The virtual machine type. A list of enumerated values are available in capabilities. See Section 6.1.8, “Virtual Machine Types”.
|
|
status
| See below | The virtual machine status. |
|
memory
| integer | The amount of memory allocated to the guest in bytes. | |
cpu
| complex |
The CPU topology i.e. number of logical sockets available to the guest and the number of cores per socket. The total cores available to the virtual machine equals the number of sockets multiplied by the cores per socket.
| |
os type=
|
string, e.g. RHEL5 or WindowsXP
| The guest operating system type. | |
os boot dev=
| enumerated |
A list of boot devices described by a dev attribute on a boot element. A list of enumerated values are available in capabilities. See Section 6.1.9, “Boot Devices”.
| |
os kernel
| string | A path to a kernel image the virtual machine is configured to boot. This option supports booting a Linux kernel directly rather than through the BIOS bootloader. | |
os initrd
| string | A path to an initrd image to be used with the previously specified kernel. This option supports booting a Linux kernel directly rather than through the BIOS bootloader. | |
os cmdline
| string | A kernel command line parameter string to be used with the defined kernel. This option supports booting a Linux kernel directly rather than through the BIOS bootloader. | |
high_availability
| complex |
Set enabled to true if the virtual machine should be automatically restarted if the virtual machine or its host crashes. A priority element controls the order in which Virtual Machines are re-started.
| |
display
| complex |
The display type (either vnc or spice), port, and the number of monitors.
| |
cluster id=
| GUID | A reference to the virtual machine's host cluster. See Chapter 9, Host Clusters. |
|
template id=
| GUID | A reference to the template on which this virtual machine is based. |
|
domain id=
| GUID | A reference to the virtual machine's domain. |
|
start_time
|
xsd:dateTime format: YYYY-MM-DDThh:mm:ss
| The date and time at which this virtual machine was started. |
|
creation_time
|
xsd:dateTime format: YYYY-MM-DDThh:mm:ss
| The date and time at which this virtual machine was created. |
|
origin
|
One of rhev, vmware or xen
| The system from which this virtual machine originated. |
|
stateless
| Boolean: true or false |
true if the virtual machine is stateless. A stateless virtual machine contains a snapshot of its disk image taken at boot and deleted at shutdown. This means state changes do not persist after a reboot.
| |
placement_policy
| complex |
Sets the placement policy for virtual machine migration. Requires a default host= and an affinity (one of migratable, user_migratable or pinned). Leave the host element empty to set no preferred host.
| |
memory_policy
| complex |
Sets the memory policy for virtual machines. Defines the minimum amount of guaranteed memory on a host in order for the virtual machine to run.
| |
custom_properties
| complex |
A set of user-defined environment variable passed as parameters to custom scripts. Each custom_property contains name and value attributes. A list of enumerated values are available in capabilities. See Section 6.1.17, “Custom Properties”.
| |
usb
| complex |
Defines the USB policy for a virtual machine. Requires an enabled element set to a Boolean value.
| |
guest_info
| complex |
A reference to the guest client information. Includes an ip element with an address= attribute.
|
|
vmpool
| complex | A reference to the virtual machine pool. This element only appears for virtual machines part of a pool. |
|
timezone
|
tz database format: Area/Location
| The the Sysprep timezone setting for a Windows virtual machine. Only certain timezones are allowed as specified in Appendix D, Timezones. | |
domain
| complex |
The the Sysprep domain setting for a Windows virtual machine. Requires a name from the domains collection. See Chapter 16, Domains for more information about domains.
|
status contains one of the following enumerative values: unassigned, down, up, powering_up, powered_down, paused, migrating_from, migrating_to, unknown, not_responding, wait_for_launch, reboot_in_progress, saving_state, restoring_state, suspended, image_illegal, image_locked or powering_down. These states are listed in vm_states under capabilities (See Section 6.1.21, “Resource Status States”).
Example 13.1. An XML representation of a virtual machine
<vm id="082c794b-771f-452f-83c9-b2b5a19c0399"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399">
<name>vm1</name>
<description>Virtual Machine 1</description>
<actions>
<link rel="start"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/start"/>
<link rel="stop"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/stop"/>
<link rel="shutdown"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/shutdown"/>
<link rel="suspend"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/suspend"/>
<link rel="detach"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/detach"/>
<link rel="migrate"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/migrate"/>
<link rel="export"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/export"/>
<link rel="import"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/import"/>
<link rel="move"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/move"/>
<link rel="ticket"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/ticket"/>
</actions>
<link rel="disks"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/disks"/>
<link rel="nics"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/nics"/>
<link rel="cdroms"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/cdroms"/>
<link rel="snapshots"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/snapshots"/>
<link rel="users"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/users"/>
<link rel="tags"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/tags"/>
<link rel="permissions"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/permissions"/>
<link rel="statistics"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/statistics"/>
<type>desktop</type>
<status>
<state>up</state>
</status>
<memory>536870912</memory>
<cpu>
<topology cores="1" sockets="1"/>
</cpu>
<os type="RHEL5">
<boot dev="hd"/>
<kernel/>
<initrd/>
<cmdline/>
</os>
<highly_available>
<enabled>true</enabled>
<priority>20</priority>
</highly_available>
<display>
<type>vnc</type>
<port>5910</port>
<monitors>1</monitors>
</display>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/>
<template id="00000000-0000-0000-0000-000000000000"
href="/api/templates/00000000-0000-0000-0000-000000000000"/>
<start_time>2010-18-16T13:14:15</start_time>
<creation_time>2010-08-16T14:24:29</creation_time>
<origin>rhev</origin>
<stateless>false</stateless>
<placement_policy>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
<affinity>migratable</affinity>
</placement_policy>
<memory_policy>
<guaranteed>536870912</guaranteed>
</memory_policy>
<usb>
<enabled>true</enabled>
</usb>
<custom_properties>
<custom_property value="124" name="sndbuf"/>
</custom_properties>
<guest_info>
<ip address="192.168.0.25"/>
</guest_info>
</vm>
name, template and cluster elements. Identify the template and cluster elements with the id attribute or name element. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 13.2. Creating a virtual machine with 512 MB and boots from the virtual hard disk
POST /api/vms HTTP/1.1
Accept: application/xml
Content-type: application/xml
<vm>
<name>vm2</name>
<description>Virtual Machine 2</description>
<type>desktop</type>
<memory>536870912</memory>
<cluster>
<name>default</name>
</cluster>
<template>
<name>Blank</name>
</template>
<os>
<boot dev="hd"/>
</os>
</vm>
name, description, type, memory, cpu topology, os, high_availability, display, timezone, domain, stateless, placement_policy, memory_policy, usb and custom_properties elements are updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 13.3. Updating a virtual machine to contain 1 GB of memory
PUT /api/vms/082c794b-771f-452f-83c9-b2b5a19c0399 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<vm>
<memory>1073741824</memory>
</vm>
DELETE request.
Example 13.4. Removing a virtual machine
DELETE /api/vms/082c794b-771f-452f-83c9-b2b5a19c0399 HTTP/1.1 HTTP/1.1 204 No Content
disks sub-collection represents all virtual hard disk devices on a virtual machine. A disk representation contains the following elements:
Note
Table 13.2. Elements for virtual machine disks
| Element | Type | Description | Properties |
|---|---|---|---|
link rel="statistics"
| relationship |
A link to the statistics sub-collection for a virtual machine's disk statistics.
|
|
storage_domains
| Complex |
The storage domains associated with this disk. Each storage_domain element contains an id attribute with the associated storage domain's GUID.
|
[a]
|
size
| integer | Size of the disk in bytes. |
|
type
| enumerated |
The type (function) of the disk device. A list of enumerated values is available in capabilities. See Section 6.1.12, “Disk Types”.
|
|
status
|
One of illegal, invalid, locked or ok
|
The status of the disk device. These states are listed in disk_states under capabilities (See Section 6.1.21, “Resource Status States”).
|
|
interface
| enumerated |
The type of interface driver used to connect to the disk device. A list of enumerated values is available in capabilities. See Section 6.1.15, “Disk Interfaces”.
| |
format
| enumerated |
The underlying storage format. A list of enumerated values is available in capabilities. See Section 6.1.14, “Disk Formats”. Copy On Write (COW) allows snapshots, with a small performance overhead. Raw does not allow snapshots, but offers improved performance.
|
|
sparse
| Boolean: true or false |
true if the physical storage for the disk should not be preallocated.
|
|
bootable
| Boolean: true or false |
true if this disk is to be marked as bootable.
| |
wipe_after_delete
| Boolean: true or false |
true if the underlying physical storage for the disk should be zeroed when the disk is deleted.
| |
propagate_errors
| Boolean: true or false |
true if disk errors should not cause virtual machine to be paused and, instead, disk errors should be propagated to the guest OS.
| |
vm id=
| GUID | The ID of the containing virtual machine. |
|
[a]
Only required when the first disk is being added to a virtual machine that was not itself created from a template.
| |||
Example 13.5. An XML representation of a disk device
<disk id="ed7feafe-9aaf-458c-809a-ed789cdbd5b4"
href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/disks/
ed7feafe-9aaf-458c-809a-ed789cdbd5b4">
<link rel="statistics"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/disks/
ed7feafe-9aaf-458c-809a-ed789cdbd5b4/statistics"/>
<storage_domains>
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed"/>
</storage_domains>
<size>10737418240</size>
<type>system</type>
<status>
<state>ok</state>
</status>
<interface>virtio</interface>
<format>raw</format>
<bootable>true</bootable>
<vm id="cdc0b102-fbfe-444a-b9cb-57d2af94f401"
href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401"/>
</disk>
size element is required. Also the API requires the storage_domains element when the first disk is added to a virtual machine and not itself created from a template.
Example 13.6. Creating a new a disk device on a Virtual Machine
POST /api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/disks HTTP/1.1
Accept: application/xml
Content-type: application/xml
<disk>
<storage_domains>
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed"/>
</storage_domains>
<size>8589934592</size>
<type>system</type>
<interface>virtio</interface>
<format>cow</format>
<bootable>true</bootable>
</disk>
clone element. Set the clone element to true within the disks sub-collection when creating a virtual machine. This clones a disk from the base template and attaches it to the virtual machine.
Example 13.7. Cloning a disk from a template
POST /api/vms/082c794b-771f-452f-83c9-b2b5a19c0399 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<vm>
<name>cloned_vm</name>
<template id="64d4aa08-58c6-4de2-abc4-89f19003b886"/>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"/>
<disks>
<clone>true</clone>
<disk id="4825ffda-a997-4e96-ae27-5503f1851d1b">
<format>COW</format>
</disk>
<disk id="42aef10d-3dd5-4704-aa73-56a023c1464c">
<format>COW</format>
</disk>
</disks>
</vm>
statistics sub-collection for disk-specific statistics. Each statistic contains the following elements:
Table 13.3. Elements for virtual machine disk statistics
| Element | Type | Description |
|---|---|---|
name
| string | The unique identifier for the statistic entry. |
description
| string | A plain text description of the statistic. |
unit
| string | The unit or rate to measure the statistical values. |
type
|
One of GAUGE or COUNTER
| The type of statistic measures. |
values type=
|
One of INTEGER or DECIMAL
| The data type for the statistical values that follow. |
value
| complex |
A data set that contains datum.
|
datum
|
see values type
|
An individual piece of data from a value.
|
disk id=
| relationship |
A relationship to the containing disk resource.
|
Table 13.4. Virtual machine disk statistic types
|
Name
|
Description
|
|---|---|
data.current.read
|
The data transfer rate in bytes per second when reading from the disk.
|
data.current.write
|
The data transfer rate in bytes per second when writing to the disk.
|
Example 13.8. An XML representation of a virtual machine's statistics sub-collection
<statistics>
<statistic id="33b9212b-f9cb-3fd0-b364-248fb61e1272"
href="/api/vms/3a42530e-3bc5-4094-829d-489257894c2a/disks/
f28ec14c-fc85-43e1-818d-96b49d50e27b/statistics/
33b9212b-f9cb-3fd0-b364-248fb61e1272">
<name>data.current.read</name>
<description>Read data rate</description>
<values type="DECIMAL">
<value>
<datum>0</datum>
</value>
</values>
<type>GAUGE</type>
<unit>BYTES_PER_SECOND</unit>
<disk id="f28ec14c-fc85-43e1-818d-96b49d50e27b"
href="/api/vms/3a42530e-3bc5-4094-829d-489257894c2a/
disks/f28ec14c-fc85-43e1-818d-96b49d50e27b"/>
</statistic>
...
</statistics>
Note
statistics sub-collection is read-only.
nics sub-collection represents all network interface devices on a virtual machine. A nic representation contains the following elements:
Note
Table 13.5. Elements for virtual machine network interfaces
| Element | Type | Description | Properties |
|---|---|---|---|
link rel="statistics"
| relationship |
A link to the statistics sub-collection for a virtual machine's network interface statistics.
|
|
network id=
| GUID | A reference to the network which the interface should be connected. |
|
interface
| enumerated |
The type of driver used for the nic. A list of enumerated values is available in capabilities. See Section 6.1.11, “NIC Interface Types”.
| |
mac address=
| string | The MAC address of the interface. |
|
Example 13.9. An XML representation of a network interface
<nic id="7a3cff5e-3cc4-47c2-8388-9adf16341f5e"
ref="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/nics/
7a3cff5e-3cc4-47c2-8388-9adf16341f5e">
<link rel="statistics"
href="/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/nics/
7a3cff5e-3cc4-47c2-8388-9adf16341f5e/statistics"/>
<name>nic1</name>
<interface>virtio</interface>
<mac address="00:1a:4a:16:84:07"/>
<network id="00000000-0000-0000-0000-000000000009"
href="/api/networks/00000000-0000-0000-0000-000000000009"/>
<vm id="cdc0b102-fbfe-444a-b9cb-57d2af94f401"
href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401"/>
</nic>
name and network elements are required. Identify the network element with the id attribute or name element.
PUT request.
PUT /api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/nics/
7a3cff5e-3cc4-47c2-8388-9adf16341f5e HTTP/1.1
Accept: application/xml
Content-type: application/xml
<nic>
<name>nic2</name>
<network id="00000000-0000-0000-0000-000000000010"/>
<type>e1000</type>
</nic>
DELETE request.
DELETE /api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/nics/ 7a3cff5e-3cc4-47c2-8388-9adf16341f5e HTTP/1.1 HTTP/1.1 204 No Content
statistics sub-collection for network interface statistics. Each statistic contains the following elements:
Table 13.6. Elements for a virtual machine's network interface statistics
| Element | Type | Description |
|---|---|---|
name
| string | The unique identifier for the statistic entry. |
description
| string | A plain text description of the statistic. |
unit
| string | The unit or rate to measure the statistical values. |
type
|
One of GAUGE or COUNTER
| The type of statistic measures. |
values type=
|
One of INTEGER or DECIMAL
| The data type for the statistical values that follow. |
value
| complex |
A data set that contains datum.
|
datum
|
see values type
|
An individual piece of data from a value.
|
nic id=
| relationship |
A relationship to the containing nic resource.
|
Table 13.7. Virtual machine NIC statistic types
|
Name
|
Description
|
|---|---|
data.current.rx
|
The rate in bytes per second of data received.
|
data.current.tx
|
The rate in bytes per second of data transmitted.
|
errors.total.rx
|
Total errors from receiving data.
|
errors.total.tx
|
Total errors from transmitting data.
|
Example 13.10. An XML representation of a virtual machine's NIC statistics sub-collection
<statistics>
<statistic id="ecd0559f-e88f-3330-94b4-1f091b0ffdf7"
href="/api/vms/3a42530e-3bc5-4094-829d-489257894c2a/nics/
6cd08e76-57c0-41ba-a728-7eba46ae1e36/statistics/
ecd0559f-e88f-3330-94b4-1f091b0ffdf7">
<name>data.current.rx</name>
<description>Receive data rate</description>
<values type="DECIMAL">
<value>
<datum>0</datum>
</value>
</values>
<type>GAUGE</type>
<unit>BYTES_PER_SECOND</unit>
<nic id="6cd08e76-57c0-41ba-a728-7eba46ae1e36"
href="/api/vms/3a42530e-3bc5-4094-829d-489257894c2a/
nics/6cd08e76-57c0-41ba-a728-7eba46ae1e36"/>
</statistic>
...
</statistics>
Note
statistics sub-collection is read-only.
cdroms sub-collection represents the CD-ROM device on a virtual machine. A cdrom representation contains the following elements:
Table 13.8. Elements for virtual machine CD-ROMs
| Element | Type | Description | Properties |
|---|---|---|---|
file id=
| string/filename | A reference to an ISO image. See Section 11.3, “ Files Sub-Collection ”. |
Example 13.11. An XML representation of a CD-ROM device
<cdrom id="00000000-0000-0000-0000-000000000000"
href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/cdroms/
00000000-0000-0000-0000-000000000000">
<file id="rhel-server-6.0-x86_64-dvd.iso"/>
<vm id="cdc0b102-fbfe-444a-b9cb-57d2af94f401"
href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401"/>
</cdrom>
file id element is required.
PUT request:
Example 13.12. Changing a CD-ROM file
PUT /api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/cdroms/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<cdrom>
<file id="fedora-15-x86_64-dvd.iso"/>
</cdrom>
PUT request with an additional current URI argument:
Example 13.13. Changing a CD-ROM file during a current session
PUT /api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/cdroms/00000000-0000-0000-0000-000000000000?current HTTP/1.1
Accept: application/xml
Content-type: application/xml
<cdrom>
<file id="fedora-15-x86_64-dvd.iso"/>
</cdrom>
Note
rel="snapshot" sub-collection that behaves similar to other collections, as described in Chapter 7, Common Features.
snapshot elements that contain the following elements:
Note
Table 13.9. Elements for virtual machine snapshots
| Element | Type | Description | Properties |
|---|---|---|---|
vm id=
| GUID | The ID and URI of the virtual machine to which this snapshot pertains. |
|
date
|
xsd:dateTime format: YYYY-MM-DDThh:mm:ss
| The date and time at which this snapshot was created. |
|
link rel="prev"
| relationship | A link to the previous snapshot of this virtual machine. |
|
description element is specified.
Note
PUT.
Example 13.14. An XML representation of a virtual machine snapshot
<snapshot id="f5288fd5-5178-4b7d-b87c-c01a40e40168"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/snapshots/
f5288fd5-5178-4b7d-b87c-c01a40e40168">
<description>Virtual Machine 1 - Snapshot A</description>
<actions>
<link rel="restore"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/snapshots/
f5288fd5-5178-4b7d-b87c-c01a40e40168/restore"/>
</actions>
<link rel="prev"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/snapshots/
ce411b3e-e4e0-4482-8b2f-d1ed998b9130"/>
<vm id="5114bb3e-a4e6-44b2-b783-b3eea7d84720"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720"/>
<date>2010-08-16T14:24:29</date>
</snapshot>
rel="restore" action link in the snapshot representation.
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/snapshots/f5288fd5-5178-4b7d-b87c-c01a40e40168/restore HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
statistics sub-collection for virtual machine-specific statistics. Each statistic contains the following elements:
Table 13.10. Elements for virtual machine statistics
| Element | Type | Description |
|---|---|---|
name
| string | The unique identifier for the statistic entry. |
description
| string | A plain text description of the statistic. |
unit
| string | The unit or rate to measure the statistical values. |
type
|
One of GAUGE or COUNTER
| The type of statistic measures. |
values type=
|
One of INTEGER or DECIMAL
| The data type for the statistical values that follow. |
value
| complex |
A data set that contains datum.
|
datum
|
see values type
|
An individual piece of data from a value.
|
vm id=
| relationship |
A relationship to the containing vm resource.
|
Table 13.11. Virtual machine statistic types
|
Name
|
Description
|
|---|---|
memory.installed
|
Total memory in bytes allocated for the virtual machine's use.
|
memory.used
|
Current memory in bytes used by the virtual machine.
|
cpu.current.guest
|
Percentage of CPU used by the guest.
|
cpu.current.hypervisor
|
Percentage of CPU overhead on the hypervisor.
|
cpu.current.total
|
Total percentage of the current CPU in use.
|
Example 13.15. An XML representation of a virtual machine's statistics sub-collection
<statistics>
<statistic id="ef802239-b74a-329f-9955-be8fea6b50a4"
href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/
statistics/ef802239-b74a-329f-9955-be8fea6b50a4">
<name>memory.installed</name>
<description>Total memory configured</description>
<unit>BYTES</unit>
<type>GUAGE</type>
<values type="DECIMAL">
<value>
<datum>1073741824<datum>
</value>
</values>
<vm id="cdc0b102-fbfe-444a-b9cb-57d2af94f401"
href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401"/>
</statistic>
...
</statistics>
Note
statistics sub-collection is read-only.
vm resources.
start, stop, shutdown, suspend, detach, migrate, export, move and ticket.
Example 13.16. Action to start a virtual machine
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/start HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
vm element to be provided as a parameter. If a vm element is provided, the virtual machine uses the values from the provided element and overrides system settings at start time. These settings persist until a user stops the virtual machine.
Example 13.17. Action to start a virtual machine with overridden parameters
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/start HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<pause>true</pause>
<vm>
<stateless>true</stateless>
<display>
<type>spice</type>
</display>
<os>
<boot dev="cdrom"/>
</os>
<cdroms>
<cdrom>
<file id="windows-xp.iso"/>
</cdrom>
</cdroms>
<domain>
<name>domain.example.com</name>
<user>
<user_name>domain_user</user_name>
<password>domain_password</password>
</user>
</domain>
<placement_policy>
<host id="02447ac6-bcba-448d-ba2b-f0f453544ed2"/>
</placement_policy>
</vm>
</action>
Note
domain element when overriding parameters on boot with the start action. The domain element determines the domain that the Windows virtual machine joins. If the domain does not exist in the domains collection (see Chapter 16, Domains), this element requires additional user authentication details, including a user_name and password. If the domain exists in the domains collection, the action requires no additional user authentication details.
Example 13.18. Action to stop a virtual machine
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/stop HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
Example 13.19. Action to send a shutdown request to a virtual machine
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/shutdown HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
Example 13.20. Action to save virtual machine state and suspend the machine
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/suspend HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
Example 13.21. Action to detach a virtual machine
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/detach HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
host element is an optional element as Red Hat Enterprise Virtualization Manager automatically selects a default host for migration. If an API user requires a specific host, the user can specify the host with either an id or name parameter.
Example 13.22. Action to migrate a virtual machine to another host
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/migrate HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
</action>
export storage domain. A destination storage domain must be specified with a storage_domain reference. By default, the export action overwrites any existing virtual machine of the same name in the destination domain. An API user changes this behaviour by setting the overwrite parameter to true. Finally, if snapshots of the virtual machine are not included with the exported virtual machine, the discard_snapshots parameter is set to true.
Example 13.23. Action to export a virtual machine to an export storage domain
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/export HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<storage_domain>
<name>export1</name>
</storage_domain>
<overwrite>true<overwrite/>
<discard_snapshots>true<discard_snapshots/>
</action>
storage_domain reference to either a name or an id.
Example 13.24. Action to move virtual machine disks to a different storage domain
POST /api/vms/082c794b-771f-452f-83c9-b2b5a19c0399/move HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<storage_domain>
<name>images2</name>
</storage_domain>
</action>
action optionally includes a ticket representation containing a value (if the token string needs to take on a particular form) and/or an expiry time in minutes. In any case, the response specifies the actual ticket value and expiry used.
Example 13.25. Action to generate authentication token for a virtual machine
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/ticket HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<ticket>
<expiry>120</expiry>
</ticket>
</action>
200 OK
Content-Type: application/xml
<action id="94e07552-14ba-4c27-8ce6-2cc75190d3ef"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/ticket/
94e07552-14ba-4c27-8ce6-2cc75190d3ef">
<status>
<state>complete</state>
</status>
<ticket>
<value>5c7CSzK8Sw41</value>
<expiry>120</expiry>
</ticket>
<link rel="parent"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720"/>
<link rel="replay"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/ticket"/>
</action>
force action. This action requires a DELETE method. The request body contains an action representation with the force parameter set to true. The request also requires an additional Content-type: application/xml header to process the XML representation in the body.
Example 13.26. Force remove action on a virtual machine
DELETE /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<force>true</force>
</action>
templates collection provides information about the virtual machine templates in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="templates" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 14.1. Virtual machine template elements
| Element | Type | Description | Properties |
|---|---|---|---|
link rel="disks"
| relationship |
A link to the disks sub-collection for virtual machine template resources.
|
|
link rel="nics"
| relationship |
A link to the nics sub-collection for virtual machine template resources.
| |
link rel="cdroms"
| relationship |
A link to the cdroms sub-collection for virtual machine template resources.
|
|
link rel="permissions"
| relationship |
A link to the permissions sub-collection for virtual machine template permissions. See Section 7.3.7, “ Permissions ”.
| |
type
| enumerated |
The type of virtual machine the template provides. A list of enumerated values are available in capabilities. See Section 6.1.8, “Virtual Machine Types”.
| |
status
|
One of illegal, locked or ok
|
The template status. These states are listed in template_states under capabilities (See Section 6.1.21, “Resource Status States”).
|
|
memory
| integer | The amount of memory allocated to the guest, in bytes. | |
cpu
| complex |
The CPU topology (i.e. number of sockets and cores) available to the guest.
| |
os type=
|
string, e.g. RHEL5 or WindowsXP
| The guest operating system type. | |
os boot dev=
| enumerated |
A list of boot devices, described by a dev attribute on a boot element. A list of enumerated values are available in capabilities. See Section 6.1.9, “Boot Devices”.
| |
os kernel
| string | A path to a kernel image which the template is configured to boot from. | |
os initrd
| string | A path to an initrd image to be used with the kernel above. | |
os cmdline
| string | A kernel command line parameter string to be used with the kernel above. | |
cluster id=
| GUID | A reference to the template's host cluster. See Chapter 9, Host Clusters. |
|
vm id=
| GUID | A reference to the VM on which this template is based. See Chapter 13, Virtual Machines. |
|
domain id=
| GUID | A reference to the template's domain. |
|
creation_time
|
xsd:dateTime format: YYYY-MM-DDThh:mm:ss
| The date and time at which this template was created. |
|
origin
|
One of rhev, vmware or xen
| The system from which this template originated. |
|
high_availability
| complex |
Set enabled to true if the VM should be automatically restarted if the host crashes. A priority element controls the order in which VMs are re-started.
| |
display
| complex |
The display type (either vnc or spice), port, and the number of monitors.
| |
stateless
| Boolean: true or false | A stateless template contains a snapshot of its disk image taken at boot and deleted at shutdown. This means state changes do not persist after a reboot. | |
usb
| complex |
Defines the USB policy for a virtual machine template. Requires an enabled element set to a Boolean value.
| |
timezone
|
tz database format: Area/Location
| The the Sysprep timezone setting for a Windows virtual machine template. Only certain timezones are allowed as specified in Appendix D, Timezones. | |
domain
| complex |
The the Sysprep domain setting for a Windows virtual machine template. Requires a name from the domains collection. See Chapter 16, Domains for more information about domains.
|
Example 14.1. An XML representation of a virtual machine template
<template id="00000000-0000-0000-0000-000000000000"
href="/api/templates/00000000-0000-0000-0000-000000000000">
<name>Blank</name>
<description>Blank template</description>
<actions>
<link rel="export"
href="/api/templates/00000000-0000-0000-0000-000000000000/export"/>
</actions>
<link rel="disks"
href="/api/templates/00000000-0000-0000-0000-000000000000/disks"/>
<link rel="nics"
href="/api/templates/00000000-0000-0000-0000-000000000000/nics"/>
<link rel="cdroms"
href="/api/templates/00000000-0000-0000-0000-000000000000/cdroms"/>
<link rel="permissions"
href="/api/templates/00000000-0000-0000-0000-000000000000/permissions"/>
<type>server</type>
<status>
<state>ok</state>
</status>
<memory>536870912</memory>
<cpu>
<topology cores="1" sockets="1"/>
</cpu>
<os>
<boot dev="hd"/>
<kernel/>
<initrd/>
<cmdline/>
</os>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/>
<creation_time>2010-08-16T14:24:29</creation_time>
<origin>rhev</origin>
<highly_available>
<enabled>true</enabled>
<priority>100</priority>
</highly_available>
<display>
<type>vnc</type>
<port>5910</port>
<monitors>1</monitors>
</display>
<stateless>false</stateless>
<usb>
<enabled>true</enabled>
</usb>
</template>
name and vm elements. Identify the vm with the id attribute or name element. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 14.2. Creating a template from a virtual machine
POST /api/templates HTTP/1.1
Accept: application/xml
Content-type: application/xml
<template>
<name>template1</name>
<vm id="082c794b-771f-452f-83c9-b2b5a19c0399"/>
</template>
name, description, type, memory, cpu topology, os, high_availability, display, stateless, usb and timezone elements are updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 14.3. Updating a virtual machine template to contain 1 GB of memory
PUT /api/templates/a03dca95-98cb-430d-89dc-b11482543748 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<template>
<memory>1073741824</memory>
</template>
DELETE request.
Example 14.4. Removing a virtual machine template
DELETE /api/templates/a03dca95-98cb-430d-89dc-b11482543748 HTTP/1.1 HTTP/1.1 204 No Content
vms collection:
disks- This is a read-only collection. See Section 13.1, “Disks Sub-Collection” for more information.nics- Thenicssub-collection accepts requests for creation, modification and removal of network interfaces in a virtual machine template. See Section 13.2, “Network Interfaces Sub-Collection” for more information.cdroms- This is a read-only collection. See Section 13.3, “CD-ROMs Sub-Collection” for more information.
templates collection contains an export action. Information on the action for importing templates is found in Section 11.2, “ Export Storage Domains ”.
Export storage domain. A destination storage domain is specified with a storage_domain reference. By default, the export action overwrites any existing template with the same name in the destination domain. The exclusive parameter set to true avoids this.
Example 14.5. Action to export a template to an export storage domain
POST /api/templates/00000000-0000-0000-0000-000000000000/export HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed"/>
<exclusive>true<exclusive/>
</action>
vmpools collection provides information about the virtual machine pools in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="vmpools" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 15.1. Virtual machine pool elements
| Element | Type | Description | Properties |
|---|---|---|---|
size
| integer | The number of virtual machines in the pool. | |
cluster id=
| GUID | A reference to the cluster resource which virtual machines in this pool run. |
|
template id=
| GUID | A reference to the template resource which virtual machines in this pool are based. |
|
Example 15.1. An XML representation of a virtual machine pool
<vmpool id="2d2d5e26-1b6e-11e1-8cda-001320f76e8e"
href="/api/vmpools/2d2d5e26-1b6e-11e1-8cda-001320f76e8e">
<name>VMPool1</name>
<description>Virtual Machine Pool 1</description>
<size>2</size>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/>
<template id="00000000-0000-0000-0000-000000000000"
href="/api/templates/00000000-0000-0000-0000-000000000000"/>
</vmpool>
name, cluster and template elements. Identify the cluster and template with the id attribute or name element. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 15.2. Creating a virtual machine pool
POST /api/vmpools HTTP/1.1
Accept: application/xml
Content-type: application/xml
<vmpool>
<name>VM Pool A</name>
<cluster id="99408929-82cf-4dc7-a532-9d998063fa95"
href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/>
<template id="00000000-0000-0000-0000-000000000000"
href="/api/templates/00000000-0000-0000-0000-000000000000"/>
</vmpool>
name, description and size are updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 15.3. Updating a virtual machine pool
PUT /api/vmpools/2d2d5e26-1b6e-11e1-8cda-001320f76e8e HTTP/1.1
Accept: application/xml
Content-type: application/xml
<vmpool>
<name>VM Pool B</name>
<description>Virtual Machine Pool B</description>
<size>3</size>
</vmpool>
DELETE request.
Example 15.4. Removing a virtual machine
DELETE /api/vmpools/2d2d5e26-1b6e-11e1-8cda-001320f76e8e HTTP/1.1 HTTP/1.1 204 No Content
Important
domains collection. Domain information is referenced with the rel="domains" link.
Table 16.1. Domain elements
| Element | Type | Description |
|---|---|---|
name
| string | The domain name. |
link rel="users"
| relationship | A link to the sub-collection for users associated with this domain. |
link rel="groups"
| relationship | A link to the sub-collection for groups associated with this domain. |
users and groups sub-collections also accept search queries. See Section 7.2.3, “ Searching Collections with Queries ” for more information.
Example 16.1. An XML representation of a domain resource
<domain id="77696e32-6b38-7268-6576-2e656e676c61"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61">
<name>domain.example.com</name>
<link rel="users"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/users"/>
<link rel="groups"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/groups"/>
<link rel="users/search"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/
users?search={query}"/>
<link rel="groups/search"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/
groups?search={query}"/>
</domain>
Note
domains collection and its sub-collections are read-only.
users sub-collection contains all users in the directory service. This information is used to add new users to the Red Hat Enterprise Virtualization environment as per Chapter 19, Users.
Table 16.2. Domain user elements
| Element | Type | Description |
|---|---|---|
name
| string | The name of the user. |
user_name
| string | The username from directory service. |
domain id
| GUID | The containing directory service domain. |
groups
| complex | A list of directory service groups for this user. |
Example 16.2. An XML representation of a user in the users sub-collection
<user id="225f15cd-e891-434d-8262-a66808fcb9b1"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/users/
d3b4e7be-5f57-4dac-b937-21e1771a501f">
<name>RHEV-M Admin</name>
<user_name>rhevmadmin@domain.example.com</user_name>
<domain id="77696e32-6b38-7268-6576-2e656e676c61"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61"/>
<groups>
<group>
<name>domain.example.com/Users/Enterprise Admins</name>
</group>
<group>
<name>domain.example.com/Users/Domain Admins</name>
</group>
...
</groups>
</user>
groups sub-collection contains all groups in the directory service. A domain group resource contains a set of elements.
Table 16.3. Domain group elements
| Element | Type | Description |
|---|---|---|
name
| string | The name of the group. |
domain id
| GUID | The containing directory service domain. |
Example 16.3. An XML representation of a group in the groups sub-collection
<group id="85bf8d97-273c-4a5c-b801-b17d58330dab"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/groups/
85bf8d97-273c-4a5c-b801-b17d58330dab">
<name>example.com/Users/Enterprise Admins</name>
<domain id="77696e32-6b38-7268-6576-2e656e676c61"
href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61"/>
</group>
groups collection contains imported groups from directory services. A group resource contains a set of elements.
Table 17.1. Imported group elements
| Element | Type | Description |
|---|---|---|
link rel="tags"
| relationship |
A link to the tags sub-collection for tags attached to this group.
|
link rel="permissions"
| relationship |
A link to the permissions sub-collection for permissions attached to this group.
|
link rel="roles"
| relationship |
A link to the roles sub-collection for roles attached to this group.
|
Example 17.1. An XML representation of a group resource
<group id="85bf8d97-273c-4a5c-b801-b17d58330dab"
href="/api/groups/85bf8d97-273c-4a5c-b801-b17d58330dab">
<name>Everyone</name>
<link rel="tags"
href="/api/groups/85bf8d97-273c-4a5c-b801-b17d58330dab/tags"/>
<link rel="permissions"
href="/api/groups/85bf8d97-273c-4a5c-b801-b17d58330dab/permissions"/>
<link rel="roles"
href="/api/groups/85bf8d97-273c-4a5c-b801-b17d58330dab/roles"/>
</group>
rel="roles" link obtained from the entry point URI (see Chapter 4, Entry Point) provides access to a static set of system roles. Each individual role element contains the following:
Note
Table 18.1. Role elements
| Element | Type | Description | Properties |
|---|---|---|---|
link="permits"
| relationship |
A link to the permits sub-collection for role permits.
|
|
mutable
| Boolean: true or false |
Defines the ability to update or delete the role. Roles with mutable set to false are roles built into the Red Hat Enterprise Virtualization environment.
|
|
administrative
| Boolean: true or false | Defines the role as administrative-only. |
Example 18.1. An XML representation of the roles collection
<roles>
<role id="00000000-0000-0000-0000-000000000001"
href="/api/roles/00000000-0000-0000-0000-000000000001">
<name>SuperUser</name>
<description>Roles management administrator</description>
<link rel="permits"
href="/api/roles/00000000-0000-0000-0000-000000000001/permits"/>
<mutable>false</mutable>
<administrative>true</administrative>
</role>
<role id="00000000-0000-0000-0001-000000000001"
href="/api/roles/00000000-0000-0000-0001-000000000001">
<name>RHEVMUser</name>
<description>RHEVM user</description>
<link rel="permits"
href="/api/roles/00000000-0000-0000-0001-000000000001/permits"/>
<mutable>false</mutable>
<administrative>false</administrative>
</role>
<role id="00000000-0000-0000-0001-000000000002"
href="/api/roles/00000000-0000-0000-0001-000000000002">
<name>RHEVMPowerUser</name>
<description>RHEVM power user</description>
<link rel="permits"
href="/api/roles/00000000-0000-0000-0001-000000000002/permits"/>
<mutable>false</mutable>
<administrative>false</administrative>
</role>
</roles>
name, administrative and a list of initial permits. See Section 7.2.4, “ Creating a Resource in a Collection ” for more information.
Example 18.2. Creating a role
POST /api/roles HTTP/1.1
Accept: application/xml
Content-type: application/xml
<role>
<name>Finance Role</name>
<administrative>true</administrative>
<permits>
<permit id="1"/>
</permits>
</role>
name, description and administrative elements are updatable post-creation. See Section 7.3.2, “ Updating a Resource ” for more information.
Example 18.3. Updating a role
PUT /api/roles/8de42ad7-f307-408b-80e8-9d28b85adfd7 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<role>
<name>Engineering Role</name>
<description>Standard users in the Engineering Role</description>
<administrative>false</administrative>
</role>
DELETE request.
Example 18.4. Removing a role
DELETE /api/roles/8de42ad7-f307-408b-80e8-9d28b85adfd7 HTTP/1.1 HTTP/1.1 204 No Content
permits, which the API lists in capabilities. For more information on access to permits, see Section 6.2, “Permits”.
permits are listed as a sub-collection:
Example 18.5. Listing a role's permits
GET /api/roles/b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9/permits HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<permits>
<permit id="1"
href="/api/roles/b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9/permits/1">
<name>create_vm</name>
<administrative>false</administrative>
<role id="b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9"
href="/api/roles/b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9"/>
</permit>
...
</permits>
permit to a role with a POST request to the permits sub-collection. Use either an id attribute or a name element to specify the permit to assign.
Example 18.6. Assign a permit to a role
POST /api/roles/b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9/permits HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<permit id="1"/>
HTTP/1.1 201 Created
Content-Type: application/xml
<permits>
<permit id="1"
href="/api/roles/b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9/permits/1">
<name>create_vm</name>
<administrative>false</administrative>
<role id="b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9"
href="/api/roles/b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9"/>
</permit>
</permits>
permit from a role with a DELETE request to the permit resource.
Example 18.7. Remove a permit from a role
DELETE /api/roles/b67dfbe2-0dbc-41e4-86d3-a2fbef02cfa9/permits/1 HTTP/1.1 HTTP/1.1 204 No Content
rel="users" link. Individual user elements contain the following:
Note
Table 19.1. User elements
| Element | Type | Description | Properties |
|---|---|---|---|
user_name
| string | The user principal name (UPN). The UPN is used as a more convenient identifier when adding a new user. |
|
link rel="tags"
| relationship |
A link to the tags sub-collection for user resources.
| |
link rel="roles"
| relationship |
A link to the roles sub-collection for user resources.
| |
name
| string | A free-text name for the user. |
|
domain
| string | The containing directory service domain. |
|
groups
| complex | A list of directory service groups for this user. |
|
Example 19.1. An XML representation of a user resource
GET /api/users HTTP/1.1
Accept: application/xml
<user id="225f15cd-e891-434d-8262-a66808fcb9b1"
href="/api/users/225f15cd-e891-434d-8262-a66808fcb9b1">
<name>RHEV-M Admin</name>
<actions/>
<link rel="roles"
href="/api/users/225f15cd-e891-434d-8262-a66808fcb9b1/roles"/>
<link rel="tags"
href="/api/users/225f15cd-e891-434d-8262-a66808fcb9b1/tags"/>
<domain>domain.example.com</domain>
<logged_in>false</logged_in>
<user_name>rhevmadmin@domain.example.com</user_name>
<groups>
<group>Group Policy Creator Owners@domain.example.com/Users</group>
<group>Domain Admins@domain.example.com/Users</group>
<group>Enterprise Admins@domain.example.com/Users</group>
<group>Schema Admins@domain.example.com/Users</group>
<group>Administrators@domain.example.com/Builtin</group>
</groups>
</user>
POST request to the users collection. The client-provided new user representation includes an embedded roles list with at least one initial role to assign to the user. For example, the following request assigns two initial roles to the user joe@domain.example.com:
Example 19.2. Adding a user from directory service and assigning two roles
POST /api/users HTTP/1.1
Content-Type: application/xml
Accept: application/xml
<user>
<user_name>joe@domain.example.com</user_name>
<roles>
<role>
<name>RHEVMPowerUser</name>
</role>
<role id="00000000-0000-0000-0001-000000000003"/>
</roles>
</user>
Note
domains collection prior to creation of the user.
POST or DELETE requests to the roles sub-collection of an individual user. The example below illustrates how the API adds the RHEVMVDIUser role to the role assignments for a particular user.
Note
user element is only used for the initial creation. All interactions post-creation with the user's role assignments go through the roles sub-collection.
Example 19.3. Adding roles to a user
POST /api/users/225f15cd-e891-434d-8262-a66808fcb9b1/roles HTTP/1.1
Content-Type: application/xml
Accept: application/xml
<role>
<name>RHEVMVDIUser</name>
</role>
Note
PUT verb. The only changes allowed post-creation are in the user's role assignments.
DELETE request on the users collection. The directory service domain remains unchanged after such a deletion.
tags collection provides information about tags in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="tags" link obtained from the entry point URI (see Chapter 4, Entry Point).
Note
Table 20.1. Tag elements
| Element | Type | Description | Properties |
|---|---|---|---|
host
| GUID | A reference to the host which the tag is attached. See Chapter 12, Hosts. |
|
user
| GUID | A reference to the user which the tag is attached. See Chapter 19, Users. |
|
vm
| GUID | A reference to the VM which the tag is attached. See Chapter 13, Virtual Machines. |
|
parent
| complex | A reference to the VM which the tag is attached. |
Example 20.1. An XML representation of a tag resource
<tag id="f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e"
href="/api/tags/f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e">
<name>Finance</name>
<description>Resources for the Finance department</description>
<parent>
<tag id="-1" href="/api/tags/-1"/>
</parent>
</tag>
name element. The name, description and parent elements are updatable post-creation.
link rel="tags" from a host, user or vms represents the set of tags associated with the entity.
tag representations are as described in Chapter 20, Tags, except they also contain a host id, user id or vm id reference to the entity in question.
POSTing a tag reference (identifying the tag either by its id or name) to the collection.
Example 20.2. Associating a tag with a virtual machine
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/tags HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<tag>
<name>Finance</name>
</tag>
HTTP/1.1 201 Created
Content-Type: application/xml
<tag id="f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/tags/
f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e">
<name>Finance</name>
<description>Resources for the Finance department</description>
<vm id="5114bb3e-a4e6-44b2-b783-b3eea7d84720"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720"/>
</tag>
DELETE request to the appropriate element in the collection.
Example 20.3. Removing a tag from a virtual machine
DELETE /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/tags/f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e HTTP/1.1 HTTP/1.1 204 No Content
collection/search URI template for the appropriate collection should be used to search for entities matching tag=MyTag.
Example 20.4. Querying a collection for tagged resources
GET /api/vms?search=tag%3DFinance HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<vms>
<vm id="5114bb3e-a4e6-44b2-b783-b3eea7d84720"
href="/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720">
...
</vm>
...
</vms>
parent element to a tag to create a hierarchical link to a parent tag. The tags are presented as a flat collection, which descends from the root tag, with tag representations containing a link element to a parent tag
Note
root tag is a special pseudo-tag assumed as the default parent tag if no parent tag is specified. The root tag cannot be deleted nor assigned a parent tag.
Example 20.5. Tag Hierarchy
<tags>
<tag id="-1" href="/api/tags/-1">
<name>root</name>
<description>root</description>
<parent>
<tag id="-1" href="/api/tags/-1"/>
</parent>
</tag>
<tag id="f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e"
href="/api/tags/f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e">
<name>Finance</name>
<description>Resources for the Finance department</description>
<parent>
<tag id="-1" href="/api/tags/-1"/>
</parent>
</tag>
<tag id="ac18dabf-23e5-12be-a383-a38b165ca7bd"
href="/api/tags/ac18dabf-23e5-12be-a383-a38b165ca7bd">
<name>Billing</name>
<description>Billing Resources</description>
<parent>
<tag id="f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e"
href="/api/tags/f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e"/>
</parent>
</tag>
</tags>
root (id: -1)
- Finance (id: f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e)
- Billing (id: ac18dabf-23e5-12be-a383-a38b165ca7bd)
POSTing a new tag with a parent element creates an association with a parent tag, using either the id attribute or the name element to reference the parent tag
Example 20.6. Setting an association with a parent tag with the id attribute
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/tags HTTP/1.1
Accept: application/xml
Content-Type: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<tag>
<name>Billing</name>
<description>Billing Resources</description>
<parent>
<tag id="f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e"/>
</parent>
</tag>
Example 20.7. Setting an association with a parent tag with the name element
POST /api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/tags HTTP/1.1
Accept: application/xml
Content-Type: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<tag>
<name>Billing</name>
<description>Billing Resources</description>
<parent>
<tag>
<name>Finance</name>
</tag>
</parent>
</tag>
PUT request:
Example 20.8. Changing the parent tag
PUT /api/tags/ac18dabf-23e5-12be-a383-a38b165ca7bd HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<tag>
<parent>
<tag id="f436ebfc-67f2-41bd-8ec6-902b6f7dcb5e"/>
</parent>
</tag>
rel="events" link obtained from the entry point URI accesses the events collection and lists system events from Red Hat Enterprise Virtualization Manager.
Table 21.1. Event elements
| Element | Type | Description |
|---|---|---|
description
| string | A description of the system event |
code
| integer | The integer event code. See Appendix C, Event Codes for a full list of event codes with descriptions. |
severity
|
One of normal, warning, error or alert
| The level of severity for the event. |
time
|
xsd:dateTime format: YYYY-MM-DDThh:mm:ss
| The timestamp indicating when the event happened. |
user id
| GUID | The identification code for the user who triggered the event. |
Example 21.1. An XML representation of the events collection
<events>
<event id="537" href="/api/events/537">
<description>User vdcadmin logged in.</description>
<code>30</code>
<severity>normal</severity>
<time>2011-01-12T10:48:27.827+02:00</time>
<user id="9b9002d1-ec33-4083-8a7b-31f6b8931648"
href="/api/users/9b9002d1-ec33-4083-8a7b-31f6b8931648"/>
</event>
...
</events>
user, an event representation also contains a set of XML element relationships to resources relevant to the event.
Example 21.2. An XML representation of a virtual machine creation event
<event id="635" href="/api/events/635">
<description>VM bar was created by rhevadmin.</description>
<code>34</code>
<severity>normal</severity>
<time>2011-07-11T16:32:03.172+02:00</time>
<user id="4621b611-43eb-4d2b-ae5f-1180850268c4"
href="/api/users/4621b611-43eb-4d2b-ae5f-1180850268c4"/>
<vm id="9b22d423-e16b-4dd8-9c06-c8e9358fbc66"
href="/api/vms/9b22d423-e16b-4dd8-9c06-c8e9358fbc66"/>
<storage_domain id="a8a0e93d-c570-45ab-9cd6-3c68ab31221f"
href="/api/storagedomains/a8a0e93d-c570-45ab-9cd6-3c68ab31221f"/>
</event>
Note
events collection is read-only.
events collection provides search queries similar to other resource collections (See Section 7.2.3, “ Searching Collections with Queries ”). An additional feature when searching the events collection is the ability to search from a certain event. This queries all of events since a specified event.
from argument added to the URI after the query. This from argument references an event id code.
Example 21.3. Searching from an event
GET /api/events?search=type%3D30&from=1012 HTTP/1.1 Accept: application/xml
type set to 30 since id="1012"
HTTP/1.1 200 OK
Content-Type: application/xml
<events>
<event id="1018" href="/api/events/1018">
<description>User admin logged in.</description>
<code>30</code>
<severity>normal</severity>
<time>2011-07-11T14:03:22.485+10:00</time>
<user id="80b71bae-98a1-11e0-8f20-525400866c73"
href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
</event>
<event id="1016" href="/api/events/1016">
<description>User admin logged in.</description>
<code>30</code>
<severity>normal</severity>
<time>2011-07-11T14:03:07.236+10:00</time>
<user id="80b71bae-98a1-11e0-8f20-525400866c73"
href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
</event>
<event id="1014" href="/api/events/1014">
<description>User admin logged in.</description>
<code>30</code>
<severity>normal</severity>
<time>2011-07-11T14:02:16.009+10:00</time>
<user id="80b71bae-98a1-11e0-8f20-525400866c73"
href="/api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
</event>
</events>
page command in a search query.
page value in combination with the sortby clause:
sortby time asc page 1
sortby clause defines the base element to order of the results and whether the results are ascending or descending. For search queries of events, set the base element to time and the order to ascending (asc) so the API displays all events from the creation of your virtualization environment.
page condition defines the page number. One page equals the default number of events to list. Pagination begins at page 1. To view more pages, increase the page value:
sortby time asc page 2
sortby time asc page 3
sortby time asc page 4
Example 21.4. Paginating events
event resources. The URL-encoded request is:
GET /api/events?search=sortby%20time%20asc%20page%201 HTTP/1.1 Accept: application/xml
page value to view the next page of results.
GET /api/events?search=sortby%20time%20asc%20page%202 HTTP/1.1 Accept: application/xml
from argument to set the starting id.
GET /api/events?search=sortby%20time%20asc%20page%202&from=30 HTTP/1.1 Accept: application/xml
yum install curl
Usage: curl [options] uriuri refers to target HTTP address to send the request. This is a location on your Red Hat Enterprise Virtualization Manager host within the API entry point path (/api).
cURL options
- -X
COMMAND, --requestCOMMAND - The request command to use. In the context of the REST API, use
GET,POST,PUTorDELETE.Example:-X GET - -H
LINE, --headerLINE - HTTP header to include with the request. Use multiple header options if more than one header is required.Example:
-H "Accept: application/xml" -H "Content-Type: application/xml" - -u
USERNAME:PASSWORD, --userUSERNAME:PASSWORD - The username and password of the Red Hat Enterprise Virtualization user. This attribute acts as a convenient replacement for the
Authorization:header.Example:-u admin@internal:p@55w0rd! - --cacert
CERTIFICATE - The location of the certificate file for SSL communication to the REST API. The certificate file is saved locally on the client machine. Use the
-kattribute to bypass SSL. See Chapter 2, Authentication and Security for more information on obtaining a certificate.Example:--cacert ~/Certificates/rhevm.cer - -d
BODY, --dataBODY - The body to send for requests. Use with
POST,PUTandDELETErequests. Ensure to specify theContent-Type: application/xmlheader if a body exists in the request.Example:-d "<cdrom><file id='rhel-server-6.0-x86_64-dvd.iso'/></cdrom>"
Example A.1. GET request
GET request lists the virtual machines in the vms collection. Note that a GET request does not contain a body.
GET /api/vms HTTP/1.1 Accept: application/xml
GET), header (Accept: application/xml) and URI (https://[RHEVM-Host]:8443/api/vms) into the following cURL command:
$ curl -X GET -H "Accept: application/xml" -u[USER:PASS]--cacert[CERT]https://[RHEVM-Host]:8443/api/vms
vms collection displays.
Example A.2. POST request
POST request creates a virtual machine in the vms collection. Note that a POST request requires a body.
POST /api/vms HTTP/1.1
Accept: application/xml
Content-type: application/xml
<vm>
<name>vm1</name>
<cluster>
<name>default</name>
</cluster>
<template>
<name>Blank</name>
</template>
<memory>536870912</memory>
<os>
<boot dev="hd"/>
</os>
</vm>
POST), headers (Accept: application/xml and Content-type: application/xml), URI (https://[RHEVM-Host]:8443/api/vms) and request body into the following cURL command:
$ curl -X POST -H "Accept: application/xml" -H "Content-type: application/xml" -u[USER:PASS]--cacert[CERT]-d "<vm><name>vm1</name><cluster><name>default</name></cluster><template><name>Blank</name></template><memory>536870912</memory><os><boot dev='hd'/></os></vm>" https://[RHEVM-Host]:8443/api/vms
Example A.3. PUT request
PUT request updates the memory of a virtual machine resource. Note that a PUT request requires a body.
PUT /api/vms/082c794b-771f-452f-83c9-b2b5a19c0399 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<vm>
<memory>1073741824</memory>
</vm>
PUT), headers (Accept: application/xml and Content-type: application/xml), URI (https://[RHEVM-Host]:8443/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399) and request body into the following cURL command:
$ curl -X PUT -H "Accept: application/xml" -H "Content-type: application/xml" -u[USER:PASS]--cacert[CERT]-d "<vm><memory>1073741824</memory></vm>" https://[RHEVM-Host]:8443//api/vms/082c794b-771f-452f-83c9-b2b5a19c039
Example A.4. DELETE request
DELETE request removes a virtual machine resource.
DELETE /api/vms/082c794b-771f-452f-83c9-b2b5a19c0399 HTTP/1.1
DELETE) and URI (https://[RHEVM-Host]:8443/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399) into the following cURL command:
$ curl -X DELETE -u[USER:PASS]--cacert[CERT]https://[RHEVM-Host]:8443//api/vms/082c794b-771f-452f-83c9-b2b5a19c039
Accept: application/xml request header is optional due to the empty result of DELETE requests.
Example A.5. DELETE request with body
DELETE request force removes a virtual machine resource as indicated with the optional body.
DELETE /api/vms/082c794b-771f-452f-83c9-b2b5a19c0399 HTTP/1.1 Accept: application/xml Content-type: application/xml <action> <force>true</force> </action>
DELETE), headers (Accept: application/xml and Content-type: application/xml), URI (https://[RHEVM-Host]:8443/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399) and request body into the following cURL command:
$ curl -X DELETE -H "Accept: application/xml" -H "Content-type: application/xml" -u[USER:PASS]--cacert[CERT]-d "<action><force>true</force></action>" https://[RHEVM-Host]:8443//api/vms/082c794b-771f-452f-83c9-b2b5a19c039
Procedure B.1. Import a certificate into a new Java keystore
rhevm.cer certificate from Section 2.1, “TLS/SSL Certification” into a Java keystore. This procedure requires the keytool management utility from the Java Development Kit (JDK) available for Linux and Windows systems.
- Access your client machine and locate the
rhevm.cercertificate. - Import the
rhevm.cercertificate using the Java keytool management utility.keytool -importcert -v -trustcacerts -keystore restapi.jks -noprompt -alias rhevm -file rhevm.cer
The keytool utility creates a new keystore file namedrestapi.jks. - keytool asks for the keystore password. Enter a password and keytool asks to verify it.
- keytool adds the
rhevm.cercertificate to therestapi.jkskeystore. Use keytool -list command to view the certificate's entry in the keystore:keytool -list -keystore restapi.jks -storepass [password]
Important
openssl x509 -in rhevm.cer -out rhevm.new -outform [pem|der]This creates a file called
rhevm.new to use in place of rhevm.cer.
Table C.1. Event codes
| Code | Description |
|---|---|
0
|
UNASSIGNED
|
1
|
VDC_START
|
2
|
VDC_STOP
|
12
|
HOST_FAILURE
|
13
|
HOST_DETECTED
|
14
|
HOST_RECOVER
|
15
|
HOST_MAINTENANCE
|
16
|
HOST_ACTIVATE
|
17
|
HOST_MAINTENANCE_FAILED
|
18
|
HOST_ACTIVATE_FAILED
|
19
|
HOST_RECOVER_FAILED
|
20
|
USER_HOST_START
|
21
|
USER_HOST_STOP
|
22
|
IRS_FAILURE
|
26
|
IRS_DISK_SPACE_LOW
|
30
|
USER_VDC_LOGIN
|
31
|
USER_VDC_LOGOUT
|
32
|
USER_RUN_VM
|
33
|
USER_STOP_VM
|
34
|
USER_ADD_VM
|
35
|
USER_UPDATE_VM
|
36
|
USER_REMOVE_VM
|
37
|
USER_ADD_VM_STARTED
|
38
|
USER_CHANGE_DISK_VM
|
39
|
USER_PAUSE_VM
|
40
|
USER_RESUME_VM
|
41
|
USER_HOST_RESTART
|
42
|
USER_ADD_HOST
|
43
|
USER_UPDATE_HOST
|
44
|
USER_REMOVE_HOST
|
45
|
USER_CREATE_SNAPSHOT
|
46
|
USER_TRY_BACK_TO_SNAPSHOT
|
47
|
USER_RESTORE_FROM_SNAPSHOT
|
48
|
USER_ADD_VM_TEMPLATE
|
49
|
USER_UPDATE_VM_TEMPLATE
|
50
|
USER_REMOVE_VM_TEMPLATE
|
51
|
USER_ADD_VM_TEMPLATE_FINISHED_SUCCESS
|
52
|
USER_ADD_VM_TEMPLATE_FINISHED_FAILURE
|
53
|
USER_ADD_VM_FINISHED_SUCCESS
|
54
|
USER_FAILED_RUN_VM
|
55
|
USER_FAILED_PAUSE_VM
|
56
|
USER_FAILED_STOP_VM
|
57
|
USER_FAILED_ADD_VM
|
58
|
USER_FAILED_UPDATE_VM
|
59
|
USER_FAILED_REMOVE_VM
|
60
|
USER_ADD_VM_FINISHED_FAILURE
|
61
|
VM_DOWN
|
62
|
VM_MIGRATION_START
|
63
|
VM_MIGRATION_DONE
|
64
|
VM_MIGRATION_ABORT
|
65
|
VM_MIGRATION_FAILED
|
66
|
VM_FAILURE
|
68
|
USER_CREATE_SNAPSHOT_FINISHED_SUCCESS
|
69
|
USER_CREATE_SNAPSHOT_FINISHED_FAILURE
|
70
|
USER_RUN_VM_AS_STATELESS_FINISHED_FAILURE
|
71
|
USER_TRY_BACK_TO_SNAPSHOT_FINISH_SUCCESS
|
72
|
USER_CHANGE_FLOPPY_VM
|
73
|
USER_INITIATED_SHUTDOWN_VM
|
74
|
USER_FAILED_SHUTDOWN_VM
|
75
|
USER_FAILED_CHANGE_FLOPPY_VM
|
76
|
USER_STOPPED_VM_INSTEAD_OF_SHUTDOWN
|
77
|
USER_FAILED_STOPPING_VM_INSTEAD_OF_SHUTDOWN
|
78
|
USER_ADD_DISK_TO_VM
|
79
|
USER_FAILED_ADD_DISK_TO_VM
|
80
|
USER_REMOVE_DISK_FROM_VM
|
81
|
USER_FAILED_REMOVE_DISK_FROM_VM
|
82
|
USER_MOVED_VM
|
83
|
USER_FAILED_MOVE_VM
|
84
|
USER_MOVED_TEMPLATE
|
85
|
USER_FAILED_MOVE_TEMPLATE
|
86
|
USER_COPIED_TEMPLATE
|
87
|
USER_FAILED_COPY_TEMPLATE
|
88
|
USER_UPDATE_VM_DISK
|
89
|
USER_FAILED_UPDATE_VM_DISK
|
90
|
USER_HOST_SHUTDOWN
|
91
|
USER_MOVED_VM_FINISHED_SUCCESS
|
92
|
USER_MOVED_VM_FINISHED_FAILURE
|
93
|
USER_MOVED_TEMPLATE_FINISHED_SUCCESS
|
94
|
USER_MOVED_TEMPLATE_FINISHED_FAILURE
|
95
|
USER_COPIED_TEMPLATE_FINISHED_SUCCESS
|
96
|
USER_COPIED_TEMPLATE_FINISHED_FAILURE
|
97
|
USER_ADD_DISK_TO_VM_FINISHED_SUCCESS
|
98
|
USER_ADD_DISK_TO_VM_FINISHED_FAILURE
|
99
|
USER_TRY_BACK_TO_SNAPSHOT_FINISH_FAILURE
|
100
|
USER_RESTORE_FROM_SNAPSHOT_FINISH_SUCCESS
|
101
|
USER_RESTORE_FROM_SNAPSHOT_FINISH_FAILURE
|
102
|
USER_FAILED_CHANGE_DISK_VM
|
103
|
USER_FAILED_RESUME_VM
|
104
|
USER_FAILED_ADD_HOST
|
105
|
USER_FAILED_UPDATE_HOST
|
106
|
USER_FAILED_REMOVE_HOST
|
107
|
USER_FAILED_HOST_RESTART
|
108
|
USER_FAILED_ADD_VM_TEMPLATE
|
109
|
USER_FAILED_UPDATE_VM_TEMPLATE
|
110
|
USER_FAILED_REMOVE_VM_TEMPLATE
|
111
|
USER_STOP_SUSPENDED_VM
|
112
|
USER_STOP_SUSPENDED_VM_FAILED
|
113
|
USER_REMOVE_VM_FINISHED
|
114
|
USER_VDC_LOGIN_FAILED
|
115
|
USER_FAILED_TRY_BACK_TO_SNAPSHOT
|
116
|
USER_FAILED_RESTORE_FROM_SNAPSHOT
|
117
|
USER_FAILED_CREATE_SNAPSHOT
|
118
|
USER_FAILED_HOST_START
|
119
|
VM_DOWN_ERROR
|
120
|
VM_MIGRATION_FAILED_FROM_TO
|
121
|
SYSTEM_HOST_RESTART
|
122
|
SYSTEM_FAILED_HOST_RESTART
|
123
|
HOST_SLOW_STORAGE_RESPONSE_TIME
|
124
|
VM_IMPORT
|
125
|
VM_IMPORT_FAILED
|
126
|
VM_NOT_RESPONDING
|
127
|
HOST_RUN_IN_NO_KVM_MODE
|
128
|
VM_MIGRATION_TRYING_RERUN
|
129
|
VM_CLEARED
|
130
|
USER_FAILED_HOST_SHUTDOWN
|
131
|
USER_EXPORT_VM
|
132
|
USER_EXPORT_VM_FAILED
|
133
|
USER_EXPORT_TEMPLATE
|
134
|
USER_EXPORT_TEMPLATE_FAILED
|
135
|
TEMPLATE_IMPORT
|
136
|
TEMPLATE_IMPORT_FAILED
|
137
|
USER_FAILED_HOST_STOP
|
138
|
VM_PAUSED_ENOSPC
|
139
|
VM_PAUSED_ERROR
|
140
|
VM_MIGRATION_FAILED_DURING_MOVE_TO_MAINTANANCE
|
141
|
HOST_VERSION_NOT_SUPPORTED_FOR_CLUSTER
|
142
|
VM_SET_TO_UNKNOWN_STATUS
|
143
|
VM_WAS_SET_DOWN_DUE_TO_HOST_REBOOT_OR_MANUAL_FENCE
|
144
|
VM_IMPORT_INFO
|
145
|
VM_BLK_VIRTIO_NO_CACHE
|
149
|
USER_ADD
|
150
|
USER_INITIATED_RUN_VM
|
151
|
USER_INITIATED_RUN_VM_FAILED
|
152
|
USER_RUN_VM_ON_NON_DEFAULT_HOST
|
153
|
USER_STARTED_VM
|
182
|
USER_FAILED_ATTACH_USER_TO_VM
|
201
|
IRS_DISK_SPACE_LOW_ERROR
|
204
|
IRS_HOSTED_ON_HOST
|
250
|
USER_UPDATE_VM_CLUSTER_DEFAULT_HOST_CLEARED
|
251
|
USER_REMOVE_VM_TEMPLATE_FINISHED
|
300
|
USER_ADD_VM_POOL
|
301
|
USER_ADD_VM_POOL_FAILED
|
302
|
USER_ADD_VM_POOL_WITH_VMS
|
303
|
USER_ADD_VM_POOL_WITH_VMS_FAILED
|
304
|
USER_REMOVE_VM_POOL
|
305
|
USER_REMOVE_VM_POOL_FAILED
|
306
|
USER_ADD_VM_TO_POOL
|
307
|
USER_ADD_VM_TO_POOL_FAILED
|
308
|
USER_REMOVE_VM_FROM_POOL
|
309
|
USER_REMOVE_VM_FROM_POOL_FAILED
|
310
|
USER_ATTACH_USER_TO_POOL
|
311
|
USER_ATTACH_USER_TO_POOL_FAILED
|
312
|
USER_DETACH_USER_FROM_POOL
|
313
|
USER_DETACH_USER_FROM_POOL_FAILED
|
314
|
USER_UPDATE_VM_POOL
|
315
|
USER_UPDATE_VM_POOL_FAILED
|
316
|
USER_ATTACH_USER_TO_VM_FROM_POOL
|
317
|
USER_ATTACH_USER_TO_VM_FROM_POOL_FAILED
|
318
|
USER_ATTACH_USER_TO_VM_FROM_POOL_FINISHED_SUCCESS
|
319
|
USER_ATTACH_USER_TO_VM_FROM_POOL_FINISHED_FAILURE
|
320
|
USER_ADD_VM_POOL_WITH_VMS_ADD_HOST_FAILED
|
325
|
USER_REMOVE_ADUSER
|
326
|
USER_FAILED_REMOVE_ADUSER
|
327
|
USER_FAILED_ADD_ADUSER
|
328
|
USER_ATTACH_USER_TO_TIME_LEASED_POOL
|
329
|
USER_ATTACH_USER_TO_TIME_LEASED_POOL_FAILED
|
330
|
USER_DETACH_USER_FROM_TIME_LEASED_POOL
|
331
|
USER_DETACH_USER_FROM_TIME_LEASED_POOL_FAILED
|
332
|
USER_ATTACH_AD_GROUP_TO_TIME_LEASED_POOL
|
333
|
USER_ATTACH_AD_GROUP_TO_TIME_LEASED_POOL_FAILED
|
334
|
USER_DETACH_AD_GROUP_FROM_TIME_LEASED_POOL
|
335
|
USER_DETACH_AD_GROUP_FROM_TIME_LEASED_POOL_FAILED
|
336
|
USER_UPDATE_USER_TO_TIME_LEASED_POOL
|
337
|
USER_UPDATE_USER_TO_TIME_LEASED_POOL_FAILED
|
338
|
USER_UPDATE_AD_GROUP_TO_TIME_LEASED_POOL
|
339
|
USER_UPDATE_AD_GROUP_TO_TIME_LEASED_POOL_FAILED
|
342
|
USER_MERGE_SNAPSHOT
|
343
|
USER_FAILED_MERGE_SNAPSHOT
|
344
|
USER_UPDATE_VM_POOL_WITH_VMS
|
345
|
USER_UPDATE_VM_POOL_WITH_VMS_FAILED
|
346
|
USER_PASSWORD_CHANGED
|
347
|
USER_PASSWORD_CHANGE_FAILED
|
348
|
USER_CLEAR_UNKNOWN_VMS
|
349
|
USER_FAILED_CLEAR_UNKNOWN_VMS
|
350
|
USER_ADD_BOOKMARK
|
351
|
USER_ADD_BOOKMARK_FAILED
|
352
|
USER_UPDATE_BOOKMARK
|
353
|
USER_UPDATE_BOOKMARK_FAILED
|
354
|
USER_REMOVE_BOOKMARK
|
355
|
USER_REMOVE_BOOKMARK_FAILED
|
356
|
USER_MERGE_SNAPSHOT_FINISHED_SUCCESS
|
357
|
USER_MERGE_SNAPSHOT_FINISHED_FAILURE
|
360
|
USER_DETACH_USER_FROM_VM
|
361
|
USER_FAILED_DETACH_USER_FROM_VM
|
400
|
USER_ATTACH_VM_TO_AD_GROUP
|
401
|
USER_ATTACH_VM_TO_AD_GROUP_FAILED
|
402
|
USER_DETACH_VM_TO_AD_GROUP
|
403
|
USER_DETACH_VM_TO_AD_GROUP_FAILED
|
404
|
USER_ATTACH_VM_POOL_TO_AD_GROUP
|
405
|
USER_ATTACH_VM_POOL_TO_AD_GROUP_FAILED
|
406
|
USER_DETACH_VM_POOL_TO_AD_GROUP
|
407
|
USER_DETACH_VM_POOL_TO_AD_GROUP_FAILED
|
408
|
USER_REMOVE_AD_GROUP
|
409
|
USER_REMOVE_AD_GROUP_FAILED
|
430
|
USER_UPDATE_TAG
|
431
|
USER_UPDATE_TAG_FAILED
|
432
|
USER_ADD_TAG
|
433
|
USER_ADD_TAG_FAILED
|
434
|
USER_REMOVE_TAG
|
435
|
USER_REMOVE_TAG_FAILED
|
436
|
USER_ATTACH_TAG_TO_USER
|
437
|
USER_ATTACH_TAG_TO_USER_FAILED
|
438
|
USER_ATTACH_TAG_TO_USER_GROUP
|
439
|
USER_ATTACH_TAG_TO_USER_GROUP_FAILED
|
440
|
USER_ATTACH_TAG_TO_VM
|
441
|
USER_ATTACH_TAG_TO_VM_FAILED
|
442
|
USER_ATTACH_TAG_TO_HOST
|
443
|
USER_ATTACH_TAG_TO_HOST_FAILED
|
444
|
USER_DETACH_HOST_FROM_TAG
|
445
|
USER_DETACH_HOST_FROM_TAG_FAILED
|
446
|
USER_DETACH_VM_FROM_TAG
|
447
|
USER_DETACH_VM_FROM_TAG_FAILED
|
448
|
USER_DETACH_USER_FROM_TAG
|
449
|
USER_DETACH_USER_FROM_TAG_FAILED
|
450
|
USER_DETACH_USER_GROUP_FROM_TAG
|
451
|
USER_DETACH_USER_GROUP_FROM_TAG_FAILED
|
452
|
USER_ATTACH_TAG_TO_USER_EXISTS
|
453
|
USER_ATTACH_TAG_TO_USER_GROUP_EXISTS
|
454
|
USER_ATTACH_TAG_TO_VM_EXISTS
|
455
|
USER_ATTACH_TAG_TO_HOST_EXISTS
|
456
|
USER_LOGGED_IN_VM
|
457
|
USER_LOGGED_OUT_VM
|
458
|
USER_LOCKED_VM
|
459
|
USER_UNLOCKED_VM
|
460
|
USER_DETACH_USER_FROM_TIME_LEASED_POOL_INTERNAL
|
461
|
USER_DETACH_USER_FROM_TIME_LEASED_POOL_FAILED_INTERNAL
|
462
|
USER_DETACH_AD_GROUP_FROM_TIME_LEASED_POOL_INTERNAL
|
463
|
USER_DETACH_AD_GROUP_FROM_TIME_LEASED_POOL_FAILED_INTERNAL
|
467
|
UPDATE_TAGS_VM_DEFAULT_DISPLAY_TYPE
|
468
|
UPDATE_TAGS_VM_DEFAULT_DISPLAY_TYPE_FAILED
|
470
|
USER_ATTACH_VM_POOL_TO_AD_GROUP_INTERNAL
|
471
|
USER_ATTACH_VM_POOL_TO_AD_GROUP_FAILED_INTERNAL
|
472
|
USER_ATTACH_USER_TO_POOL_INTERNAL
|
473
|
USER_ATTACH_USER_TO_POOL_FAILED_INTERNAL
|
494
|
HOST_MANUAL_FENCE_STATUS
|
495
|
HOST_MANUAL_FENCE_STATUS_FAILED
|
496
|
HOST_FENCE_STATUS
|
497
|
HOST_FENCE_STATUS_FAILED
|
498
|
HOST_APPROVE
|
499
|
HOST_APPROVE_FAILED
|
500
|
HOST_FAILED_TO_RUN_VMS
|
501
|
USER_SUSPEND_VM
|
502
|
USER_FAILED_SUSPEND_VM
|
503
|
USER_SUSPEND_VM_OK
|
504
|
HOST_INSTALL
|
505
|
HOST_INSTALL_FAILED
|
506
|
HOST_INITIATED_RUN_VM
|
507
|
HOST_INITIATED_RUN_VM_FAILED
|
509
|
HOST_INSTALL_IN_PROGRESS
|
510
|
HOST_INSTALL_IN_PROGRESS_WARNING
|
511
|
HOST_INSTALL_IN_PROGRESS_ERROR
|
512
|
USER_SUSPEND_VM_FINISH_SUCCESS
|
513
|
HOST_RECOVER_FAILED_VMS_UNKNOWN
|
514
|
HOST_INITIALIZING
|
515
|
HOST_CPU_LOWER_THAN_CLUSTER
|
516
|
HOST_CPU_RETRIEVE_FAILED
|
517
|
HOST_SET_NONOPERATIONAL
|
518
|
HOST_SET_NONOPERATIONAL_FAILED
|
519
|
HOST_SET_NONOPERATIONAL_NETWORK
|
520
|
USER_ATTACH_USER_TO_VM
|
521
|
USER_SUSPEND_VM_FINISH_FAILURE
|
522
|
HOST_SET_NONOPERATIONAL_DOMAIN
|
523
|
HOST_SET_NONOPERATIONAL_DOMAIN_FAILED
|
524
|
AUTO_SUSPEND_VM
|
524
|
HOST_DOMAIN_DELAY_INTERVAL
|
525
|
AUTO_SUSPEND_VM_FINISH_SUCCESS
|
526
|
AUTO_SUSPEND_VM_FINISH_FAILURE
|
527
|
AUTO_FAILED_SUSPEND_VM
|
528
|
USER_EJECT_VM_DISK
|
529
|
USER_EJECT_VM_FLOPPY
|
530
|
HOST_MANUAL_FENCE_FAILED_CALL_FENCE_SPM
|
531
|
HOST_LOW_MEM
|
555
|
USER_MOVE_TAG
|
556
|
USER_MOVE_TAG_FAILED
|
600
|
USER_HOST_MAINTENANCE
|
601
|
CPU_FLAGS_NX_IS_MISSING
|
602
|
USER_HOST_MAINTENANCE_MIGRATION_FAILED
|
603
|
HOST_SET_NONOPERATIONAL_IFACE_DOWN
|
800
|
IMAGES_SYNCRONIZER_DESKTOP_NOT_EXIST_IN_VDC
|
801
|
IMAGES_SYNCRONIZER_TEMPLATE_NOT_EXIST_IMAGE_EXIST
|
802
|
IMAGES_SYNCRONIZER_SNAPSHOT_NOT_EXIST_IN_VDC
|
803
|
IMAGES_SYNCRONIZER_SNAPSHOTS_NOT_ATTACHED_TO_VM_IN_VDC
|
804
|
IMAGES_SYNCRONIZER_TEMPLATE_NOT_EXIST_IN_VDC
|
805
|
IMAGES_SYNCRONIZER_DESKTOP_NOT_EXIST_IN_IRS
|
806
|
IMAGES_SYNCRONIZER_SNAPSHOT_NOT_EXIST_IN_IRS
|
807
|
IMAGES_SYNCRONIZER_DESKTOP_WITHOUT_TEMPLATE_VDC
|
808
|
IMAGES_SYNCRONIZER_IMAGE_TEMPLATE_NOT_EXIST
|
809
|
USER_ADD_HOST_GROUP
|
810
|
USER_ADD_HOST_GROUP_FAILED
|
811
|
USER_UPDATE_HOST_GROUP
|
812
|
USER_UPDATE_HOST_GROUP_FAILED
|
813
|
USER_REMOVE_HOST_GROUP
|
814
|
USER_REMOVE_HOST_GROUP_FAILED
|
815
|
USER_VDC_LOGOUT_FAILED
|
816
|
MAC_POOL_EMPTY
|
817
|
CERTIFICATE_FILE_NOT_FOUND
|
818
|
RUN_VM_FAILED
|
819
|
HOST_REGISTER_ERROR_UPDATING_HOST
|
820
|
HOST_REGISTER_ERROR_UPDATING_HOST_ALL_TAKEN
|
821
|
HOST_REGISTER_HOST_IS_ACTIVE
|
822
|
HOST_REGISTER_ERROR_UPDATING_NAME
|
823
|
HOST_REGISTER_ERROR_UPDATING_NAMES_ALL_TAKEN
|
824
|
HOST_REGISTER_NAME_IS_ACTIVE
|
825
|
HOST_REGISTER_AUTO_APPROVE_PATTERN
|
826
|
HOST_REGISTER_FAILED
|
827
|
HOST_REGISTER_EXISTING_HOST_UPDATE_FAILED
|
828
|
HOST_REGISTER_SUCCEEDED
|
829
|
VM_MIGRATION_ON_CONNECT_CHECK_FAILED
|
830
|
VM_MIGRATION_ON_CONNECT_CHECK_SUCCEEDED
|
831
|
USER_DEDICATE_VM_TO_POWERCLIENT
|
832
|
USER_DEDICATE_VM_TO_POWERCLIENT_FAILED
|
833
|
MAC_ADDRESS_IS_IN_USE
|
835
|
SYSTEM_UPDATE_HOST_GROUP
|
836
|
SYSTEM_UPDATE_HOST_GROUP_FAILED
|
850
|
USER_ADD_PERMISSION
|
851
|
USER_ADD_PERMISSION_FAILED
|
852
|
USER_REMOVE_PERMISSION
|
853
|
USER_REMOVE_PERMISSION_FAILED
|
854
|
USER_ADD_ROLE
|
855
|
USER_ADD_ROLE_FAILED
|
856
|
USER_UPDATE_ROLE
|
857
|
USER_UPDATE_ROLE_FAILED
|
858
|
USER_REMOVE_ROLE
|
859
|
USER_REMOVE_ROLE_FAILED
|
860
|
USER_ATTACHED_ACTION_GROUP_TO_ROLE
|
861
|
USER_ATTACHED_ACTION_GROUP_TO_ROLE_FAILED
|
862
|
USER_DETACHED_ACTION_GROUP_FROM_ROLE
|
863
|
USER_DETACHED_ACTION_GROUP_FROM_ROLE_FAILED
|
864
|
USER_ADD_ROLE_WITH_ACTION_GROUP
|
865
|
USER_ADD_ROLE_WITH_ACTION_GROUP_FAILED
|
900
|
AD_COMPUTER_ACCOUNT_SUCCEEDED
|
901
|
AD_COMPUTER_ACCOUNT_FAILED
|
920
|
NETWORK_ATTACH_NETWORK_TO_HOST
|
921
|
NETWORK_ATTACH_NETWORK_TO_HOST_FAILED
|
922
|
NETWORK_DETACH_NETWORK_FROM_HOST
|
923
|
NETWORK_DETACH_NETWORK_FROM_HOST_FAILED
|
924
|
NETWORK_ADD_BOND
|
925
|
NETWORK_ADD_BOND_FAILED
|
926
|
NETWORK_REMOVE_BOND
|
927
|
NETWORK_REMOVE_BOND_FAILED
|
928
|
NETWORK_HOST_NETWORK_MATCH_CLUSTER
|
929
|
NETWORK_HOST_NETWORK_NOT_MATCH_CLUSTER
|
930
|
NETWORK_REMOVE_VM_INTERFACE
|
931
|
NETWORK_REMOVE_VM_INTERFACE_FAILED
|
932
|
NETWORK_ADD_VM_INTERFACE
|
933
|
NETWORK_ADD_VM_INTERFACE_FAILED
|
934
|
NETWORK_UPDATE_VM_INTERFACE
|
935
|
NETWORK_UPDATE_VM_INTERFACE_FAILED
|
936
|
NETWORK_ADD_TEMPLATE_INTERFACE
|
937
|
NETWORK_ADD_TEMPLATE_INTERFACE_FAILED
|
938
|
NETWORK_REMOVE_TEMPLATE_INTERFACE
|
939
|
NETWORK_REMOVE_TEMPLATE_INTERFACE_FAILED
|
940
|
NETWORK_UPDATE_TEMPLATE_INTERFACE
|
941
|
NETWORK_UPDATE_TEMPLATE_INTERFACE_FAILED
|
942
|
NETWORK_ADD_NETWORK
|
943
|
NETWORK_ADD_NETWORK_FAILED
|
944
|
NETWORK_REMOVE_NETWORK
|
945
|
NETWORK_REMOVE_NETWORK_FAILED
|
946
|
NETWORK_ATTACH_NETWORK_TO_HOST_GROUP
|
947
|
NETWORK_ATTACH_NETWORK_TO_HOST_GROUP_FAILED
|
948
|
NETWORK_DETACH_NETWORK_TO_HOST_GROUP
|
949
|
NETWORK_DETACH_NETWORK_TO_HOST_GROUP_FAILED
|
950
|
USER_ADD_STORAGE_POOL
|
951
|
USER_ADD_STORAGE_POOL_FAILED
|
952
|
USER_UPDATE_STORAGE_POOL
|
953
|
USER_UPDATE_STORAGE_POOL_FAILED
|
954
|
USER_REMOVE_STORAGE_POOL
|
955
|
USER_REMOVE_STORAGE_POOL_FAILED
|
956
|
USER_ADD_STORAGE_DOMAIN
|
957
|
USER_ADD_STORAGE_DOMAIN_FAILED
|
958
|
USER_UPDATE_STORAGE_DOMAIN
|
959
|
USER_UPDATE_STORAGE_DOMAIN_FAILED
|
960
|
USER_REMOVE_STORAGE_DOMAIN
|
961
|
USER_REMOVE_STORAGE_DOMAIN_FAILED
|
962
|
USER_ATTACH_STORAGE_DOMAIN_TO_POOL
|
963
|
USER_ATTACH_STORAGE_DOMAIN_TO_POOL_FAILED
|
964
|
USER_DETACH_STORAGE_DOMAIN_FROM_POOL
|
965
|
USER_DETACH_STORAGE_DOMAIN_FROM_POOL_FAILED
|
966
|
USER_ACTIVATED_STORAGE_DOMAIN
|
967
|
USER_ACTIVATE_STORAGE_DOMAIN_FAILED
|
968
|
USER_DEACTIVATED_STORAGE_DOMAIN
|
969
|
USER_DEACTIVATE_STORAGE_DOMAIN_FAILED
|
970
|
SYSTEM_DEACTIVATED_STORAGE_DOMAIN
|
971
|
SYSTEM_DEACTIVATE_STORAGE_DOMAIN_FAILED
|
972
|
USER_EXTENDED_STORAGE_DOMAIN
|
973
|
USER_EXTENDED_STORAGE_DOMAIN_FAILED
|
974
|
USER_REMOVE_VG
|
975
|
USER_REMOVE_VG_FAILED
|
976
|
USER_ACTIVATE_STORAGE_POOL
|
977
|
USER_ACTIVATE_STORAGE_POOL_FAILED
|
978
|
SYSTEM_FAILED_CHANGE_STORAGE_POOL_STATUS
|
979
|
SYSTEM_CHANGE_STORAGE_POOL_STATUS_NO_HOST_FOR_SPM
|
980
|
SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC
|
981
|
USER_FORCE_REMOVE_STORAGE_DOMAIN
|
982
|
USER_FORCE_REMOVE_STORAGE_DOMAIN_FAILED
|
983
|
RECONSTRUCT_MASTER_FAILED_NO_MASTER
|
984
|
RECONSTRUCT_MASTER_DONE
|
985
|
RECONSTRUCT_MASTER_FAILED
|
986
|
SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_SEARCHING_NEW_SPM
|
987
|
SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_WITH_ERROR
|
988
|
USER_CONNECT_HOSTS_TO_LUN_FAILED
|
989
|
SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_FROM_NON_OPERATIONAL
|
990
|
SYSTEM_MASTER_DOMAIN_NOT_IN_SYNC
|
991
|
RECOVERY_STORAGE_POOL
|
992
|
RECOVERY_STORAGE_POOL_FAILED
|
993
|
SYSTEM_CHANGE_STORAGE_POOL_STATUS_RESET_IRS
|
994
|
CONNECT_STORAGE_SERVERS_FAILED
|
995
|
CONNECT_STORAGE_POOL_FAILED
|
996
|
STORAGE_DOMAIN_ERROR
|
1100
|
NETWORK_UPDATE_DISPLAY_TO_HOST_GROUP
|
1101
|
NETWORK_UPDATE_DISPLAY_TO_HOST_GROUP_FAILED
|
1102
|
NETWORK_UPDATE_NETWORK_TO_HOST_INTERFACE
|
1103
|
NETWORK_UPDATE_NETWORK_TO_HOST_INTERFACE_FAILED
|
1104
|
NETWORK_COMMINT_NETWORK_CHANGES
|
1105
|
NETWORK_COMMINT_NETWORK_CHANGES_FAILED
|
1106
|
NETWORK_HOST_USING_WRONG_CLUSER_VLAN
|
1107
|
NETWORK_HOST_MISSING_CLUSER_VLAN
|
1150
|
IMPORTEXPORT_EXPORT_VM
|
1151
|
IMPORTEXPORT_EXPORT_VM_FAILED
|
1152
|
IMPORTEXPORT_IMPORT_VM
|
1153
|
IMPORTEXPORT_IMPORT_VM_FAILED
|
1154
|
IMPORTEXPORT_REMOVE_TEMPLATE
|
1155
|
IMPORTEXPORT_REMOVE_TEMPLATE_FAILED
|
1156
|
IMPORTEXPORT_EXPORT_TEMPLATE
|
1157
|
IMPORTEXPORT_EXPORT_TEMPLATE_FAILED
|
1158
|
IMPORTEXPORT_IMPORT_TEMPLATE
|
1159
|
IMPORTEXPORT_IMPORT_TEMPLATE_FAILED
|
1160
|
IMPORTEXPORT_REMOVE_VM
|
1161
|
IMPORTEXPORT_REMOVE_VM_FAILED
|
1162
|
IMPORTEXPORT_STARTING_EXPORT_VM
|
1163
|
IMPORTEXPORT_STARTING_IMPORT_TEMPLATE
|
1164
|
IMPORTEXPORT_STARTING_EXPORT_TEMPLATE
|
1165
|
IMPORTEXPORT_STARTING_IMPORT_VM
|
1166
|
IMPORTEXPORT_STARTING_REMOVE_TEMPLATE
|
1167
|
IMPORTEXPORT_STARTING_REMOVE_VM
|
1168
|
IMPORTEXPORT_FAILED_TO_IMPORT_VM
|
1169
|
IMPORTEXPORT_FAILED_TO_IMPORT_TEMPLATE
|
9000
|
HOST_ALERT_FENCING_IS_NOT_CONFIGURED
|
9001
|
HOST_ALERT_FENCING_TEST_FAILED
|
9002
|
HOST_ALERT_FENCING_OPERATION_FAILED
|
9003
|
HOST_ALERT_FENCING_OPERATION_SKIPPED
|
9004
|
HOST_ALERT_FENCING_NO_PROXY_HOST
|
9500
|
TASK_STOPPING_ASYNC_TASK
|
9501
|
TASK_CLEARING_ASYNC_TASK
|
Table D.1. Accepted tz database codes
| tz database Format | Windows Standard Format |
|---|---|
Africa/Cairo
|
Egypt Standard Time
|
Africa/Casablanca
|
Morocco Standard Time
|
Africa/Johannesburg
|
South Africa Standard Time
|
Africa/Lagos
|
W. Central Africa Standard Time
|
Africa/Nairobi
|
E. Africa Standard Time
|
Africa/Reykjavik
|
Greenwich Standard Time
|
Africa/Windhoek
|
Namibia Standard Time
|
America/Anchorage
|
Alaskan Standard Time
|
America/Bogota
|
SA Pacific Standard Time
|
America/Buenos_Aires
|
Argentina Standard Time
|
America/Caracas
|
Venezuela Standard Time
|
America/Chicago
|
Central Standard Time
|
America/Chihuahua
|
Mexico Standard Time
|
America/Chihuahua
|
Mountain Standard Time
|
America/Denver
|
Mountain Standard Time
|
America/Godthab
|
Greenland Standard Time
|
America/Guatemala
|
Central America Standard Time
|
America/Halifax
|
Atlantic Standard Time
|
America/La_Paz
|
SA Western Standard Time
|
America/Los_Angeles
|
Pacific Standard Time
|
America/Manaus
|
Central Brazilian Standard Time
|
America/Mexico_City
|
Central Standard Time
|
America/Mexico_City
|
Mexico Standard Time
|
America/Montevideo
|
Montevideo Standard Time
|
America/New_York
|
Eastern Standard Time
|
America/Phoenix
|
US Mountain Standard Time
|
America/Regina
|
Canada Central Standard Time
|
America/Santiago
|
Pacific SA Standard Time
|
America/Sao_Paulo
|
E. South America Standard Time
|
America/St_Johns
|
Newfoundland Standard Time
|
America/Tijuana
|
Pacific Standard Time
|
Asia/Amman
|
Jordan Standard Time
|
Asia/Baghdad
|
Arabic Standard Time
|
Asia/Baku
|
Azerbaijan Standard Time
|
Asia/Bangkok
|
SE Asia Standard Time
|
Asia/Beirut
|
Middle East Standard Time
|
Asia/Calcutta
|
India Standard Time
|
Asia/Colombo
|
Sri Lanka Standard Time
|
Asia/Dhaka
|
Central Asia Standard Time
|
Asia/Dubai
|
Arabian Standard Time
|
Asia/Irkutsk
|
North Asia East Standard Time
|
Asia/Jerusalem
|
Israel Standard Time
|
Asia/Kabul
|
Afghanistan Standard Time
|
Asia/Karachi
|
Pakistan Standard Time
|
Asia/Katmandu
|
Nepal Standard Time
|
Asia/Krasnoyarsk
|
North Asia Standard Time
|
Asia/Novosibirsk
|
N. Central Asia Standard Time
|
Asia/Rangoon
|
Myanmar Standard Time
|
Asia/Riyadh
|
Arab Standard Time
|
Asia/Seoul
|
Korea Standard Time
|
Asia/Shanghai
|
China Standard Time
|
Asia/Singapore
|
Singapore Standard Time
|
Asia/Taipei
|
Taipei Standard Time
|
Asia/Tashkent
|
West Asia Standard Time
|
Asia/Tehran
|
Iran Standard Time
|
Asia/Tokyo
|
Tokyo Standard Time
|
Asia/Vladivostok
|
Vladivostok Standard Time
|
Asia/Yakutsk
|
Yakutsk Standard Time
|
Asia/Yekaterinburg
|
Ekaterinburg Standard Time
|
Asia/Yerevan
|
Armenian Standard Time
|
Asia/Yerevan
|
Caucasus Standard Time
|
Atlantic/Azores
|
Azores Standard Time
|
Atlantic/Cape_Verde
|
Cape Verde Standard Time
|
Atlantic/South_Georgia
|
Mid-Atlantic Standard Time
|
Australia/Adelaide
|
Cen. Australia Standard Time
|
Australia/Brisbane
|
E. Australia Standard Time
|
Australia/Darwin
|
AUS Central Standard Time
|
Australia/Hobart
|
Tasmania Standard Time
|
Australia/Perth
|
W. Australia Standard Time
|
Australia/Sydney
|
AUS Eastern Standard Time
|
Etc/GMT-3
|
Georgian Standard Time
|
Etc/GMT+12
|
Dateline Standard Time
|
Etc/GMT+3
|
SA Eastern Standard Time
|
Etc/GMT+5
|
US Eastern Standard Time
|
Europe/Berlin
|
W. Europe Standard Time
|
Europe/Budapest
|
Central Europe Standard Time
|
Europe/Istanbul
|
GTB Standard Time
|
Europe/Kiev
|
FLE Standard Time
|
Europe/London
|
GMT Standard Time
|
Europe/Minsk
|
E. Europe Standard Time
|
Europe/Moscow
|
Russian Standard Time
|
Europe/Paris
|
Romance Standard Time
|
Europe/Warsaw
|
Central European Standard Time
|
Indian/Mauritius
|
Mauritius Standard Time
|
Pacific/Apia
|
Samoa Standard Time
|
Pacific/Auckland
|
New Zealand Standard Time
|
Pacific/Fiji
|
Fiji Standard Time
|
Pacific/Guadalcanal
|
Central Pacific Standard Time
|
Pacific/Honolulu
|
Hawaiian Standard Time
|
Pacific/Port_Moresby
|
West Pacific Standard Time
|
Pacific/Tongatapu
|
Tonga Standard Time
|
| Revision History | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Revision 1-47.32.400 | 2013-10-31 | ||||||||
| |||||||||
| Revision 1-47.32 | 2013-09-25 | ||||||||
| |||||||||
| Revision 1-47.31 | 2013-09-09 | ||||||||
| |||||||||
| Revision 1-47 | 2012-07-18 | ||||||||
| |||||||||
| Revision 1-46 | Tue May 1 2012 | ||||||||
| |||||||||
| Revision 1-39 | Thu Dec 1 2011 | ||||||||
| |||||||||
| Revision 1-38 | Thu Nov 24 2011 | ||||||||
| |||||||||
| Revision 1-37 | Fri Nov 11 2011 | ||||||||
| |||||||||
| Revision 1-36 | Mon Oct 31 2011 | ||||||||
| |||||||||
| Revision 1-35 | Thu Oct 27 2011 | ||||||||
| |||||||||
| Revision 1-34 | Thu Oct 27 2011 | ||||||||
| |||||||||
| Revision 1-33 | Wed Oct 26 2011 | ||||||||
| |||||||||
| Revision 1-32 | Tue Oct 25 2011 | ||||||||
| |||||||||
| Revision 1-31 | Thu Oct 19 2011 | ||||||||
| |||||||||
| Revision 1-30 | Wed Oct 12 2011 | ||||||||
| |||||||||
| Revision 1-29 | Tue Oct 4 2011 | ||||||||
| |||||||||
| Revision 1-28 | Tue Oct 4 2011 | ||||||||
| |||||||||
| Revision 1-27 | Fri Sept 30 2011 | ||||||||
| |||||||||
| Revision 1-26 | Wed Sept 28 2011 | ||||||||
| |||||||||
| Revision 1-25 | Fri Sept 22 2011 | ||||||||
| |||||||||
| Revision 1-23 | Fri Sept 19 2011 | ||||||||
| |||||||||
| Revision 1-22 | Fri Sept 9 2011 | ||||||||
| |||||||||
| Revision 1-21 | Thu Sept 8 2011 | ||||||||
| |||||||||
| Revision 1-18 | Thu Aug 24 2011 | ||||||||
| |||||||||
| Revision 1-17 | Thu Aug 04 2011 | ||||||||
| |||||||||
| Revision 1-16 | Thu Aug 04 2011 | ||||||||
| |||||||||
| Revision 1-15 | Thu Aug 04 2011 | ||||||||
| |||||||||
| Revision 1-14 | Thu Aug 04 2011 | ||||||||
| |||||||||
| Revision 1-12 | Tue Jul 19 2011 | ||||||||
| |||||||||
| Revision 1-11 | Thu Jul 7 2011 | ||||||||
| |||||||||
| Revision 1-10 | Thu Jul 7 2011 | ||||||||
| |||||||||
| Revision 1-9 | Thu Jul 7 2011 | ||||||||
| |||||||||
| Revision 1-8 | Wed Jul 6 2011 | ||||||||
| |||||||||
| Revision 1-6 | Thu Jun 30 2011 | ||||||||
| |||||||||
| Revision 1-5 | Mon Jun 20 2011 | ||||||||
| |||||||||
| Revision 1-4 | Thu Jun 16 2011 | ||||||||
| |||||||||
| Revision 0-0 | Thu Jun 17 2010 | ||||||||
| |||||||||


