Hello,
I'm creating reporting script (aren't we all) to server various VMware environments, and one thing to get reported would be ESXi installation type.
This is possible via SSH running "esxcfg-info -e" ( Determining the ESXi installation type (2014558) | VMware KB )
Problem is that esxcfg-info does not have PowerCLI equivalent out of the box. I found William Lams script for this: Using the vSphere API to remotely collect ESXi esxcfg-info | virtuallyGhetto
But the output info from this does not hold "boot type" or "visor-" info, which I could parse out.
Has anyone done this kind of info pull with PowerCLI so far?
The obvious step is (in case type is visor-thin) to see if ESXi host is installed on local disk or SAN LUN. KB article for this is Identifying ESXi/ESX boot LUNs for Boot From SAN configurations (2030957) | VMware KB
-Mikko
Have a look at 1. Re: Esxi OS running on Local Sata HDD or SD card
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Have a look at 1. Re: Esxi OS running on Local Sata HDD or SD card
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
If only I could use search engines..
Thank you for the answer.
Second step proves to be bit hard: I do get UUID out for boot disk, and if I could map UUID to NAA, I could nicely tell more info about boot disk, for example if it is on local disks, or in SAN.
vmkfstools would give answer, but I found no way to run it with PowerCLI, and I do not want to go to Orchestrator workflow for this.
If every boot LUN would have VMFS volume, it could be done starting from here:
(Get-View (Get-View (Get-VMHost -Name $vmhost).ID).ConfigManager.StorageSystem).filesystemvolumeinfo.mountinfo.volume
I found this from here: PowerCLI script to get Datastore UUIDs
This would have UUID and NAA, and having NAA I could use for example get-scsilun or esxcli like
$esxcli = Get-EsxCli -VMHost $vmhost
$esxcli.storage.core.device.list()
or
$esxcli.storage.nmp.device.list()
Could you show a screenshot of the vmkfstools output that you are referring to?
Is SSH to the ESXi nodes an option?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hello,
below is output from CLI. All else I can obtain via PowerCLI, but not NAA - UUID pair.
SSH to hosts is not possible due to network topology. I'm doing reporting to several environments on different customers, which would also create quite a hassle with credential / key management.
[root@gra-esx01:~] ls -l /
lrwxrwxrwx 1 root root 49 Nov 17 10:26 altbootbank -> /vmfs/volumes/d3b2137e-40691826-634b-dad06e6fa681
[root@gra-esx01:~] vmkfstools -P /vmfs/volumes/0ba53a7f-76616496-4d0f-ce5617d2afdb
vfat-0.04 file system spanning 1 partitions.
File system label (if any):
Mode: private
Capacity 261853184 (63929 file blocks * 4096), 46415872 (11332 blocks) avail, max supported file size 0
UUID: 0ba53a7f-76616496-4d0f-ce5617d2afdb
Partitions spanned (on "disks"):
naa.600508b40008ca6a0000700002f40000:5
Is Native Snapshot Capable: NO
[root@gra-esx01:~] esxcli storage core device list -d naa.600508b40008ca6a0000700002f40000
naa.600508b40008ca6a0000700002f40000
Display Name: HP Fibre Channel Disk (naa.600508b40008ca6a0000700002f40000)
Has Settable Display Name: true
Size: 6144
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/naa.600508b40008ca6a0000700002f40000
Vendor: HP
Model: HSV300
Revision: 1130
SCSI Level: 5
Is Pseudo: false
Status: on
Is RDM Capable: true
Is Local: false
Is Removable: false
Is SSD: false
Is VVOL PE: false
Is Offline: false
Is Perennially Reserved: false
Queue Full Sample Size: 0
Queue Full Threshold: 0
Thin Provisioning Status: yes
Attached Filters:
VAAI Status: supported
Other UIDs: vml.0200010000600508b40008ca6a0000700002f40000485356333030
Is Shared Clusterwide: true
Is Local SAS Device: false
Is SAS: false
Is USB: false
Is Boot USB Device: false
Is Boot Device: true
Device Max Queue Depth: 30
No of outstanding IOs with competing worlds: 32
Drive Type: unknown
RAID Level: unknown
Number of Physical Drives: unknown
Protection Enabled: false
PI Activated: false
PI Type: 0
PI Protection Mask: NO PROTECTION
Supported Guard Types: NO GUARD SUPPORT
DIX Enabled: false
DIX Guard Type: NO GUARD SUPPORT
Emulated DIX/DIF Enabled: false
[root@gra-esx01:~]