Hi All,
How to get Esxi boot LUN information from list of servers through script. I know how to get from ESXi shell from below KB.
Identifying ESXi/ESX boot LUNs for Boot From SAN configurations (2030957) | VMware KB
Thank you in Advance.
Get-VMHost | Get-ScsiLun | fl
or you can potentially use the EsxliCLi
$esxcli = Get-EsxCli -VMHost $VMHos
$esxcli.storage.nmp.satp or $esxcli.storage.nmp.device
When i run Get-VMHost | Get-ScsiLun | fl , it is listing all LUN information which are attached to esxi servers
and below is out put from other commands
$esxcli = Get-EsxCli -VMHost esxiname
PowerCLI D:\> $esxcli.storage.nmp.satp
===================
EsxCliElement: satp
Elements:
---------
generic
rule
Methods:
--------
StorageArrayTypePlugin[] list()
string set(boolean boot, string defaultpsp, string satp)
string Help()
string Help(string methodName)
==================================================
PowerCLI D:\> $esxcli.storage.nmp.device
=====================
EsxCliElement: device
Methods:
--------
NmpDevice[] list(string device)
boolean set(boolean default, string device, string psp)
string Help()
string Help(string methodName)
sorry, here is the correct command
$esxcli.storage.nmp.device.list()
it is listing all LUN information which are attached to esxi server not boot lun information.
get the boot device uuid
$cli=Get-EsxCli
$cli.system.boot.device.get()|Select BootFilesystemUUID
take this uuid and match it with the mount filesystem from vmHost , then get the device backing from the mount info.
below link would help you to achieve the above mentioned step.
http://thephuck.com/virtualization/powercli-script-to-get-datastore-uuids/
we are able to get the boot device uuid with $cli.system.boot.device.get()|Select BootFilesystemUUID
but from the script which is in http://thephuck.com/virtualization/powercli-script-to-get-datastore-uuids/ the input requires datastore name as we dont no the name i am not able to get the output form the script where i can match.