virtualdive
VMware Employee
VMware Employee

How to find out the VM's on the LUN's?

Jump to solution

Hi All,

I have 110 LUN's in my VC and a huge list of Virtual Machine names. All these VM's are present in these 110 LUN's and if I start checking VM's one by one, it will take me months to complete.

I want to find out which VM is present in which LUN, is there any quick solution to find out that?

Thank you,

Regards,

'V'
thevshish.blogspot.in
vExpert-2014-2021
0 Kudos
1 Solution

Accepted Solutions
Troy_Clavell
Immortal
Immortal

Finally, something like RVTools could be useful

View solution in original post

0 Kudos
8 Replies
Maximenu
Hot Shot
Hot Shot

Hello virtualdive

You can connect by SSH to the ESX server and use the command "find" (find -h). Smiley Happy

Javier Galvez

IaaS Evangelist

Joined the VMTN Community in Dic, 2004

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful.
bshubinsky
Hot Shot
Hot Shot

If you prefer a more visual method, you can go to Inventory --> Datastores in the vSphere client and see a list of VMs per datastore by selecting the LUN and clicking the Virtual Machines tab.

0 Kudos
virtualdive
VMware Employee
VMware Employee

Thanks Maximenu,

This will only tell the VM on the host, but not on the LUN. And also, if there is a big list of ESX hosts then again it does not save time at all.

Thanks

Regards,

'V'
thevshish.blogspot.in
vExpert-2014-2021
0 Kudos
Troy_Clavell
Immortal
Immortal

Finally, something like RVTools could be useful

0 Kudos
virtualdive
VMware Employee
VMware Employee

HI Bshubinsky,

I was doing that anyways and also if no solution comes out then I will have to continue that. This is only helpful when there are 10-20 LUN's not when there are 110 LUN's. If I keep checking every single LUN for the virtual machine then it will take lot of time I guess.

Thanks

Regards,

'V'
thevshish.blogspot.in
vExpert-2014-2021
0 Kudos
f10
Expert
Expert

How about using vSphere PowerCLI, you dont have to be an expert in scripting to use this tool. All you have to do is use Get-VM | Get-Datastore -name <nameofdatastore> commandlets. For more information visit http://www.vmware.com/support/developer/PowerCLI/index.html

Regards,

Arun

Regards, Arun Pandey VCP 3,4,5 | VCAP-DCA | NCDA | HPUX-CSA | http://highoncloud.blogspot.in/ If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
virtualdive
VMware Employee
VMware Employee

Thanks Troy & Arun,

Both the solutions seems to be worked out.

Thanks

Regards,

'V'
thevshish.blogspot.in
vExpert-2014-2021
0 Kudos
nkrishnan
Expert
Expert

Try following options, hope it helps

1) vmware-cmd -l on the host

2) vim-cmd hostsvc/datastore/listvm <datastorename> and

vim-cmd hostsvc/datastore/capabilities - for getting the datastore name
3) Goto VC select datastore as inventory - select the perticular datastore, go to Virtual Machines tab. It will list you the VMs in the perticular datastore
Thanks
Nithin
--Nithin
0 Kudos