VMware Cloud Community
orian
Hot Shot
Hot Shot

Datastore Name & Multipath Policy Report

Hello everyone,

I need to generate a report on all datastores in the VCenter that shows whether they are in Fixed \ Most Recently Used \ Round Robin multi path policy configuration.

How can I print the Datastore name as it appears in vsphere alongside the multipath policy?

  1. var lunits = host.config.storageDevice.multipathInfo.lun; 
  2. for each (var lun in lunits) { 
  3.   System.log(lun.policy.policy); 

Thanks!

Reply
0 Kudos
4 Replies
eoinbyrne
Expert
Expert

There's an array of VcScsiLun objects here which probably have the LUN IDs you can get from the MultiPathInfo object?

pastedImage_0.png

Reply
0 Kudos
orian
Hot Shot
Hot Shot

Hi,

I still don't see it.

I want this output:

Esx name --- Datastore name ---Multipath policy

I prefer to see the the datastore name and not the naa ID

Any idea?

Reply
0 Kudos
ririmia
Enthusiast
Enthusiast

Hi orian,

To have a clear view open the MOB (Managed Object Browser) of your vCenter (https://vCenter/mob/) and navigate on each property. Navigate to content.rootFolder.childEntity.hostFolder.childEntity  From 'host' properties click on one host.

To see the multipath information you need to navigate further on the below path: host.configManager.storageSystem.fileSystemVolumeInfo.storageDeviceInfo.multipathInfo.lun[]

For each LUN you have  lun.policy.policy

There isn't a direct link between your requested output.

The main reason is due to the fact that a datastore can have many extents (LUNs).

Take a look on LucD PowerCli script to see how is the relation between Host, Datastore and MultipathPolicy.

https://communities.vmware.com/thread/177612?start=15&tstart=0

Reply
0 Kudos
orian
Hot Shot
Hot Shot

Hi,

I'm familiar with the powershell script and I use it.

However I want to convert it to javascript and use it in the vRO.

I prefer to use the vRO for this task because all our vCenters are connected to it.

I hope someone can help me with this task...

Example from my powershell script:

pastedImage_0.png

Thanks!

Reply
0 Kudos