abiosoft / colima

Container runtimes on macOS (and Linux) with minimal setup
MIT License
17.75k stars 365 forks source link

How to change colima config default image #995

Open tibbus opened 4 months ago

tibbus commented 4 months ago

Description

I just installed colima on macOS and I have an issue that it cannot download the image when I do "colima start":

    failed to download "https://github.com/abiosoft/colima-core/releases/download/ve.6.8-2/ubuntu-23.1
O-minimal-cloudimg-arm64.qcow2": Get "https://github.com/abiosoft/colima-core/releases/download/v0.6

This is happening because this is a work laptop and due to security reasons, I am not allowed to download it via the Terminal. I can download this file in the browser.

How can I change the colima config to use a local image instead of downloading this one?

I've tried to add something like this to .colima/default/colima.yaml but still wants to download it:

    images:
- location: *./ubuntu-23.10-minimal-cloudimg-amd64. raw°
arch: x86_64°
vmType: 'vz'
mountType: 'virtiofs'

Any ideas?

Version

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

Operating System

Output of colima status

colima is not running

Reproduction Steps

1. 2. 3.

Expected behaviour

No response

Additional context

No response

roman-kiselenko commented 4 months ago

It looks like a bug in colima, the lima handle location property and allow user to specify the img location.

cat ~/.colima/_lima/colima-docker/lima.yaml | grep location
    - location: ~/Downloads/data
➜  ~ colima start docker --edit
INFO[0000] editing in nvim from $EDITOR environment variable
INFO[0002] starting colima [profile=docker]
INFO[0002] runtime: docker
INFO[0003] starting ...                                  context=vm
> Using the existing instance "colima-docker"
> Starting the instance "colima-docker" with VM driver "qemu"
> QEMU binary "/opt/homebrew/bin/qemu-system-aarch64" seems properly signed with the "com.apple.security.hypervisor" entitlement
> "Attempting to download the image" arch=aarch64 digest="sha512:00e3339bdebd98c3e003570ffb3ad4b01630fe4fcecd15061d5d58e14c07b211c718ed20fa3e4cce227d3b1c59fd98241eaa3e9e2cdfa04acfe32b4bc385428c" location="https://github.com/abiosoft/colima-core/releases/download/v0.6.8-2/ubuntu-23.10-minimal-cloudimg-arm64.qcow2"
> Downloading the image (ubuntu-23.10-minimal-cloudimg-arm64.qcow2)

xref https://github.com/lima-vm/lima/issues/2226

roman-kiselenko commented 4 months ago

Related #985 🤔