Solved

VM Subclient Discovery

  • 13 July 2022
  • 3 replies
  • 387 views

Userlevel 5
Badge +16

I have a script that adds a vm to backups by modifying the vm tag in vcenter.

The problem is that the VM does not show up in Comvault until the subclient refreshes, which happens during the discovery phase of a backup or if a preview is done on the subclient.

 

Is there a way to programmatically refresh subclient content for VSA based backups?

 

A datacenter refresh is too heavy, and general of an operation, I need something more specific thanks.

Chris.

icon

Best answer by Graham Swift 13 July 2022, 23:39

View original

3 replies

Userlevel 7
Badge +23

@christopherlecky , I’ll ask around.  I see we have GET VM but that only shows what HAS been discovered, it doesn’t kick off a discovery.

I’ll see what we have!

 

Userlevel 4
Badge +10

Hello @christopherlecky 

 

Yes you can. Using APIs you can discover a single VM which may fit in with your automation as you will likely know the VM name or be able to get the UUID to feed in to this…Or if you have configured the VM Group to use tags then you can use the same API as below.

 

Post {{ServerUrl}}/Subclient/Content/Preview

Example payload to discover any VM that has the tag “backMeUp”

{

    "processinginstructioninfo": {

        "attributes": [

            {

                "name": "WebServer",

                "value": "CS1"

            }

        ]

    },

    "appId": {

        "subclientId": 4113,

        "clientId": 143,

        "instanceId": 84,

        "backupsetId": 0,

        "apptypeId": 106

    },

    "filterEntity": {},

    "contentEntity": {

        "children": [

            {

                "equalsOrNotEquals": true,

                "displayName": "backMeUp",

                "allOrAnyChildren": true,

                "type": 34,

                "path": "",

                "name": "",

                "value": ""

            }

        ]

    }

}

 

Example Payload to discover by UUID of the VM:

{

    "createClientsForDiscoveredVms": true,

    "appId": {

        "subclientId": 4113,

        "clientId": 143,

        "instanceId": 84,

        "instanceName": "VMware",

        "backupsetName": "defaultBackupSet",

        "backupsetId": 265,

        "apptypeId": 106,

        "applicationName": "Virtual Server"

 

    },

    "filterEntity": {

        "allOrAnyChildren": false

    },

    "contentEntity": {

        "children": [

            {

                "equalsOrNotEquals": true,

                "allOrAnyChildren": true,

                "path": "",

                "children": [

                    {

                        "equalsOrNotEquals": true,

                        "displayName": "",

                        "allOrAnyChildren": true,

                        "type": 9,

                        "path": "",

                        "name": "423cd469-f747-30d7-033c-2971c4a6b2cc"

                    }

                ]

            }

        ]

    }

}

 

Example Payload example to discover by the VM name.

{

    "createClientsForDiscoveredVms": true,

    "appId": {

        "subclientId": 4113,

        "clientId": 143,

        "instanceId": 84,

        "instanceName": "VMware",

        "backupsetName": "defaultBackupSet",

        "backupsetId": 265,

        "apptypeId": 106,

        "applicationName": "Virtual Server"

    },

    "filterEntity": {

        "allOrAnyChildren": false

    },

    "contentEntity": {

        "children": [

            {

                "equalsOrNotEquals": true,

                "allOrAnyChildren": true,

                "path": "",

                "children": [

                    {

                        "equalsOrNotEquals": true,

                        "displayName": "newVM6",

                        "allOrAnyChildren": true,

                        "type": 10,

                        "path": "",

                        "name": ""

                    }

                ]

            }

        ]

    }

}

 

 

Userlevel 5
Badge +16

Graham, this is awesome.

Thank you.

Reply