12.6. Actions

The following sections describe the actions associated with host resources.
The API contains a number of possible actions for hosts: install, activate, fence, deactivate, approve, iscsilogin, iscsidiscover and commitnetconfig.

12.6.1.  Install Action

Install VDSM and related software on the host. The host type defines additional parameters for the action.
  • Red Hat Enterprise Linux host - This host type requires an root_password element that refers to the password for the host's root user.
  • Red Hat Enterprise Virtualization Hypervisor host - This host type requires an image element 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>