Anyone have any scripts out there on getting all hosts with local disks? Gearing up to switch our hosts from SD to LocalDisk installs and need a script to identify which hosts don't still have a local disk.
Thanks!
If you only want check if an ESXi was booted from SD or a local disk, you do something like in Solved: Re: Esxi OS running on Local Sata HDD or SD card - VMware Technology Network VMTN
To get a list of all local device, you could use the Get-EsxCli cmdlet and then do
$esxcli.storage.core.device.list.Invoke()
The returned devices have properties like IsLocal and IsUSB that should allow you to find the SD, if still present
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Just to make sure, with "hosts", do you mean ESXI nodes?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ha! You sound like one of my network guys. lol Yeah, ESX Hosts. They all have SD cards we've traditionally used and over the last couple years we've been slowly adding a local drive for logging/scratch. I'm just wanting to try an see which ones are still missing the local drive that's not an SD.
If you only want check if an ESXi was booted from SD or a local disk, you do something like in Solved: Re: Esxi OS running on Local Sata HDD or SD card - VMware Technology Network VMTN
To get a list of all local device, you could use the Get-EsxCli cmdlet and then do
$esxcli.storage.core.device.list.Invoke()
The returned devices have properties like IsLocal and IsUSB that should allow you to find the SD, if still present
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference