| name | host-caching |
| description | Set ReadOnly, ReadWrite, or None host caching per disk role |
Host Caching
When to use this skill
- Configuring OS, data, and log disks
- DB performance tuning
Key concepts
- ReadOnly — best for OS disk and read-heavy data; cache survives VM stop/start.
- ReadWrite — default for OS disk; not safe for transaction logs.
- None — use for write-heavy or strict durability (DB log volumes, journals).
- Cache backed by local SSD on the host — counts against cached IOPS limit on the SKU.
Azure CLI examples
az vm disk attach -g rg --vm-name db1 --name datadisk1 --caching ReadOnly
az vm disk attach -g rg --vm-name db1 --name logdisk1 --caching None
Common pitfalls
- ReadWrite cache on a SQL/Oracle log disk → corruption on host failure.
- Caching limits — cached IOPS share the SKU's cached pool; saturating it throttles all cached disks.
References
Validation-first: verify every Azure fact against the Microsoft Learn MCP server (cite the Learn URL); Learn overrides built-in knowledge. If no Learn MCP server is configured, flag the answer ⚠️ unverified and mark specs as indicative. Analysis only — verify against Microsoft documentation before applying.