Updating options of virtualized system instances¶
Update options of VMware instances including VMware data centers, folders, virtual machines, and hard disks.
Restriction: This operation is only available in VMware vCenter and Hyper-V instances.
Method and URI¶
To update the options of virtualized system instances, use a POST method and a URI:
POST https://{hostname|IP}/ngp/hypervisor
This POST request is idempotent.
Parameters¶
Parameter 1: action
Specify the type of the action.
Value:
applyOptions
Type: System string. Required. Available in the web interface.
Data¶
Data 1: subtype
The type of the virtualized system.
Value: Use one of the following values:
Virtualized system |
Value |
---|---|
VMware vCenter |
|
Hyper-V |
|
Type: System string. Required. Available in the web user inteface.
Data 2: resources
Specify the virtualized system instances to apply the options.
Example value:
[
{
"href": "https://...",
"id": "...",
"metadataPath": "/MS:.../DC:.../FLDR:..."
},
{
"href": "https://...",
"id": "...",
"metadataPath": "/MS:.../DC:.../FLDR:.../VM:..."
}
]
Key |
Value (example) |
Type |
Description |
---|---|---|---|
subtype |
vmware |
System |
Type of hypervisor servers |
resources |
[{…}, …, {…}] |
Array |
Specify hypervisor servers |
options |
[{…}, …, {…}] |
Array |
Specify options |
resources
.
Key |
Value (example) |
Type |
Description |
---|---|---|---|
href |
https://… |
String |
URI of the VMware instance |
id |
4f0c8182d0507f2f4a3ffe374bc40a32 |
String |
ID of the VMware instance |
metapath |
/MS:1001/DC:f76ed…/FLDR:4f0c… |
String |
Metapath of the VMware instance |
Tip
To get a {hypervisorHypervisorId}
by the hostname or IPv4 address of the vCenter Server, follow the instructions in Getting a {hypervisorHypervisorId}. To get a {hypervisorFolderId}
by the folder name, follow the instructions in :ref:Getting a {hypervisorFolderId}
for a VMware environment`.
resources
> href
Datacenter’s URI is a string with the format of
https://{hostname|IP}/api/hypervisor/{hypervisorHypervisorId}/folder/{hypervisorFolderId}
Tip
To get a {hypervisorFolderId}
by hostname/IP, follow the instructions in Getting a {hypervisorDatacenterId}.
resources
> metapath
.
Folder’s metapath (metapath
) is a string with the format of
/MS:{hypervisorHypervisorId}/DC:{hypervisorDatacenterId}/FLDR:{hypervisorFolderId}
options
.
Backup Options.
Key |
Value (example) |
Type |
Description |
---|---|---|---|
skipReadonlyDS |
true |
Boolean |
Skip Read-only datastores |
skipIAMounts |
true |
Boolean |
Skip tempotary datastores mounted for Instant Access |
fullcopymethod |
vadp |
System |
*** |
proxySelection |
https://10.0… |
String |
URI of the VADP server or the site. Default site will be used when an empty string ( |
priority |
5 |
Integer |
Priority |
For proxySelection
, use the URI of either the site in which VADP servers present or that of an individual VADP server.
https://{hostname|IP}/api/site/{siteId}
https://{hostname|IP}/api/vadp/{vadpId}
Snapshot Options.
Key |
Value (example) |
Type |
Description |
---|---|---|---|
makeApplicationConsistent |
true |
Boolean |
Make VM snapshot application/file system conssistent |
snapshotRetries |
2 |
Integer |
VM Snapshot retry attempts |
fallbackToUniquescedSnapshot |
true |
Boolean |
Fall back to unquiesced snapshot if quiesced snapshot fails |
Agent Options.
Key |
Value (example) |
Type |
Description |
---|---|---|---|
enableLogTruncate |
false |
Boolean |
Truncate SQL logs |
enableFH |
false |
Boolean |
Catalog file metadata |
FHExcludedPath |
C:\Program Files;/usr/bin |
String |
Exclude files for cataloging file metadata |
username |
sarah.wiseman |
String |
Guest OS Username for cataloging file metadata |
password |
@sw!9*Q7C.V<y-h” |
String |
Guest OS Password for cataloging file metadata; use |
For FHExcludedPath
, separate Windows and Linux paths with a semi-colon (;
). Use double backslashes (\\
) to represent a single backslash. Below is the default value:
C:\\Program Files;C:\\Program Files (x86);C:\\Windows;C:\\winnt;C:\\Drivers;/tmp
↪;/usr/bin;/bin;/sbin
Example: Apply options to a VMware folder¶
Assume that you want to associate the VMware folder and options as below:
Hypervisor: VMware - Dallas
Type: VMware
``{hypervisorHypervisorId}``: 1001
Datacenter: BlueMachines - Dallas - ESXi1
``{hypervisorDatacenterId}``: f76edd18b1d3ce7865bbab693881ab53
Folders: Lab folder, Production folder
Lab folder:
{hypervisorFolderId}
7cdc5a08345ca923f02d330bc131b5a0Production folder:
{hypervisorFolderId}
e7d4515b0177f815491f91b7dee932e0
Options:
Backup options:
Skip Read-only datastores: Yes
Skip temporary datastores mounted for Instant Access: Yes
VADP Proxy: (Default)
Priority: 5
Snapshot Options:
Make VM snapshot application/file systems consistent: Yes
VM Snapshot retry attempts: 2
Fall back to unquiesced snapshot fails: Yes
Agent Options:
Truncate SQL logs: No
Catalog file metadata: No
Exclude Files:
C:\Program Files
C:\Program Files (x86)
C:\Windows
C:\winnt
C:\Drivers
/tmp
/usr/bin
/bin
/sbin
Guest OS Username: sarah.wiseman
Guest OS Password:
@sw!9*Q7C.V<y-h"
hypervisor_hypervisor_id = "1001"
hypervisor_datacenter_id = "f76edd18b1d3ce7865bbab693881ab53"
hypervisor_folder_id1 = "7cdc5a08345ca923f02d330bc131b5a0"
hypervisor_folder_id2 = "e7d4515b0177f815491f91b7dee932e0"
_params = {"action": "applySLAPolicies"}
_data = f'''{{
"subtype": "vmware",
"resources": [
{{
"href": "https://{spp_ipv4}/api/hypervisor/{hypervisor_hyper
↪visor_id}/folder/{hypervisor_folder_id1}",
"id": "{hypervisor_folder_id1}",
"metadataPath": "/MS:{hypervisor_hypervisor_id}/DC:{hypervisor_datac
↪enter_id}/FLDR:{hypervisor_folder_id1}"
}},
{{
"href": "https://{spp_ipv4}/api/hypervisor/{hypervisor_hyper
↪visor_id}/folder/{hypervisor_folder_id2}",
"id": "{hypervisor_folder_id2}",
"metadataPath": "/MS:{hypervisor_hypervisor_id}/DC:{hypervisor_datac
↪enter_id}/FLDR:{hypervisor_folder_id2}"
}}
],
"options": {{
"skipReadonlyDS": true,
"skipIAMounts": true,
"fullcopymethod": "vadp",
"proxySelection": "",
"priority": 5,
"makeApplicationConsistent": true,
"snapshotRetries": 2,
"fallbackToUnquiescedSnapshot": true,
"enableLogTruncate": false,
"enableFH": false,
"FHExcludedPath": "C:\\Program Files;C:\\Program Files (x8
↪6);C:\\Windows;C:\\winnt;C:\\Drivers;/tmp;/usr/bin;/bin;/sbin",
"username": "sarah.wiseman",
"password": "@sw!9*Q7C.V<y-h\""
}}
}}'''
requests.post('https://' + spp_ipv4 + '/ngp/hypervisor',
headers={...}, data=_data, verify=...)

The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the VMware pane, select VMware instances, click Select options and cofnigure the available options.¶
The request prompts a response that is structured as shown, with the HTTP status of 201 (Created).
{
"statusCode": 201,
"response": [
{
"links": {...},
"name": "vmware_Silver",
"type": "protection",
"subType": "vmware",
"serviceId": "serviceprovider.protection.hypervisor",
"description": "",
"version": "3.0",
"rbacPath": "root:0/policy:0/policytype:serviceprovider.protection.h
↪ypervisor/policy:1047",
"tenantId": 1000,
"creationTime": 1577730881493,
"lastUpdated": 0,
"spec": {
"source": [],
"storageworkflow": [
{
"id": "2001",
"name": "Silver",
"href": "http://localhost:8082/api/spec/storageprofile/2
↪001"
}
],
"option": {
"maxtasks": 0,
"vmsnapshot": {
"takesnapshot": false,
"concurrentsnapshotsonesx": 3,
"includememory": false,
"consistency": false,
"consistencyvms": [],
"scriptvms": [],
"truncateapplicationlogs": false
},
"skipreadonlydatastores": true
},
"notification": []
},
"logicalDelete": false,
"script": {
"preScript": null,
"postScript": null,
"preSnap": null,
"postSnap": null,
"preGuest": null,
"postGuest": null,
"preGuestSnap": null,
"postGuestSnap": null,
"continueScriptsOnError": false
},
"id": "1047"
},
{
"links": {...},
"name": "vmware_Silver",
"description": "Auto-generated job for Policy vmware_Silver",
"policyId": "1047",
"policyName": "vmware_Silver",
"type": "protection",
"typeDisplayName": "Protection",
"subType": "vmware",
"subTypeDisplayName": "VMware",
"serviceId": "serviceprovider.protection.hypervisor",
"displayName": "Hypervisor Backup",
"status": "IDLE",
"statusDisplayName": "Idle",
"lastSessionStatus": null,
"lastSessionStatusDisplayName": null,
"triggerIds": [
"1038"
],
"triggerData": [
{
"triggerId": "1038",
"triggerInfo": {
"subpolicy_id": "VADP Backup(2001)"
}
}
],
"lastRunTime": null,
"nextFireTime": 1577737579000,
"lastSessionDuration": null,
"tenantId": 1000,
"actions": null,
"statistics": null,
"id": "1040"
}
]
}