# This template requires Lima v0.8.3 or later.

# NOTE: EL8-based distros are known not to work on M1 chips: https://github.com/lima-vm/lima/issues/841
# EL9-based distros are known to work.

images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20240429.0.x86_64.qcow2"
  arch: "x86_64"
  digest: "sha256:dd4d28d3ff4e1e9e18748fdc1daae1f5502b93663fbd8c0a6072822fd0afd7e5"
- location: "https://cloud.centos.org/centos/8-stream/aarch64/images/CentOS-Stream-GenericCloud-8-20240429.0.aarch64.qcow2"
  arch: "aarch64"
  digest: "sha256:d72dc4d34920150e5bda2a29be8faef23639e02e95421a03c8df300a49436ff2"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-latest.x86_64.qcow2"
  arch: "x86_64"
- location: "https://cloud.centos.org/centos/8-stream/aarch64/images/CentOS-Stream-GenericCloud-8-latest.aarch64.qcow2"
  arch: "aarch64"
mounts:
- location: "~"
- location: "/tmp/lima"
  writable: true
firmware:
  # CentOS Stream 8 still requires legacyBIOS, while AlmaLinux 8 and Rocky Linux 8 do not.
  legacyBIOS: true
cpuType:
  # Workaround for "vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed" on Intel Mac
  # https://bugs.launchpad.net/qemu/+bug/1838390
  x86_64: "Haswell-v4"
