Setting up Persistent Scratch Space for an Arbitrary Number of ESXi Hosts
We've been configuring a large number of ESXi servers that don't have local hard drives. As such, we need to set up each system's scratch location on persistent storage, as per that KB article from VMware. That KB Article has a great section devoted to performing the process from PowerCLI and it basically takes you through the whole thing, soup to nuts, for a single ESXi host. That's all well and good, but what if you've got 16 hosts? Or 32? Or 64? Well, with a few minor changes to the procedure that they've outlined, you can very easily target every ESXi host in an environment. Bear in mind that this process does require a host reboot, so make sure that you have your ducks in a row (and preferably do this before you place any VMs onto the cluster). Instead of their step 6, I used this command to create a folder for all ESX hosts in the inventory: get-vmhost | foreach {new-item ".$($_.name)/scratch" -itemtype directory} Instead of their s...