Solved

Rest API: Explanation vmStatusInfo-> Vendor property / identify underlying HV type


Userlevel 7
Badge +19

I'm trying to automate certain tasks by querying the APIs. I first tried the newly released Powershell SDK which turned out to be broken right now. The development team is aware and they stated they will fix it somewhere next week so I decided to continue without SDK and write the modules myself.

I'm trying to achieve the following:

  1. In case the client is discovered via VSA I would like to know the hypervisor vendor.
  2. In case a client is not part of VSA I would like to know if it runs as a virtual instance and preferably I would like to know what kind of virtualization platform. I know Commvault pulls this information from a client using the agent to make the distinction between OI and VOI and also that they can identify the platform but would like to leverage this myself as well and I would expect this information to be available as a client property that can by pulled over via the API. 

1)

So I already discovered that in case a client is discovered through the VSA client that the client property detail is expanded with an element called vmStatusInfo. This element contains a property called vendor and I would like to get confirmation if this property is the right one to pick. Based on comparison it seems:

  • Value 1 = VMware
  • Value 7 = Azure
  • Value 4 = AWS

Is this correct and can someone share the entire vendor list?

2)

In case a client is only equipped with an agent and is not being protected through VSA then it still should be possible to pull information from the client that shows if it is running on virtualized hardware including the platform. I noticed a property called IsVirtualClient but it always has a value of False so it doesn't seem to be the right one. 

Hope someone can point me in the right direction! 

I'm currently pulling and comparing the detailed client information between client that is exposed through this API call → https://api.commvault.com/#6e62a83c-8356-444b-bfba-9281151d8b15

icon

Best answer by Sowmya 18 August 2022, 22:16

View original

14 replies

Userlevel 7
Badge +23

@Onno van den Berg , I’ll reach out to some developers to chime in!

Userlevel 7
Badge +19

Thanks @Mike Struening! Pressed the wrong button and can’t seem to undo it myself.

Userlevel 7
Badge +23

Undone :-)

Userlevel 7
Badge +19

Can you share an update @Mike Struening

As shared in my initial post the Powershell SDK is broken and it is being fixed. I have it working now but I'm getting unexpected output responses. They are looking into it but it might give me the results which would mean there is some logic that shows the vendor.

I'll give an update from my side as soon as I have something to share!

Userlevel 7
Badge +23

I was told we had someone prepping to reply.  I just followed up with that person 😎

Userlevel 5
Badge +16

I would suggest for things like this to forego the rest api entirely and instead using SQL

The query below will return the client name, a boolean value that tells you if the client is a virtual machine, and a JSON representation of the client properties. 

From there, you have a couple of options, you can either query the commserve directly or create a datasource in the reporting server and run the query via the rest api 

 

Yes it’s a hack, but it’s faster than submitting a cmr.

 

Thanks.

Chris.

Userlevel 7
Badge +19

@Mike Struening any update? 

Userlevel 7
Badge +23

@Mike Struening any update? 

Sent a follow up.  I know which dev will be replying, just waiting on their formulating and posting 😂

Badge

Hi,

Regarding the questions in order 

  1. Yes using the vendor field will give information on the virtualization platform that is used
  2. You can use the below reference for vendor , we will also work on updating this in api.commvault.com
    VMWARE = 1,    MICROSOFT HYPER-V= 2,    XEN_SERVER = 3,    AMAZON = 4,    AZURE = 5,    REDHAT = 6,    AZURE RESOURCE MANAGER = 7,    SCVMM = 8,    NUTANIX = 9,    ORACLE_VM = 10,    DOCKER = 11,    OPENSTACK = 12,    ORACLE_CLOUD = 13,    FUSIONCOMPUTE = 14,    VCLOUD = 15,    GOOGLE_CLOUD = 16,    AZURE_STACK = 17,    ALIBABA_CLOUD = 18,    ORACLE_CLOUD_INFRASTRUCTURE = 19,    KUBERNETES = 20,    REDHAT_OPENSHIFT = 21

 

  1. Plese refer application ID . If application ID is 106 it means it is virtual server client 
Userlevel 7
Badge +19

Hi @Sowmya,

Thanks for the clarification, I however do not really understand what you mean with:

  1. Plese refer application ID . If application ID is 106 it means it is virtual server client 

I would say this means the client is protected using VSA, right? To be clear I'm referring to the logic that allows Commvault to determine if a client is a OI or VOI without VSA. 

Regards,

Onno

Userlevel 7
Badge +19

@Sowmya @Mike Struening  I would apricate an answer on my response!

To summarize my question once more:
Commvault has logic in the baseagent allowing it to detect if a client runs virtualized or not, without VSA being involved. Which API call can I use to retrieve this information.

Userlevel 7
Badge +23

I’ll reach out to @Sowmya .

Badge

@Onno van den Berg , Can you please try below api /v4/Servers? fq=clientProperties.isServerClient%3Aeq%3Atrue&showOnlyInfrastructureMachines=0&additionalProperties=true. Properties like “VMGuid”, “isVirtualServerDiscoveredClient” represent whether the client is physical or virtual 

 

"isVirtualServerDiscoveredClient": false,
                "clusterType": "UNKNOWN",
                "osInfo": {
                    "type": "Any",
                    "subType": "Any",
                    "osId": 0
                },
                "isUserCentricClient": false,
                "isCommCellPackageAbsent": true,
                "grcMigratedClient": false,
                "retireClientPhase": "UNKNOWN",
                "infrastructureMachineDetails": [],
                "isInfrastructure": false,
                "clientStatus": 0,
                "VMGUID": "",

Userlevel 7
Badge +19

@Sowmya thanks! I'll give it a try!

Reply