colima: Colima hangs on macOS, cannot stop

Description

Colima hanged on my macOS installation. The VMs I try to start simply get stuck. If I run colima status, it just hangs there forever.

colima stop returns INFO[0000] stopping colima and then also hangs.

colima start just returns WARN[0000] already running, ignoring.

The only way out was to manually kill the process qemu-system_x86_64 and restart colima, but then it froze again after running a VM. Even after that, colima start would print

INFO[0000] starting colima                              
INFO[0000] runtime: docker

and then again get stuck.

Version

colima version 0.6.8
git commit: 9b0809d0ed9ad3ff1e57c405f27324e6298ca04f
limactl version 0.20.1
qemu-img version 8.2.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

While it was in the stuck behavior, only the first two lines are displayed, then it hangs.

Operating System

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

Output of colima status

(hangs)

Reproduction Steps

It happens when running some specific VM.

Expected behaviour

No response

Additional context

No response

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 21
  • Comments: 20

Commits related to this issue

Most upvoted comments

same here. it stuck while trying to download something. image

Tried all of the above solution, none of them worked. Work around downgrading to 0.6.7 worked colima start --vm-type=vz --vz-rosetta=true --mount-type=virtiofs

MacOS 14.4 M1 Pro

below worked for me, brew install --HEAD colima colima delete default colima start --vm-type vz --mount-type virtiofs

The above didn’t fix it for me. Installed HEAD, started, and deleted defaults, but still stuck at expanding.

Apple Sillicon, M3 Pro macOS 14.4.1 colima HEAD-281757a

$ colima start              
INFO[0000] starting colima                              
INFO[0000] runtime: docker                              
INFO[0001] creating and starting ...                     context=vm
> 2.60 GiB / 3.50 GiB (74.22%) 67.92 MiB/s
> 2.66 GiB / 3.50 GiB (75.92%) 64.32 MiB/s
> 2.73 GiB / 3.50 GiB (77.87%) 61.07 MiB/s
> 2.79 GiB / 3.50 GiB (79.58%) 57.92 MiB/s
> 3.50 GiB / 3.50 GiB (100.00%) 63.63 MiB/s
> 3.50 GiB / 3.50 GiB (100.00%) 34.10 MiB/stime="2024-04-03T16:34:32+02:00" level=info msg="Expanding to 60GiB"

Look like it’s now working.

Steps to run.

  • brew install --HEAD colima
  • colima start -> stuck.
  • colima delete default
  • colima start -> working.

@rsau You mean the comment that you linked? I just did the same because I don’t really want to downgrade if it’s not necessary.

Yeah.

  • colima ssh
  • sudo chmod 666 /var/run/docker.sock

image

same issue as @ngamsomset… M1 MBP Sonoma 14.2.1 Colima 0.6.8

Edit: I ended up downgrading to 0.6.7 to get colima to a working state… it introduced another issue, which I was able to resolve. Here are the steps I took:

colima delete
sudo mkdir -p /usr/local/bin
sudo curl -L -o /usr/local/bin/colima https://github.com/abiosoft/colima/releases/download/v0.6.7/colima-Darwin-arm64 && sudo chmod +x /usr/local/bin/colima
 colima start --arch aarch64 --vm-type=vz --cpu 4 --memory 8

hit error:

exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/***/.colima/_lima/colima/ha.stderr.log")
FATA[0185] error starting vm: error at 'creating and starting': exit status 1

log: {"error":"close tcp4 127.0.0.1:443-\u003e127.0.0.1:51217: shutdown: socket is not connected","level":"debug","msg":"failed to call CloseWrite","time":"2024-02-21T17:05:17-03:00"} fixed with: rm -rf ~/.colima/_lima/_networks/user-v2 ran colima start again… worked.