AlbertWT
Virtuoso
Virtuoso

Get the list of ESXi servers /scratch locations path?

Jump to solution

Hi All,

Using this script, it is possible to automatically create /scratch directory location for multiple ESXi servers without causing outage during the business hours.

https://gist.githubusercontent.com/vmnomad/0255d3a4b6397bfd11a09e6df7b2be0d/raw/5268132bc877ba8c40f6...

Would it be possible to get the list of ESXi servers that has no /scratch location or display the /scratch location full path when already configured?

VMware Knowledge Base

Thank you in advance.

/* Any kind of comment or input would be greatly appreciated */
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

You could do something like this

Get-VMHost |

Select Name,

    @{N='Scratch';E={(Get-AdvancedSetting -Entity $_ -Name 'ScratchConfig.CurrentScratchLocation').Value}}


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

View solution in original post

4 Replies
LucD
Leadership
Leadership

You could do something like this

Get-VMHost |

Select Name,

    @{N='Scratch';E={(Get-AdvancedSetting -Entity $_ -Name 'ScratchConfig.CurrentScratchLocation').Value}}


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

View solution in original post

AlbertWT
Virtuoso
Virtuoso

Wow, thanks LucD​ for the very quick reply 🙂

Name        Scratch                                         

----        -------                                         

DCESXi02   /vmfs/volumes/5bee0d4f-06972c59-4e9f-1458d0b47050

DCESXi03   /vmfs/volumes/5be524fc-abe31cc0-3f13-1458d050f658

DCESXi01   /vmfs/volumes/5becf996-1a46a3dc-a02f-1458d0b30568

How do we know if the above is a persistent location that can save CoreDump persistently?

/* Any kind of comment or input would be greatly appreciated */
0 Kudos
LucD
Leadership
Leadership

If that location is pointing to a datastore path (as in your report) and not a /tmp folder, I assume it is persistent.
I don't know if there is a flag or property that actually says persistent or not.

KB1033696 seems to say the same.


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

AlbertWT
Virtuoso
Virtuoso

yes, that does make sense.

Thanks, Luc.

/* Any kind of comment or input would be greatly appreciated */
0 Kudos