14.8. Actions
14.8.1. Install VDSM Action
Example 14.28. Action to install VDSM on a virtualization host
POST /ovirt-engine/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>
14.8.2. Activate Host Action
Example 14.29. Action to activate a host
POST /ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/activate HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
14.8.3. Host Network Setup Action
setupnetworks action can be used for complex network configuration such as moving a network from one network interface to another.
Example 14.30. Action to edit host network configuration
POST /ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/setupnetworks HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action>
<modified_network_attachments>
<network_attachment id="41561e1c-c653-4b45-b9c9-126630e8e3b9">
<host_nic id="857a46d3-5f64-68bd-f456-c70de5b2d569"/>
</network_attachment<
<network_attachment id="3c3f442f-948b-4cdc-9a48-89bb0593cfbd">
<network id="00000000-0000-0000-0000-000000000010"/>
<ip address="10.35.1.247" netmask="255.255.254.0" gateway="10.35.1.254"/>
<properties>
<property>
<name>bridge_opts</name>
<value>
forward_delay=1500 group_fwd_mask=0x0 multicast_snooping=1
</value>
</property>
</properties>
</network_attachment>
</modified_network_attachments>
<synchronized_network_attachments>
<network_attachment id="3c3f442f-948b-4cdc-9a48-89bb0593cfbd">
</synchronized_network_attachments>
<removed_network_attachments>
<network_attachment id="7f456dae-c57f-35d5-55a4-20b74dc53af9">
</removed_network_attachments>
<modified_bonds>
<host_nic id="a56b212d-2bc4-4120-9136-53be6cacb39a">
<bonding>
<slaves>
<host_nic id="75ac21f7-4aa3-405a-a022-341e5f525b85">
<host_nic id="f3dda04c-1233-41af-a111-74327b876487">
</slaves>
</bonding>
</host_nic>
</modified_bonds>
<removed_bonds>
<host_nic id="36ab5c7f-647a-bc64-f5e7-ba5d74f8e4ba">
</removed_bonds>
<modified_labels>
<label id="Label002">
<host_nic id="857a46d3-5f64-68bd-f456-c70de5b2d569"/>
</label>
<label>
<host_nic id="a56b212d-2bc4-4120-9136-53be6cacb39a"/>
<label id="Label003/>
</label>
</modified_labels>
<removed_labels>
<label id="Label001">
</removed_labels>
<checkConnectivity>true</checkConnectivity>
<connectivityTimeout>60</connectivityTimeout>
</action>
Table 14.14. Elements for multiple host network interface setup
| Element | Type | Description |
|---|---|---|
modified_bonds | complex | Creates or updates bonds. Each host_nic element contains standard bonding elements. See Section 14.7.2.2, “Bonded Interfaces”. |
removed_bonds | complex | An ID list of bonds to remove. |
modified_network_attachments | complex | Adds or updates network attachments on the host. Each network_attachment element contains standard host network_attachment elements. See Section 14.7.1, “Host Network Attachments Sub-Collection”. Changing the host_nic ID moves the network to a different network interface card. |
synchronized_network_attachments | complex | An ID list of out-of-sync network attachments to synchronize with the logical network definition of the data center. |
removed_network_attachments | complex | An ID list of network attachments to remove. |
modified_labels | complex | Creates or modifies labels. Each label element contains a label id (when creating a label) and a host_nic identified by a name or ID. Changing the host_nic ID moves the label to a different network interface card. |
removed_labels | complex | An ID list of labels to remove. |
checkConnectivity | Boolean | Set to true to verify connectivity between the host and the Red Hat Virtualization Manager. If the connectivity is lost, Red Hat Virtualization Manager reverts the settings. |
connectivityTimeout | integer | Defines the timeout for loss of connectivity. |
14.8.4. Fence Host Action
fence action. The capabilities lists available fence_type options.
Example 14.31. Action to fence a host
POST /ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/fence
Accept: application/xml
Content-Type: application/xml
<action>
<fence_type>start</fence_type>
</action>
14.8.5. Deactivate Host Action
Example 14.32. Action to deactivate a host
POST /ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/deactivate HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
14.8.6. Host iSCSI Login 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.
Example 14.33. Action to enable a host to login to iSCSI target
POST /ovirt-engine/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>
14.8.7. Host iSCSI Discover Action
iscsidiscover action enables an iSCSI portal to be queried for its list of targets.
Example 14.34. Action to query a list of targets for iSCSI portal
POST /ovirt-engine/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>
<port>3260</port>
</iscsi>
</action>
14.8.8. Commit Host Network Configuration Action
Example 14.35. Action to commit network configuration
POST /ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/commitnetconfig HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>
Important
14.8.9. Setting SPM
Example 14.36. Action to Set Host as SPM
POST /ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/forceselectspm HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.