VMware {code} Community
praneeth_mekala
Contributor
Contributor

Vmware Perl SDK: Finding Free LUN's of ESX hosts on Cluster

I am working on implementing one task using VMware Perl SDK and unable to find the relevant SDK objects.

Task: We have mapped a SAN LUN to "All ESX boxes in Cluster" (Ex : Cluster1)

Now, using "VMware Perl SDK" the script need to perform the below tasks

  1. Find out Free LUN's of ESX hosts on Cluster (Which were not formatted as VMFS, I mean fresh LUNS)

  2. Once after identifying the LUN's , formatting it to VMFS

0 Kudos
2 Replies
natxoasenjo
Enthusiast
Enthusiast

to get the scsi lun info, you probably need https://www.vmware.com/support/developer/converter-sdk/conv61_apireference/vim.host.ScsiLun.html You could probably take a look at https://communities.vmware.com/docs/DOC-11932 to get you started. If you post the code you have tried, then people will be more motivated to give you better answers, I think,  ;-), specially since you just asked this in stackovervlow (http://stackoverflow.com/questions/36424196/vmware-perl-sdk-finding-free-luns-of-esx-hosts-on-cluste...)

0 Kudos
praneeth_mekala
Contributor
Contributor

Thanks a lot for your information.  yes I just posted in Stackoverflow a couple of minutes prior to posting in Vmware. Because I am actually new to Vmware SDk so, thought of taking help from 2 channels 🙂  Coming back..  I tried using the managed object "host.DatstoreSystem -> CreateVmfsDatastore"

0 Kudos