You can use the Cyber Recovery connector CLI to deactivate high-frequency snapshots from VMs.
Usage
To deactivate high-frequency snapshots from a VM If you know the VM instanceID, run this command:
drc deactivate-hfs -h usage: drc deactivate-hfs [-h] --vcenter-ip VCENTERIP [--vm-instance-uuid VMINSTANCEUUID [--vendor-id VENDORID] [--drc-agent-svc-id DRCAGENTSVCID] [--cloud-file-system-id CLOUDFILESYSTEMID] [--name-pattern NAMEPATTERN] [--output-format OUTPUT_FORMAT]
Option | Description |
---|---|
--vcenter-ip VCENTERIP | IP address of the protected site vCenter where you want to deactivate high-frequency snapshots from a VM. |
--vm-instance-uuid VMINSTANCEUUID | A VM instanceUUID is a unique identifier that associated a VM with a specific vCenter. For information about finding a VM instance UUID using the VMware Managed Object Browser or Powershell, view the information here. |
--vendor-id VENDORID | You can obtain the vendor ID for a VM in the URL of VMware Live Cyber Recovery combined with the cloud file system ID. In VMware Live Cyber Recovery, select the cloud file system where the VM snapshots replicate to. For example: vlr.vmware.com/#/backup-sites/summary/r43zf5c1-5172-4af9-8925-10b3959df2k1
The last string on the URL is the cloud file system ID. To get the VM vendor ID, do these two things:
For example: com.vmware.vlr.dvx.r43zf5c1-5172-4af9-8925-10b3959df2k1 |
--drc-agent-svc-id DRCAGENTSVCID | This command is reserved for support usage. Do not use this option unless requested to do so by VMware Support. |
--cloud-file-system-id CLOUDFILESYSTEMID | The ID of the VMware Live Cyber Recovery cloud file system. This option is required if the protected site is a VMware Cloud on AWS SDDC. This option is not required for on-premises protected sites. You can find the cloud file system ID by selecting it in VMware Live Cyber Recovery and looking at the URL: vlr.vmware.com/#/backup-sites/summary/d43zf5c1-5172-4af9-8925-10b3959df2k1 In the example, the cloud file system ID is: d43zf5c1-5172-4af9-8925-10b3959df2k1 |
--name-pattern NAMEPATTERN | Name patterns dynamically define protection group membership. You can also use name patterns with the CLI to determine which VMs you want to deactivate high-frequency snapshots from. If no name pattern is given in to deactivate multiple VMs, you are asked to supply one. For more information, see VM Name Pattern.
For example, if you want to deactivate all VMs from high-frequency snapshots, the name pattern is:
--name-pattern '.*' Other examples:
Deactivate high-frequency snapshots from VMs that have a name starting with '
h':
'h.*'
Deactivate high-frequency snapshots from VMs that have a name ending with '
st':
--name-pattern '.*st'
Deactivate high-frequency snapshots from VMs that have a name containing '
oo':
--name-pattern '.*oo.*' |
--output-format OUTPUT_FORMAT |
Choose the output format (optional):
|
connector-name>># drc deactivate-hfs --vcenter-ip 192.168.226.228 --vm-instance-uuid 5017f5c8-5588-c638-e252-3734d5e00b6c
result: Deactivate VM vm-21 succeeded with vendorId: com.vmware.vlr.dvx.31336361-2301-1018-abd2-667ca9d91a2e
drc deactivate-hfs --vcenter-ip 192.168.226.228 --name-pattern '.*tiny-core.*'
result: All VMs deactivated successfully total VMs found: 9, deactivated: 8, deactivate failed: 0, unmatched: 1, excluded: 1
Error Handling
The detach high-frequency snapshots CLI provides verbose error messaging to help you understand when some VMs fail to deactivate their high-frequency snapshots. In some cases, a VM fails to have its high-frequency snapshots deactivated because the VM only has standard frequency snapshots associated with it.
[vlr_00:50:56:8b:4b:2a:~]# drc deactivate-hfs --vcenter-ip 192.168.226.228 --name-pattern '.*' result: Deactivate-HFS failed for vm: tiny-core-scsi_3 result: Deactivate VM vm-19 failed with vendorId: com.vmware.vlr.dvx.deactivateHFS. VM was not HFS activated. Deactivate-HFS failed for vm: tiny-core-scsi_1 result: Deactivate VM vm-21 failed with vendorId: com.vmware.vlr.dvx.deactivateHFS. VM was not HFS activated. There are VM(s) that failed deactivate-hfs, please verify those VMs aren't unprotected total VMs found: 9, deactivated: 6, deactivate failed: 2, unmatched: 0, excluded: 1
[vlr_00:50:56:8b:4b:2a:~]# drc deactivate-hfs --vcenter-ip 192.168.226.228 --name-pattern 'test' result: No matching VMs. Please try again with a valid name-pattern. No VMs were deactivated total VMs found: 9, deactivated: 0, deactivate failed: 0, unmatched: 9, excluded: 1
[vlr_00:50:56:8b:4b:2a:~]# drc deactivate-hfs --vcenter-ip 192.168.226.228 result: Please pass in the name pattern of the VMs that are targeted to get hfs deactivated