VMware Aria Automation Orchestrator

 View Only
  • 1.  info from Datastore

    Posted Sep 16, 2024 09:41 AM
      |   view attached

    hi 

    need help how I get the spasific info from datastore 

    i have var DS (VC:Datastore)
    and I get the for System.log like this jkjj

    System.log("DS info - name " + ds.summary.name)

    but I need to know how to access "<clr-stack-label>Drive type"  </clr-stack-label>
    <clr-stack-label>need to know I get this info</clr-stack-label>
    <clr-stack-label>I add a pic </clr-stack-label>what i mean
    <clr-stack-label>THX </clr-stack-label>



  • 2.  RE: info from Datastore

    Posted Sep 20, 2024 03:49 PM

    Hi,

    The API doesn't have a type called "Flash". To get it, you can run the command below.

    System.log(ds.info.vmfs.ssd)

    The command will return "true" if the datastore is SSD-based, which is equal to "Flash" in the vCenter GUI.



    ------------------------------
    If you find the answer helpful, please click on the RECOMMEND button.

    Please visit my blog to get more information: https://www.clouddepth.com
    ------------------------------



  • 3.  RE: info from Datastore

    Broadcom Employee
    Posted Jan 04, 2026 02:13 PM

    I have created a solution for this in TypeScript using the Aria Build Tools

    https://github.com/vmware/build-tools-for-vmware-aria

        public VcStoragePodLogDetails(objVcStoragePod: VcStoragePod): void {
    
            let objVcStoragePodSummary: VcStoragePodSummary = objVcStoragePod.summary;
    
            let arrVcDatastore: VcDatastore[] = objVcStoragePod.childEntity as VcDatastore[];
    
            this.objLogger.info(`VcStoragePod Name = ${objVcStoragePod.name} has ${arrVcDatastore.length} datastores with a total capacity of ${objVcStoragePodSummary.capacity.toString()} and a free space of ${objVcStoragePodSummary.freeSpace}.`);
    
            arrVcDatastore.forEach((objVcDatastore: VcDatastore): void => {
    
                let objVcDatastoreCapability: VcDatastoreCapability = objVcDatastore.capability;
                let arrVcDatastoreHostMount: VcDatastoreHostMount[] = objVcDatastore.host;
                let objVcDatastoreSummary: VcDatastoreSummary = objVcDatastore.summary;
                let objVcVmfsDatastoreInfo: VcVmfsDatastoreInfo = objVcDatastore.info as VcVmfsDatastoreInfo;
                let objVcHostVmfsVolume: VcHostVmfsVolume = objVcVmfsDatastoreInfo.vmfs;
    
                this.objLogger.info(`VcStoragePod Name = ${objVcStoragePod.name} has a datastore named ${objVcDatastore.name} with a type of ${objVcVmfsDatastoreInfo.vmfs.type} with a total provisioned space of ${objVcDatastore.provisionedSpace.toString()} with a total capacity of ${objVcDatastore.capacity.toString()} and a free space of ${objVcDatastore.freeSpace.toString()} which is mounted by ${arrVcDatastoreHostMount.length} ESXi hosts.`);
    
            });
        }


    ------------------------------
    Simon Sparks
    Automation & Orchestration Consultant
    North West England, UK, Europe
    Broadcom Employee
    ------------------------------