VMware Cloud Community
RajuVCP
Hot Shot
Hot Shot

script to get where is my ESXi is installed. is it local or SAN for multiple ESXi.

Hi All,

I have ESXi installed in both local and SAN  in my infrastructure and its very difficult to find out which esxi is installed locally or SAN. Is there an script which can give detailed esxi where it is installed on which datastore.

Thanks a ton in advance.

Raju Gunnal VCP 4, VCP 5, VTSP 4, VTSP 5, ITIL V3 http://www.techtosolution.com
Tags (1)
Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership

Would this help to determine that ?

$esxcli = Get-EsxCli -VMHost MyEsx

$bootDev = $esxcli.system.boot.device.get()

$esxcli.storage.filesystem.list() | Where{$_.UUID -eq $bootDev.BootFilesystemUUID}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
RajuVCP
Hot Shot
Hot Shot

Thanks LucD ,

Thanks for your quick response as always...:)

I got the out as given below, it would useful if we have the datastore name which helps to identify if esxi is installed locally or on my SAN.

PowerCLI H:\MY DATA\Script Important> .\esxiinstalledwhere.ps1


Free       : 61943808
MountPoint : /vmfs/volumes/92e5f871-3c66edc9-9380-e0f2ae7b6ee2
Mounted    : true
Size       : 261853184
Type       : vfat
UUID       : 92e5f871-3c66edc9-9380-e0f2ae7b6ee2
VolumeName :

Raju Gunnal VCP 4, VCP 5, VTSP 4, VTSP 5, ITIL V3 http://www.techtosolution.com
Reply
0 Kudos