Running an inventory job for virtualized systems¶
An inventory job for virtualized systems will rebuild a list of those and resources on it, such as virtual machines and virtual hard disks on it, that IBM Spectrum Protect Plus can protect. This section discusses how you can invoke an inventory job for hypervisors that applies to VMware vCenter, Microsoft Hyper-V, and Amazon EC2.
Every time you add a new hypervisor server or make any changes in their resources such as deploying new virtual machines on it, you have to run an inventory job at IBM Spectrum Protect Plus to update its list of hypervisor instances.
See also
To run an inventory job for application servers (Oracle Database, SQL Server, Db2, MongoDB, Exchange Server, Microsoft 365, Kubernetes, and OpenShift), follow the instructions in Running an inventory job for application server instances.
Method and URI¶
To start an inventory job, use a POST method and a URI:
POST https://{hostname|IPv4}/api/endeavour/job/{jobId}
Tip
To get the {jobId}
for the hypervisor inventory job, follow the instructions in Getting a {jobId}, where the object name is Hypervisor Inventory
. This {jobId}
may vary by the IBM Spectrum Protect Plus appliances.
Parameters¶
Parameter 1: action
Specify the type of action.
Value:
inventory
Type: System string. Required. Available in the web interface.
Parameter 2: actionname
Specify the step of the action.
Value:
start
Type: System string. Required. Available in the web interface.
Data¶
None.
Example: Start an inventory job for virtualized system instances¶
Assume that you want to run a hypervisor inventory job for virtualized systems.
Create a function that converts the policy name, Hypervisor Inventory
, into the job ID:
job_id = converter_job("Hypervisor Inventory")
print(job_id)
1003
Assume that the job ID is 1003 in this IBM Spectrum Protect Plus appliance. A Python snippet that is similar to the following example can be used to start the hypervisor inventory job:
_params = {
"action": "start",
"actionname": "start"
}
_response = requests.post('https://' + spp_ipv4 + '/api/endeavour/job/' + job_id
headers={...}, params=_params, verify=...)

Figure 21 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In any of hypervisor pages (for example, VMware), click Run an inventory. The blue Run Inventory button changes into Inventory In Progress in gray.¶
You will receive a response with no body and the HTTP status code of 204 (No Content).
Attention
Do not determine the status of inventory jobs by referring to the HTTP status code in a response. This request only starts an inventory job and receives a response with the HTTP status code of 204 (No Content) regardless of the status or the result. To see the status of the inventory jobs, follow the instructions in Getting the status of a hypervisor inventory job.