VMware Cloud Community
rdaka
Enthusiast
Enthusiast

vSAN information from vRO vCenter API

Hi,

I have a requirement to find whether a vSAN cluster is all flash or hybrid. In vSphere web client if I navigate to vSAN datastore->configure->Disks->Drive type would tell me its flash or not.

I would like to get the same programmatically using vRO vCenter plug in.

Below code is giving me the details about disks but it does not include the disk type. Is there any means to get this information as well.

var vsanStorageInfo = host.configManager.vsanSystem.config.storageInfo;

var diskMapInfo=vsanStorageInfo.diskMapInfo;

for each(disk in diskMapInfo){

     System.log("Device Name: "+disk.mapping.ssd.deviceName);

     System.log("Device path: "+disk.mapping.ssd.devicePath);

     System.log("scsiDisk Type: "+dGroup.mapping.ssd.scsiDiskType);

     System.log("Is local disk?: "+dGroup.mapping.ssd.localDisk);

}

Thanks,

Rajeev

Tags (2)
0 Kudos
0 Replies