Adding VMWare vCenter Server or Hyper-V server¶
Register VMware vCenter Server or Hyper-V server with IBM Spectrum Protect Plus. A hypervisor inventory job will start automatically after a new vCenter Server is registered successfully.
See also
For details of hypervisor inventory, see Running an inventory job for virtualized systems.
Method and URI¶
To register VMware vCenter Server or Hyper-V server with IBM Spectrum Protect Plus, use a POST method and a URI:
POST https://{hostname|IP}/ngp/hypervisor
Parameters¶
None.
Data¶
Data 1: hostAddress
The hostname or the IPv4 address of VMware vCenter server or Hyper-V server.
Example value: 10.0.0.10
Type: String. Required. Available in the web user interface.
Data 2: portNumber
The port number to connect to the VMware vCenter Server or Hyper-V server
To connect to Hyper-V server without using the SSL, you must enable WinRM on the Hyper-V host system. For more information, see IBM Spectrum Protect Plus Installation and User’s Guide”.
Example value: You can use the following typical values:
Virtualized system |
SSL |
Value |
---|---|---|
VMware vCenter |
x |
443 |
VMware vCenter |
80 |
|
Hyper-V server |
x |
5986 |
Hyper-V server |
5985 |
Type: Integer. Required. Available in the web user interface.
Data 3: type
The type of the virtualized system.
Value: Use one of the following values:
Virtualized system |
Value |
---|---|
VMware vCenter |
|
Hyper-V server |
|
Type: System string. Required. Available in the web user interface.
Data 4: username
The {identityUserHref}
of the existing user.
Tip
To get an {identityUserHref}
value based on the user name, follow the instructions in Getting an {identityUserHref}.
Example value: https://10.0.0.100/api/identity/user/2139
Type: String. Required. Available in the web user interface.
Key |
Value (example) |
Type |
Description |
---|---|---|---|
hostAddress |
10.0.0.10 |
String |
Hostname/IP of VMware vCenter |
portNumber |
443 |
Integer |
Port number |
type |
vmware |
System |
Type of hypervisor servers |
username |
sarah.wiseman@blue… |
System |
Identity URI or username of VMware vCenter |
password |
vmware |
System |
Password of VMware vCenter |
sslConnection |
true (default) |
Boolean |
Use SSL or not |
opProperties |
{…, …} |
Array |
Optional properties |
portNumber:
Usually, you will use either port: 443 (HTTPS with SSL) or 80 (HTTP without SSL). Ensure sslConnection
is set to the correct value.
username:
You may use either an existing user (identity) or a new username and password.
An existing user can be defined by the identity URI of the corresponding user; and in this case, you do not have to enter the same password. The identity URI has the following syntax:
https://{hostname|IP}/api/identity/user/{identityUserId}
Here is an example:
https://10.0.0.100/api/identity/user/2101
opProperties:
Key |
Value |
Type |
Description |
---|---|---|---|
snapshotConcurrency |
3 (default) |
Integer |
Maximum number of VM’s to proceed concurrently per ESX server |
Example: Register VMware vCenter server with IBM Spectrum Protect Plus¶
Assume that you want to register the following vCenter Server in IBM Spectrum Protect Plus:
Hostname/IP: 10.0.0.10
Port: 443 (HTTPS)
Username: sarah.wiseman@bluemachines.com.invalid
Password:
#%'%<eyWqt'Z5EWg
Use SSL: Yes
Maximum number of VM’s to process concurrently per ESX server: 3
A Python snippet that is similar to the following example can be used to register VMware vCenter server with IBM Spectrum Protect Plus:
_data = f'''{{
"hostAddress": "10.0.0.10",
"portNumber": 443,
"username": "sarah.wiseman@bluemachines.com.invalid",
"password": "#%'%<eyWqt'Z5EWg",
"sslConnection": true,
"type": "vmware",
"opProperties": {{
"snapshotConcurrency":3
}}
}}'''
requests.post('https://' + spp_ipv4 + '/ngp/hypervisor',
headers={...}, params="", data=_data, verify=...)

The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the VMware pane, click the Manage vCenter, fill in the required fields and click Save.¶
The request prompts a response that is structured as shown, with the HTTP status of 201 (Created).
{
"statusCode": 201,
"response": {
"links": {...},
"name": "10.0.0.10",
"hostAddress": "10.0.0.10",
"user": {
"href": "https://10.0.0.100:-1/api/identity/user/2137"
},
"sslConnection": true,
"portNumber": 443,
"type": "vmware",
"id": "1001",
"uniqueId": "fa8f1a0f-9d01-44e6-b281-6c577cd920ae",
"version": null,
"build": null,
"apiVersion": null,
"properties": {},
"logicalDelete": false,
"accountName": null,
"opProperties": {
"snapshotConcurrency": 2,
"veServerInfo": null
},
"rbacPath": "root:0/hypervisor.all:0/hypervisor.type:vmware/hypervisor:1
↪001",
"resourceType": "hypervisor"
}
}
If the connection with IBM Spectrum Protect Plus has failed, for example, when an incorrect host address or an unavailable port number was given, the request prompts a response that is structured as shown, with the HTTP status of 400 (Bad Request).
{
"statusCode": 400,
"response": {
"id": "HypervisorConnectionException",
"description": "Could not connect to server 10.0.0.200: Exception caught
↪ trying to invoke method RetrieveServiceContent; nested exception is: \n\tjava.
↪net.ConnectException: Connection refused (Connection refused)",
"title": "Error"
}
}
If you enter an invalid username and password, the request prompts a response that is structured as shown, with the HTTP status of 401 (Unauthorized).
{
"statusCode": 401,
"response": {
"id": "HypervisorConnectionAuthException",
"description": "Authentication failed. Ensure the username and password
↪are correct. User must have all the vCenter VMware User privileges as document
↪ed.",
"title": "Error"
}
}