Using APIs and command line options to manage, protect, or recover AHV virtual machines
This topic lists the APIs and command line options to protect or recover the AHV virtual machines. Only the important variables and options are mentioned in this topic.
Following sections are part of this topic:
For detailed information on the APIs and command lines, use these references:
Add an AHV cluster
Table: Add an AHV cluster
API or command line options | Important variables and options |
---|
POST
/netbackup/asset-service/queries GET
/netbackup/asset-service/queries/{aqcId} | clusterName is the name of the AHV cluster. backuphost is hostname of a NetBackup client. credentialName are credentials associated with AHV cluster. The credential must exist with credentialName mentioned.
|
tpconfig command | |
Set iSCSI CHAP settings APIs
Table: Set iSCSI CHAP settings APIs
API or command line options | Important variables and options |
---|
GET
/netbackup/config/iscsi-settings/
{workloadType} | |
POST
/netbackup/config/iscsi-settings/
{workloadType} | Changes the global iSCSI setting for the specified workload type.
authType is the authentication type. For example: ONEWAY_CHAP MUTUAL_CHAP_AUTOMATIC
passwordRenewalIntervalDays is applicable only for Mutual CHAP Automatic option. Valid value is 1 - 365 days.
|
Create an AHV VM backup policy
Table: Create an AHV VM backup policy
API or command line options | Important variables and options |
---|
POST
/netbackup/config/policies/
| policyType is Hypervisor.
backuphost is a hostname of a NetBackup client that performs backups on behalf of the virtual machines. Add Add useVirtualMachine = 6 for Nutanix AHV. snapshotMethodArgs can have the following values to back up a VM using VM UUID: In backupSelections > selections, use the filter option as Nutanix-ahv:/?filter=uuid Equal <uuid_filter>" to filter AHV VMs of a specific UUID. Apart from UUID , you can use the other filter criteria mentioned for Intelligent VM groups.
|
admincmd command | In bpplclients -add <discoveryhost> Hypervisor Hypervisor,
the hypervisor discovery host is a allowedlisted Windows or Linux host. In bpplinfo, the policy type (-pt) is Hypervisor. In bpplinclude, use the filter option as Nutanix-ahv:/?filter=uuid Equal <uuid_filter>" to filter AHV VMs of a specific UUID. In bpplinfo
|
After you create the policy, other commands like creating the schedule for the policy or triggering the policy backup remain the same. For more information about the commands, refer to the NetBackup Commands Reference Guide.
Pre-Recovery check for AHV VM at the original location
Table: Pre-Recovery check for AHV VM at the original location
API or command line options | Important variables and options |
---|
POST /netbackup/recovery/workloads
/nutanix-ahv/scenarios/full-vm
/pre-recovery-check | client is identifier that was used at the time of backup. It can either be the displayName or
the UUID. ahvCluster is the name of the alternate AHV cluster.
recoveryHost is server that is to be used as the VM recovery host to perform this pre-recovery check. vmDisks represents one or more virtual machine disks. source is the source path of the virtual machine disk. This must be of the /storage_container/disk_uuid format. destination is the destination path of the virtual machine disk. This should be of the format /storage_container . Set the following values: powerOnAfterRecovery
overwriteExistingVm
removeNetworkInterfaces
retainVmGuid
retainNicMacAddress
|
Pre-Recovery check for AHV VM at a different location
Table: Pre-Recovery check for AHV VM at a different location
API or command line options | Important variables and options |
---|
POST /netbackup/recovery/workloads
/nutanix-ahv/scenarios/full-vm
/pre-recovery-check | client is identifier that was used at the time of backup. It can either be the displayName or
the UUID. ahvCluster is the name of the alternate AHV cluster.
recoveryHost is server that is to be used as the VM recovery host to perform this pre-recovery check. vmDisks represents one or more virtual machine disks. source is the source path of the virtual machine disk. This must be of the /storage_container/disk_uuid format. destination is the destination path of the virtual machine disk. This should be of the format /storage_container . Set the following values: powerOnAfterRecovery
overwriteExistingVm
removeNetworkInterfaces
retainVmGuid
retainNicMacAddress
|
Restore the AHV VM at the original location
Table: Restore the AHV VM at the original location
API or command line options | Important variables and options |
---|
POST
/netbackup/recovery/workloads/ahv/
scenarios/full-vm/recover | client is identifier that was used at the time of backup. It can either be the display name or
the UUID.
recoveryHost is server that is to be used as the VM recovery host to perform this recovery. Set the following values: powerOnAfterRecovery
overwriteExistingVm
removeNetworkInterfaces
retainVmGuid
retainNicMacAddress
|
bprestore command | vmproxy specifies the name or the FQDN of the backup host.
vmserver is the name of the AHV cluster. vmpoweron to start the VM after the VM restore. vmsn to remove the VMs network interfaces. vmid to retain the original VM UUID of the VM. Alternatively, use the -K option to retain the existing VM with the same UUID and not overwrite it. The -R option defines the path of the rename file. Use the rename file to recover the VM to an alternate location or change the VM configuration.
Sample rename file: change vmname to new_vm_name
change /storage_domain_1/disk1_UUID
to /storage_domain_2/
change /storage_domain_1/disk2_UUID
to /storage_domain_2/
change cluster to new_cluster_name
|
Restore the AHV VM to an alternate location
Table: Restore the AHV VM to an alternate location
API or command line options | Important variables and options |
---|
POST
/netbackup/recovery/workloads/ahv
/scenarios/full-vm/recover
| client is identifier that was used at the time of backup. It can either be the displayName) or the UUID. ahvCluster is the name of the alternate AHV cluster.
recoveryHost is server that is to be used as the VM recovery host to perform this recovery. vmDisks represents one or more virtual machine disks. source is the source path of the virtual machine disk. This should be of the format /storage_container/disk_uuid. destination is the destination path of the virtual machine disk. This should be of the format /storage_container . Set the following values: powerOnAfterRecovery
overwriteExistingVm
removeNetworkInterfaces
retainVmGuid
retainNicMacAddress
|
bprestore command | vmproxy specifies the name or the FQDN of the backup host.
vmserver is the name of the AHV cluser. Use the following values to modify the VM configuration: vmpoweron to start the VM after the VM restore. vmsn to remove the VMs network interfaces. vmid to retain the original VM UUID of the VM. Alternatively, use the -K option to retain the existing VM with the same UUID and not overwrite it.
The -R option defines the path of the rename file. Use the rename file to recover the VM to an alternate location or change the VM configuration. Sample rename file: change vmname to new_vm_name
change /storage_domain_1/disk1_UUID
to /storage_domain_2/
change /storage_domain_1/disk2_UUID
to /storage_domain_2/
change cluster to new_cluster_name
For a Windows NetBackup host, you must add an empty line at the end of the rename file entries. See Additional information about the rename file. |