Speed Up Colima on an M1/M2 Mac

May 14, 2023

Colima is an absolutely fantastic drop-in replacement for Docker Desktop on macOS and Linux devices.  When I had switched from an Intel Mac to an M1 Mac, I noticed that Colima had slowed down quite a bit.  I figured this was unavoidable due to the Rosetta 2 translation until I read about some of Colima's available flags.  Here's how to speed up Colima on an M1/M2/etc. (any aarch64) Mac!

If you do not have Colima installed, please install it before proceeding:

brew install colima

When launching your Colima VM for the first time, use the following flags:

colima start --arch aarch64 --vm-type=vz --vz-rosetta

Explanations from Colima's help flag:

  • aarch64: Architecture (aarch64, x86_64)
  • vz: Virtual machine type (qemu, vz)
  • vz-rosetta: Enable Rosetta for amd64 emulation

Benefits of Our Settings:

  • If you run your Colima VM with aarch64 set, Rosetta 2 no longer has to translate your VM live; the VM just runs natively now.
  • VZ is Apple's new virtualization framework. It is available in macOS 11.0 onward. It replaces the traditionally used QEMU emulator.
  • vz-rosetta allows for the translation of x86_64 processes. This is helpful if any of the containers you are running require x86_64 packages.

If you've never used Colima before, I highly recommend that you try it out.  Docker Desktop requires licensing for usage in Enterprise settings plus it's slow and bloated.  Colima is a wonderful drop-in replacement that you can have up-and-running in just a minute or two!

©2024 Tyler Wright