VMware Cloud Community
ThejasKV
Contributor
Contributor

How can I list unused LUNs (currently not used for RDM or VMFS) on the host ?

I want to deploy multiple VM with more than 16 disks. Out of the 16 disks, I will randomly add disk of type normal or rdm.

If condition under powercli code, need to add a command which picks a unused LUN on the host and add it to the VM.

Note: Listing out the unused LUNs, will save me from tasks failure because of adding a LUN which is already used.

Please help.

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

Have a look at LUN report – datastore, RDM and node visibility


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
ThejasKV
Contributor
Contributor

Hi,

I looked at the script. But I could not figure it out, how it can be used inorder to satisfy my rquirement.

Can you please a sample script to list the currently unused luns ?

Reply
0 Kudos
LucD
Leadership
Leadership

There is a sample run in the post itself.

For example line 22 in the resulting CSV is for an unused LUN


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos