VMware {code} Community
Dreamer732
Contributor
Contributor

How to get capacity and lun number of scsilun?

Hi,

I have the scsilun object but it doest expose properties like capacity and lun number.

How to retrieve these ?

http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.host.ScsiLun.html

Please look at the attached image which shows these properties in vSphere client....

Regards,

Naresh

Reply
0 Kudos
1 Reply
lamw
Community Manager
Community Manager

You need to correlate information between both a VMFS datastore and SCSI LUNs to get what you're looking for.

You can do this in either order:

1) Get list of all VMFS datastores and extract diskName in extent property (http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.wssdk.apiref.doc_50/vim.host.VmfsVolum...)

2) Get list of all SCSI Luns and map the diskName to canonicalName (http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.wssdk.apiref.doc_50/vim.host.ScsiLun.h...)

Reply
0 Kudos