colima: colima start does not honor default config, but then overwrites it

Description

The vz VM type does not work on my M3 Mac, so I must use qemu. My config at ~/.config/default/colima.yaml has vmType: qemu so that when I run colima start I should use the qemu VM type. Instead it goes with the vz type, and overwrites the config file as well. It also fails for this same reason when running brew services start colima, and indeed overwrites the config too. I am able to run colima start --edit, see that it has already overwritten the vmType, edit it to qemu, then exit and it will work, but a simple colima start fails. The only way I have ever gotten it to work in brew services temporarily is to run colima delete then reinstall colima, but it breaks again after some time, and I am not sure what triggers it, possibly a reboot.

Version

colima version 0.6.8 git commit: 9b0809d0ed9ad3ff1e57c405f27324e6298ca04f limactl version 0.20.1 qemu-img version 8.2.1

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

If I run colima start, then colima status:

FATA[0000] colima is not running

If I run colima start --edit, and edit it to qemu, then run colima status:

INFO[0000] colima is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/MYUSER/.colima/default/docker.sock

Reproduction Steps

  1. Set vmType: qemu in ~/.colima/default/colima.yaml.
  2. Run colima start.
  3. Note failure and check config to see it over.written with vmType: vz

Expected behaviour

colima start should run the profile in the config and not overwrite the config.

Additional context

colima start gives the following:

INFO[0000] runtime: docker
INFO[0000] starting ...                                  context=vm
> Using the existing instance "colima"
> errors inspecting instance: [vz driver is running but host agent is not]
FATA[0000] error starting vm: error at 'starting': exit status 1

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 15
  • Comments: 21 (2 by maintainers)

Commits related to this issue

Most upvoted comments

I encountered the same issue. After running this command, it worked fine.

colima stop -f

I ran into this as well but also got the following error:

failed to stop usernet “user-v2”: Get “http://lima/services/dhcp/leases”: dial unix /Users/kev/.colima/_lima/_networks/user-v2/user-v2_ep.sock: connect: connection refused

Fixed it with:

  • colima stop -f
  • rm -rf /Users/$USER/.colima/_lima/_networks
  • colima start

Hi guys,

same problem occurred here on my Mac M3 (Sonoma) after brew upgrade. I could get it running again with

colima delete colima start

Best regards, mscdit

P.S.: Attention … by doing so I hade to re-load all images/containers!

I have the same issue and a very naive solution worked for me. Definitely not a fix but restarting my computer worked.

Have you tried turning it off and on again?

I encountered the same issue. After running this command, it worked fine.

colima stop -f

This happened to me after updating to Sequoia 15.3.1 (macbook pro m3 max) and running colima stop -f fixed the issue. Try this first before you try colima delete because you’ll delete all your container data!

I ran into this as well but also got the following error:

failed to stop usernet “user-v2”: Get “http://lima/services/dhcp/leases”: dial unix /Users/kev/.colima/_lima/_networks/user-v2/user-v2_ep.sock: connect: connection refused

Fixed it with:

  • colima stop -f
  • rm -rf /Users/$USER/.colima/_lima/_networks
  • colima start

This still happens randomly to me and because I am lazy I created an alias for it and added it to my .zshrc:

alias colima:repair="colima stop -f && rm -rf /Users/$USER/.colima/_lima/_networks && colima start"

I ran into this as well but also got the following error:

failed to stop usernet “user-v2”: Get “http://lima/services/dhcp/leases”: dial unix /Users/kev/.colima/_lima/_networks/user-v2/user-v2_ep.sock: connect: connection refused

Fixed it with:

  • colima stop -f
  • rm -rf /Users/$USER/.colima/_lima/_networks
  • colima start

Had this problem recently and this quoted comment is the one that actually worked for me.

With Colima 0.7.5, I had this issue spontaneously in Mac M1, with a VZ VM that previously worked well. I can confirm that this solution from @kkarthik-1 fixed the issue:

I encountered the same issue. After running this command, it worked fine.

colima stop -f

I’m also having trouble with the same problem on my M3 Mac. Even if I rewrite the VM type of colima.yaml to qemu, when I run colima start, a log saying Starting the instance "colima" with VM driver "vz" is displayed, and The VM type will be automatically rewritten to vz.

I would appreciate it if it would be fixed as soon as possible.

I ran into this as well but also got the following error:

failed to stop usernet “user-v2”: Get “http://lima/services/dhcp/leases”: dial unix /Users/kev/.colima/_lima/_networks/user-v2/user-v2_ep.sock: connect: connection refused

Fixed it with:

* `colima stop -f`

* `rm -rf /Users/$USER/.colima/_lima/_networks`

* `colima start`

Just for the record, I encountered the same issue but I didn’t have to run the rm -rf command. Just forcing stop and starting again worked fine for me.