VMware {code} Community
woadmin
Contributor
Contributor
Jump to solution

Map Datastore Name to Datastore UID

Hi,

I am trying to map the Datastore Name, which I can see in the vSphere Client, to the right UID which is used by VMWare to access a Datastore.

Basically what I need is the same output "ls -alh /vmfs/volumes/" gives me. But I need to get this information from vMA so using the Perl SDK for example.

I want to create a script that maps these names and uids for every Host in our vSphere Cluster. We have mostly NFS Datastores but also a few iSCSI LUNs.

Can anyone help out?

Thanks and regards

woadmin

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

You're lucky, I had already written such a script awhile back - http://communities.vmware.com/docs/DOC-10706

For other useful vSphere SDK for Perl scripts, check out the vGhetto Script Repository - http://communities.vmware.com/docs/DOC-9852

View solution in original post

0 Kudos
2 Replies
lamw
Community Manager
Community Manager
Jump to solution

You're lucky, I had already written such a script awhile back - http://communities.vmware.com/docs/DOC-10706

For other useful vSphere SDK for Perl scripts, check out the vGhetto Script Repository - http://communities.vmware.com/docs/DOC-9852

0 Kudos
woadmin
Contributor
Contributor
Jump to solution

wow... amazing. I was not even finished bookmarking the thread yet. Thank you very much.

woadmin

0 Kudos