lima-docker-vz.yaml は、
- https://github.com/lima-vm/lima/blob/v0.14.2/examples/docker.yaml をベースに、
- https://github.com/lima-vm/lima/blob/v0.14.2/examples/experimental/vz.yaml を混ぜ込んで、
Lima で Rosetta 2 と VirtioFS を効かすようにした YAML です。
docker.yaml との diff は以下のようになってます。
❯ diff /opt/homebrew/share/lima/examples/docker.yaml ~/lima-docker-vz.yaml
8a9,18
> # Example to run ubuntu using vmType: vz instead of qemu (Default)
> # This example requires Lima v0.14.0 or later and macOS 13.
> vmType: "vz"
> rosetta:
> # Enable Rosetta for Linux.
> # Hint: try `softwareupdate --install-rosetta` if Lima gets stuck at `Installing rosetta...`
> enabled: true
> # Register rosetta to /proc/sys/fs/binfmt_misc
> binfmt: true
>
28a39,44
> mountType: "virtiofs"
>
> networks:
> # The "vzNAT" IP address is accessible from the host, but not from other guests.
> - vzNAT: true
>
lima-docker-vz.yaml をテキトーな場所に転がして、
limactl start --name=lima-docker-vz /path/to/lima-docker-vz.yaml
などとすれば利用できます。
macOS 12 の頃に brew install lima
していたのをそのまま brew upgrade
してきて、macOS 13 にしたなら brew reinstall lima
が必要かもしれません。