Creating VM Subclients and Selecting Content Based On Custom Attributes Via Command Line

Last post 06-14-2018, 10:58 PM by MWR_COMM. 1 replies.
Sort Posts: Previous Next
  • Creating VM Subclients and Selecting Content Based On Custom Attributes Via Command Line
    Posted: 06-08-2018, 3:14 PM

    I'm trying to create subclients for VMs there the content is based on the custom attribute. I found this information and used it:


    • Add based on Custom Attributes:The following example adds virtual machines that have "resize" in a custom attribute that is part of vCenter annotations for the VM summary:

      qoperation execute -af update_subclient_vm_template.xml -appName 'Virtual Server' -clientName xxxxx -instanceName xxxxx -backupsetName xxxxx -subclientName xxxxx -vmContent/children/displayName resize -vmContent/children/type VMCustomAttribute -vmContentOperationType ADD

    This did set the content based on the custom attribute. However, when you add a custom attribute through the GUI, the attribute has a name and a value. When I did it using the qoperation command, it created it with the name field blank but the value set. How do I also set the Name field for the custom attribute?
  • Re: Creating VM Subclients and Selecting Content Based On Custom Attributes Via Command Line
    Posted: 06-14-2018, 10:58 PM

    Hi Rick

    Along with -vmContent/children/displayName we also need to specify the following extra values

    -vmContent/children/Name XXX

    -vmContent/children/value XXX

    "Name" is the VM annotation name

    "value" is the value of the "Name" annotation

    The example below worked when I have a VM with Annotation name "Test" and value "CV_Test"

    qoperation execute -af update_subclient_vm_template.xml -appName 'Virtual Server' -clientName XXX -instanceName XXX -backupsetName XXX -subclientName XXX -vmContent/children/displayName CV_Test -vmContent/children/Name Test -vmContent/children/value CV_Test -vmContent/children/type VMCustomAttribute -vmContentOperationType ADD

    DisplayName and Value should match in this instance

    Let me know if this works



The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy