VMware Cloud Community
MauroBonder
VMware Employee
VMware Employee
Jump to solution

Script VMA Get VM´s in Lun

I  wonder if by chance someone has any script to run through the VMA to  pick up the information on which virtual machines are in which LUNs.

Thank you.

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

You can take a look vminfo.pl which is part of the vSphere SDK for Perl Utilities which is included as part of the vCLI and/or vMA

You can get all the details by just running:

./vminfo.pl --server [VCENTER_SERVER]

or you can pass in specific fields and the vmPathName gives you the full path of hte configuration but also shows you which datastore it's configured in.

./vminfo.pl --server [VCENTER_SERVER] --fields vmPathName

Here are a few other custom vSphere SDK for Perl scripts that could provide additional details if needed:

http://communities.vmware.com/docs/DOC-11932

http://communities.vmware.com/docs/DOC-10807

http://communities.vmware.com/docs/DOC-10788

View solution in original post

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

You can take a look vminfo.pl which is part of the vSphere SDK for Perl Utilities which is included as part of the vCLI and/or vMA

You can get all the details by just running:

./vminfo.pl --server [VCENTER_SERVER]

or you can pass in specific fields and the vmPathName gives you the full path of hte configuration but also shows you which datastore it's configured in.

./vminfo.pl --server [VCENTER_SERVER] --fields vmPathName

Here are a few other custom vSphere SDK for Perl scripts that could provide additional details if needed:

http://communities.vmware.com/docs/DOC-11932

http://communities.vmware.com/docs/DOC-10807

http://communities.vmware.com/docs/DOC-10788

0 Kudos
MauroBonder
VMware Employee
VMware Employee
Jump to solution

Thanks a lot!

I need a script that retun per example:

LUN1

virtualmacinhe1 - 25gb

virtualmachine2 - 30gb

virtualmachine3 - 100gb

LUN2

virtualmachine4 - 15 gb

you know if there is this script ?

regards

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
0 Kudos
MauroBonder
VMware Employee
VMware Employee
Jump to solution

Hey,

You know if have a option in this script to generate a output in format html or more friendly that text ?

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
0 Kudos