Thursday, December 20, 2012

Set the Scratch Partition from the vSphere Client

If a scratch partition is not set up, you might want to configure one, especially if low memory is a concern. When a scratch partition is not present, vm-support output is stored in a ramdisk.
The directory to use for the scratch partition must exist on the host.

1

Use the vSphere Client to connect to the host.
2

Select the host in the Inventory.
3

In the Configuration tab, select Software.
4
Select Advanced Settings.
5
Select ScratchConfig.
The field ScratchConfig.CurrentScratchLocation shows
the current location of the scratch partition.
6

In the field ScratchConfig.ConfiguredScratchLocation,
enter a directory path that is unique for this host.

Example of directory path is
/vmfs/volumes/NFS-SYNOLOGY-SSD/scratch/esx21.home.uw.cz

In the example above, I have
datastore with name NFS-SYNOLOGY-SSD
where I have subdirectory scratch
having another subdirectory esx21.home.uw.cz 

7

Reboot the host for the changes to take effect.

(copy from vSphere documentation)

For automated scratch partition configuration you can use vCLI, PowerCLI. For details see. VMware KB 1033696.

And here is my PowerCLI script inspired by KB above to set scratch location on all ESXi hosts in particular vSphere clusters.

No comments: