20
Q: How do I specify a particular SR for use as the cache?
A: The host object field local-cache-sr refers to a local SR. You can view its value by running the following
command:
xe sr-list params=local-cache-sr,uuid,name-label
This field is set either:
• after host installation, if the "Enable thin provisioning" option was selected in the host installer
• by executing xe host-enable-local-storage-caching host=<host> sr-uuid=<sr>.
This command requires the specified host to be disabled, VMs must be shut down if this command is
used.
The first option uses the EXT type local SR and is created during host installation. The second option, uses
the SR that is specified on the command-line.
Warning:
These steps are only necessary for users who have configured more than one local SR.
Q: When is the local cache deleted?
A: A VDI cache file is only deleted when the VDI itself is deleted. The cache is reset when a VDI is attached to
a VM (for example on VM start). If the host is offline when the VDI is deleted, the SR synchronisation that
runs on startup will garbage collect the cache file.
Note:
The cache file is not deleted from the host when a VM is migrated to a different host or shut
down.