3 Replies Latest reply on Jul 4, 2012 7:24 AM by Bhumika NameToUpdate

    BLCLI query to get Vmware Cluster where VM is located

      hi Guys,

       

      do you know how could i perform a query to ask via BLCLI which is the Vmware Cluster used by a specific VM (input of the script)?

       

      many thanks for you help !

        • 1. Re: BLCLI query to get Vmware Cluster where VM is located
          Bill Robinson

          I think that if you run a virtual infrastructure discovery job against the env, and your host servers also are registered properly w/ bsa, the VM_HOST property will be populated on the guests w/ the host server.

          • 2. BLCLI query to get Vmware Cluster where VM is located

            There is no direct BLCLI available which can give you name of Cluster being used by specific VM

             

            You can find out cluster of a particular VM using following ways:


            1. Run a Virtual Infrastucture Discovery Job on VC in which your VM resides with 'Auto Register discoverd Virtual Systems' option selected.When the job completes, all virtual machines on your VC are enrolled in BSA. The 'VMware_Cluster*' property is populated in Virtualization PSI for each enrolled VM which will give you name of cluser being used by that VM.

             

            2. Make a rest call for Server Properties node of a Virtual Machine using following URL

             

            "https://<APPSERVER_MACHINE_NAME>:9843/group/Servers/<VC_PATH>/Assets/BMC_VMware_VirtualInfrastructureManager/Virtual Machines/<VM_NAME>/Server

            Properties/?username=<USER>&password=<PASSWORD>&role=<ROLE>"

             

            where ,
            APPSERVER_MACHINE_NAME  = host name / IP of appserver
            VC_PATH     = path of VC in server groups
            VM_NAME     = name of VM whose parent cluster you want to find out
            USER      = name of user to log into appserver
            PASSWORD    = password used to log into appserver
            ROLE     = role used to log into appserver

             

            The value of attribute with display name 'Parent Cluster' gives the cluster name.

             

            Can we know the exact use case for which you need name of cluster being used by VM? We may be able to help you better.. 

            1 of 1 people found this helpful
            • 3. BLCLI query to get Vmware Cluster where VM is located

              BLCLI can be used to make a rest call though.

               

              e.g.

               

              blcli -v <PROFILE_NAME> -r <ROLE> get "/group/Servers/<VC_PATH>/Assets/BMC_VMware_VirtualInfrastructureManager/Virtual Machines/<VM_NAME>/Server Properties/"

               

              where,

              PROFILE_NAME = name of profile which contains creadentials to connect to appserver

              ROLE = Role used to log into appserver

              VM_NAME = name of VM whose parent cluster you want to find out

               

              This BLCLI call will return xml containing all attributes of Server Properties node of a VM, their values etc.

              The value of attribute VMWare_ParentCluster (display name : Parent Cluster) would give you information needed.

              1 of 1 people found this helpful