Colima not starting on Mac M2
Description
On running colima start on a Mac M2 machine, I'm stuck at
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
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 Thanks for the reply. Sure, do let me know if you find something
@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
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.
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
A colleague of mine had the same issue, and the problem was that it had a broken symlink in
/private/var/run/docker.sockleft by Docker Desktop. He removed the link and Colima started without any issue after that
Worked for me Thanks!!
@dcitterio removing the symlink worked for me as well. Thanks!
A colleague of mine had the same issue, and the problem was that it had a broken symlink in
/private/var/run/docker.sockleft 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~
@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.
@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.)
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.
Colima start should remove that socket by itself.
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.