Merging duplicate virtual machines removes redundant entries and prevents unnecessary data duplication. You can perform the merge using an interactive report or by running the QS_SetVMClient script.
Note
If you delete a VM from a hypervisor and another VM with the same name and hostname exists on that hypervisor, the two entries are merged automatically.
However, you cannot merge duplicates if both entries have the Commvault agent installed—the merge operation will fail in that case.
Duplicate VM clients will be merged if:
-
If only one of the clients has a Commvault agent installed, the backup history is merged into that client.
-
If one client name includes a numeric suffix (e.g., _1), the backup history is merged into the client without the suffix.
-
If neither client has a Commvault agent installed or a numeric suffix, the backup history is merged into the client with the most recent backup.
-
If both clients have numeric suffixes and neither has a Commvault agent installed, the backup history is merged into the client with the most recent backup.
-
If both VM clients are associated with virtualization clients that use Indexing Version 2, the merged client includes an additional backup set named backupset_name_merged. This set contains the jobs from the client that was merged.
-
If the VM clients originated from the same hypervisor client backup set, restoring merged jobs from the hypervisor client is not supported. However, you can restore from the individual VM or VM job level
Merge Duplicate VM Clients Interactive Report
You can download the Merge Duplicate VM Clients app from the Commvault Store. The app includes an interactive report that displays duplicate clients (so that you can select clients to merge) and a workflow that performs the merge operation.
QS_SetVMClient Script
The QS_SetVMClient script merges backup history for duplicate virtual machine clients, and then deletes the duplicate virtual machine client. All subsequent jobs are associated with the merged client. The script is available in the Base directory for Commvault software.
You can merge duplicate VM clients using the command line:
-
Open a command prompt and go to the Commvault software installation directory.
-
Log in to the CommServe machine.
-
Run the following command:
In this example, client_name_1 is the duplicate VM client being merged into client_name.qoperation execscript -sn QS_SetVMClient -si 'client name_1' -si 'client name' -
To log off the CommServe computer, run the following command
qlogout -
Run an incremental backup and confirm that the virtual machines are shown correctly in the Virtual Machine Status tab.