# A template to enable vmnet.framework.

# Usage:
#   brew install socket_vmnet
#   limactl sudoers >etc_sudoers.d_lima
#   sudo install -o root etc_sudoers.d_lima /etc/sudoers.d/lima
#   limactl start template://vmnet

# This template requires Lima v0.7.0 or later.
# Older versions of Lima were using a different syntax for supporting vmnet.framework.
images:
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240423/ubuntu-24.04-server-cloudimg-amd64.img"
  arch: "x86_64"
  digest: "sha256:32a9d30d18803da72f5936cf2b7b9efcb4d0bb63c67933f17e3bdfd1751de3f3"
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240423/ubuntu-24.04-server-cloudimg-arm64.img"
  arch: "aarch64"
  digest: "sha256:c841bac00925d3e6892d979798103a867931f255f28fefd9d5e07e3e22d0ef22"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
  arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
  arch: "aarch64"

mounts:
- location: "~"
- location: "/tmp/lima"
  writable: true
networks:
# The instance can get routable IP addresses from the vmnet framework using
# https://github.com/lima-vm/socket_vmnet (since Lima v0.12).
#
# Available networks are defined in
# $LIMA_HOME/_config/networks.yaml. Supported network types are "host",
# "shared", or "bridged".
#
# Interface "lima0": shared mode  (IP is assigned by macOS's bootpd)
- lima: shared
# Interface "lima1": bridged mode (IP is assigned by a DHCP server on the physical network)
# - lima: bridged
