Skip to content

Colima + containerd setup guide for macOS 12.7.6 using MacPorts. Solves QEMU compiler issues on legacy Mac hardware when Homebrew fails.

Notifications You must be signed in to change notification settings

santosh-antony/colima-macOS12-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Colima Setup on Mac Pro Early 2015 - Summary

System Information

  • Hardware: Mac Pro Early 2015
  • Operating System: macOS Monterey 12.7.6
  • Colima Version: 0.9.1

Problem Encountered

Attempted to start Colima with the following configuration:

colima start --profile worker-2 --cpu 1 --memory 2 --disk 20 --runtime containerd --kubernetes disable

Initial Issue: Configuration File Error

  • Error: WARN[0001] config load failed: could not load config from file: yaml: control characters are not allowed
  • Created a clean colima.yaml configuration file at ~/.colima/worker-2/colima.yaml

Second Issue: vmType Incompatibility

  • Initial config contained vmType: vz
  • Error: FATA[0006] error in config: cannot use vmType: 'qemu', error: qemu-img not found
  • Root cause: macOS 12.7.6 does not support vz vmType (requires macOS 13+)
  • Solution: Changed to vmType: qemu, but this required QEMU installation

Third Issue: QEMU Installation Failure via Homebrew

  • Attempted: brew install qemu
  • Error: Compiler version incompatibility
    ERROR: You either need GCC v7.4 or Clang v10.0 (or XCode Clang v15.0) to compile QEMU
    
  • System had: Clang 14.0.0 (from Command Line Tools)
  • QEMU 10.2.0 required: Clang 15.0+ (which requires macOS 13+)
  • Homebrew limitation: macOS 12 is Tier 3 support - unsupported for latest packages

Compiler Upgrade Attempts

  1. Command Line Tools 14.2: Maximum version compatible with macOS 12.7.6
  2. Xcode Clang 15.0: Requires macOS 13+ (Ventura) - not available for Monterey
  3. Result: Cannot get Clang 15 on macOS 12.7.6

Solution: MacPorts Route

Why MacPorts?

  • Homebrew no longer officially supports macOS 12 (Tier 3)
  • MacPorts maintains better backward compatibility with older macOS versions
  • MacPorts compiles QEMU from source with appropriate compiler flags for the system

Implementation Steps

  1. Downloaded MacPorts Installer

  2. Installed MacPorts

    • Ran the .pkg installer via GUI
  3. Updated PATH (if needed)

    export PATH=/opt/local/bin:/opt/local/sbin:$PATH
  4. Updated MacPorts

    sudo port selfupdate
  5. Installed QEMU via MacPorts

    sudo port install qemu
    • This compiled QEMU from source (30-60 minute process)
    • MacPorts handled all compiler compatibility issues
  6. Started Colima Successfully

    colima start --profile worker-2 --cpu 1 --memory 2 --disk 20 --runtime containerd --kubernetes=false

Final Configuration

colima.yaml

cpu: 1
memory: 2
disk: 20
runtime: containerd
vmType: qemu
kubernetes:
  enabled: false

Key Learnings

  1. macOS version compatibility is critical:

    • vz vmType requires macOS 13+
    • Latest Homebrew packages often require newer macOS versions
  2. Homebrew support tiers matter:

    • Tier 3 (macOS 12): Community support only, newer packages may not work
    • Consider MacPorts for older macOS versions
  3. Compiler version dependencies:

    • Modern software often requires newer compilers than available on older OS versions
    • Command Line Tools version is tied to macOS version
  4. Alternative solutions exist:

    • MacPorts provides better backward compatibility
    • Source compilation via MacPorts handles platform-specific issues

Commands Reference

Check System Information

sw_vers                    # macOS version
colima version            # Colima version
clang --version           # Compiler version

File Permissions

ls -la ~/.colima/worker-2/colima.yaml        # Check file permissions
chmod 644 ~/.colima/worker-2/colima.yaml     # Set correct permissions

Colima Management

colima start --profile worker-2              # Start with profile
colima stop --profile worker-2               # Stop profile
colima delete worker-2                       # Delete profile
colima list                                   # List profiles

Conclusion

Successfully configured Colima on macOS 12.7.6 using MacPorts to install QEMU, working around Homebrew's limitations with older macOS versions. The system is now ready to run containers with containerd runtime.

About

Colima + containerd setup guide for macOS 12.7.6 using MacPorts. Solves QEMU compiler issues on legacy Mac hardware when Homebrew fails.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published