colima icon indicating copy to clipboard operation
colima copied to clipboard

Colima not starting on Mac M2

Open bhavyamm01 opened this issue 11 months ago • 13 comments

Description

On running colima start on a Mac M2 machine, I'm stuck at

image (33)

Version

colima version 0.8.1
git commit: 96598cc5b64e5e9e1e64891642b91edc8ac49d16
limactl version 1.0.3
qemu-img version 9.2.0
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers

Operating System

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

Output of colima status

FATA[0000] colima is not running

Reproduction Steps

The issue is not reproducable as colima is working fine in other M2 systems.

Expected behaviour

Colima should start properly and the terminal should not be stuck

Additional context

Tried reinstalling colima, restarting the system

bhavyamm01 avatar Jan 14 '25 09:01 bhavyamm01

I do not have an m2 device to test with. However, this seems to caused by the username having a . in it.

I would try to reproduce this when I have some time.

abiosoft avatar Jan 15 '25 08:01 abiosoft

@abiosoft Thanks for the reply. Sure, do let me know if you find something

bhavyamm01 avatar Jan 15 '25 08:01 bhavyamm01

@abiosoft - i face the same issue, i have m3 sonoma and i dont think its because of the . in username INFO[0000] starting colima INFO[0000] runtime: docker INFO[0001] creating and starting ... context=vm

Terminal is not available, proceeding without opening an editor local username "4204181" is not a valid Linux username (must match "^[a-z_][a-z0-9_-]*$"); using "lima" instead

chinna832 avatar Jan 16 '25 13:01 chinna832

Colima is failing to start for me as well.

When I try to use limactrl start colima instead I see "cannot add network services: adding watcher failed: \"/private/var/run/docker.sock\": operation not supported on socket" in the logs.

wshuman3 avatar Jan 24 '25 12:01 wshuman3

A colleague of mine had the same issue, and the problem was that it had a broken symlink in /private/var/run/docker.sock left by Docker Desktop. He removed the link and Colima started without any issue after that

dcitterio avatar Jan 24 '25 13:01 dcitterio

A colleague of mine had the same issue, and the problem was that it had a broken symlink in /private/var/run/docker.sock left by Docker Desktop. He removed the link and Colima started without any issue after that

Worked for me Thanks!!

RomainMichau avatar Jan 24 '25 14:01 RomainMichau

@dcitterio removing the symlink worked for me as well. Thanks!

wshuman3 avatar Jan 24 '25 17:01 wshuman3

A colleague of mine had the same issue, and the problem was that it had a broken symlink in /private/var/run/docker.sock left by Docker Desktop. He removed the link and Colima started without any issue after that

Hey, thanks for sharing. Not sure where this file is located, do you mind sharing instructions to find/solve it? thanks~

bsavocad avatar Jan 28 '25 19:01 bsavocad

@abiosoft - i face the same issue, i have m3 sonoma and i dont think its because of the . in username INFO[0000] starting colima INFO[0000] runtime: docker INFO[0001] creating and starting ... context=vm

Terminal is not available, proceeding without opening an editor local username "4204181" is not a valid Linux username (must match "^[a-z_][a-z0-9_-]*$"); using "lima" instead

I think it is trying to match the name with the regex. and it seems it should start with a-z or _ But yours is starting with a number.

Sajjad-177 avatar Jan 29 '25 09:01 Sajjad-177

@bsavocad This is how I did it:

sudo rm /var/run/docker.sock
colima delete
colima start # should work now

(Note that for me the file was not in /private, not sure when it is placed there.)

denisw avatar Feb 03 '25 12:02 denisw

I had a similar issue where my Colima instance would not start. I tried uninstalling Colima using Homebrew which did not help.

But removing docker.sock did. On my machine the sudo disabled, but I was able to remove the sock file from my user space because /var/run/docker.sock was just a symlink.

After that, reinstalling Colima and starting the VM with Docker worked fine.

axeII avatar Feb 04 '25 10:02 axeII

Colima start should remove that socket by itself.

lu-zero avatar Feb 04 '25 15:02 lu-zero

Just adding here that I was having the same issue, and it got fixed by removing /private/var/run/docker.sock as was suggested here.

tparreira93 avatar Feb 12 '25 13:02 tparreira93