Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Desktop causes Colima to fail to start on Macbook Pro, M3 Max processor #1261

Closed
1 of 5 tasks
JoeHCQ1 opened this issue Jan 28, 2025 · 4 comments
Closed
1 of 5 tasks

Comments

@JoeHCQ1
Copy link

JoeHCQ1 commented Jan 28, 2025

Description

When I install Colima and then Qemu via Brew, all sees well but then it never actually starts. It hangs like so:

~ % colima start 
INFO[0000] starting colima                              
INFO[0000] runtime: docker                              
INFO[0002] starting ...                                  context=vm
> Creating an instance "colima" from template://default (Not from template://colima)
> This form is deprecated. Use `limactl create --name=colima template://default` instead
> Using the existing instance "colima"

This command never exits ^. I can see the VM instance here:

~ % colima list
PROFILE    STATUS     ARCH       CPUS    MEMORY    DISK      RUNTIME    ADDRESS
default    Stopped    aarch64    2       2GiB      100GiB  

The same thing happened when I tried to run it with some custom settings in hopes of getting an x64 socket running on Rosetta, my end goal.

Running brew services start colima also doesn't fix it. I get this if I run it as my normal user:

~ % brew services start colima
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/bluegill/Library/LaunchAgents/homebrew.mxcl.colima.plist` exited with 5.

And if I run as root I get this - which seems to have still failed:

~ % sudo brew services start colima
Password:
Sorry, try again.
Password:
Warning: Taking root:admin ownership of some colima paths:
  /opt/homebrew/Cellar/colima/0.8.1/bin
  /opt/homebrew/Cellar/colima/0.8.1/bin/colima
  /opt/homebrew/opt/colima
  /opt/homebrew/opt/colima/bin
  /opt/homebrew/var/homebrew/linked/colima
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: colima must be run as non-root to start at user login!
==> Successfully started `colima` (label: homebrew.mxcl.colima)
~ % colima status
FATA[0000] colima is not running                        
~ % sudo colima status
FATA[0000] colima is not running               

Version

colima version 0.8.1
git commit: 96598cc
limactl version 1.0.4
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)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

FATA[0000] colima is not running

Reproduction Steps

  1. brew install colima
  2. brew install qemu
  3. colima start

Expected behaviour

Colima would create a docker socket that would be used by default on my machine.

Additional context

My system is locked down with Jamf, this could relate to the problem, but others at my company are using Colima successfully, with the same cyber controls on their macs.

@JoeHCQ1
Copy link
Author

JoeHCQ1 commented Jan 28, 2025

I tried running lima directly. This may help clarify the issue:

~ % limactl start
? Creating an instance "default" Proceed with the current configuration
INFO[0011] Starting the instance "default" with VM driver "vz" 
INFO[0011] Attempting to download the image              arch=aarch64 digest="sha256:34c1b8c2fe220f67faa351a240d199987db52c574d1a100548386998641434c4" location="https://cloud-images.ubuntu.com/releases/24.10/release-20250110/ubuntu-24.10-server-cloudimg-arm64.img"
Downloading the image (ubuntu-24.10-server-cloudimg-arm64.img)
579.04 MiB / 579.04 MiB [----------------------------------] 100.00% 11.09 MiB/s
INFO[0064] Downloaded the image from "https://cloud-images.ubuntu.com/releases/24.10/release-20250110/ubuntu-24.10-server-cloudimg-arm64.img" 
INFO[0064] Converting "/Users/bluegill/.lima/default/basedisk" (qcow2) to a raw disk "/Users/bluegill/.lima/default/diffdisk" 
3.50 GiB / 3.50 GiB [---------------------------------------] 100.00% 1.87 GiB/s
INFO[0066] Expanding to 100GiB                          
INFO[0066] Attempting to download the nerdctl archive    arch=aarch64 digest="sha256:2a97f78e14cb3e024068d936c8fb801365981e5b48577e278907079de47e4d2c" location="https://github.com/containerd/nerdctl/releases/download/v2.0.3/nerdctl-full-2.0.3-linux-arm64.tar.gz"
Downloading the nerdctl archive (nerdctl-full-2.0.3-linux-arm64.tar.gz)
202.48 MiB / 202.48 MiB [----------------------------------] 100.00% 12.25 MiB/s
INFO[0084] Downloaded the nerdctl archive from "https://github.com/containerd/nerdctl/releases/download/v2.0.3/nerdctl-full-2.0.3-linux-arm64.tar.gz" 
INFO[0084] [hostagent] hostagent socket created at /Users/bluegill/.lima/default/ha.sock 
INFO[0084] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/bluegill/.lima/default/serial*.log") 
INFO[0084] [hostagent] reloading dns nameservers to [208.67.222.222:53 208.67.220.220:53 192.168.50.1:53] 
FATA[0084] exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/bluegill/.lima/default/ha.stderr.log") 
~ % cat /Users/bluegill/.lima/default/ha.stderr.log 
{"level":"debug","msg":"ResolveVMType: resolved VMType \"vz\" (existing instance, with \"/Users/bluegill/.lima/default/vz-identifier\")","time":"2025-01-28T17:19:48-05:00"}
{"level":"debug","msg":"Creating iso file /Users/bluegill/.lima/default/cidata.iso","time":"2025-01-28T17:19:49-05:00"}
{"level":"debug","msg":"Using /var/folders/18/5mn4kwbs3sb1dxtz18k5jxvw0000gp/T/diskfs_iso756511344 as workspace","time":"2025-01-28T17:19:49-05:00"}
{"level":"debug","msg":"Failed to detect CPU features. Assuming that AES acceleration is available on this Apple silicon.","time":"2025-01-28T17:19:49-05:00"}
{"level":"debug","msg":"OpenSSH version 9.8.1 detected","time":"2025-01-28T17:19:49-05:00"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing aes128-gcm@openssh.com and aes256-gcm@openssh.com","time":"2025-01-28T17:19:49-05:00"}
{"level":"info","msg":"hostagent socket created at /Users/bluegill/.lima/default/ha.sock","time":"2025-01-28T17:19:49-05:00"}
{"level":"info","msg":"Starting VZ (hint: to watch the boot progress, see \"/Users/bluegill/.lima/default/serial*.log\")","time":"2025-01-28T17:19:49-05:00"}
{"level":"debug","msg":"Start udp DNS listening on: 127.0.0.1:61229","time":"2025-01-28T17:19:49-05:00"}
{"level":"debug","msg":"Using search domains: [placeholder-32679.hostname.internal roger]","time":"2025-01-28T17:19:49-05:00"}
{"level":"debug","msg":"Start tcp DNS listening on: 127.0.0.1:50445","time":"2025-01-28T17:19:49-05:00"}
{"level":"info","msg":"reloading dns nameservers to [208.67.222.222:53 208.67.220.220:53 192.168.50.1:53]","time":"2025-01-28T17:19:49-05:00"}
{"level":"fatal","msg":"cannot add network services: adding watcher failed: \"/private/var/run/docker.sock\": operation not supported on socket","time":"2025-01-28T17:19:49-05:00"}

@nagualdev
Copy link

Same happens to me in my M1 Pro. The command never ends.

INFO[0001] starting colima
INFO[0001] runtime: docker+k3s
INFO[0005] starting ... context=vm

Creating an instance "colima" from template://default (Not from template://colima)
This form is deprecated. Use limactl create --name=colima template://default instead
Using the existing instance "colima"

@nagualdev
Copy link

Related to this issue: #1248

Solved removing docker-desktop and the symlink it leaves after it.

@JoeHCQ1
Copy link
Author

JoeHCQ1 commented Jan 29, 2025

That worked for me too.

To reiterate the solution found in #1248 for anyone else who has this problem:

  1. Remove Docker Desktop from your computer (if you're new to Mac like me that means go to Finder, Applications, select Docker, right click -> move to trash)
  2. Remove the symlink and install docker via brew (Colima needs it):
sudo rm /private/var/run/docker.sock

brew install docker

@JoeHCQ1 JoeHCQ1 closed this as completed Jan 29, 2025
@JoeHCQ1 JoeHCQ1 changed the title Colima not starting on Macbook Pro, M3 Max processor Docker Desktop install causes Colima to fail to start on Macbook Pro, M3 Max processor Jan 29, 2025
@JoeHCQ1 JoeHCQ1 changed the title Docker Desktop install causes Colima to fail to start on Macbook Pro, M3 Max processor Docker Desktop causes Colima to fail to start on Macbook Pro, M3 Max processor Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants