Provide clearer errors during image retreival
Description
TL;DR It would be helpful if Colima surfaced errors from curl better or nudged the user to search for an error code in an underlying dependency.
A Colima user I'm helping encountered this error:
time="2024-09-09T16:19:44+05:30" level=fatal msg="error starting vm: error at 'creating and starting': error getting qcow image: error during image download: error downloading 'https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-arm64-docker.qcow2': error retrieving redirect url: error running [curl -ILs -o /dev/null -w %{url_effective} https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-arm64-docker.qcow2], output: \"\", err: \"exit status 60\""
The error message did not readily indicate what happened. The user tried standard troubleshooting steps, as simple as "turn it off and on again," to reconfiguring our company's corporate VPN software (but not including reconfiguring TLS certs…).
I dumbly searched for curl exit status 60 and found that it's curl's invalid TLS certificate chain error. The user will likely fix their problem after correcting our corporate proxy TLS certificates.
If Colima was using a Go HTTP client, that error would propagate upward with a finer-grained error than simply a return code from the exec'd subprocess.
https://github.com/abiosoft/colima/blob/49b2384847436fea0278c14acb1de61249c92ca7/util/downloader/download.go#L135-L138
Another user encountered this problem today.
I had the same problem.
There seems to be a problem downloading the image from github.
In case it happens to anyone else, I solved it this way:
- Download manually the image file using browser: In this case this image
open https://github.com/abiosoft/colima-core/releases/download/v0.8.1/ubuntu-24.04-minimal-cloudimg-amd64-docker.qcow2
- Execute colima start with the downloaded image (using absolute path): For example:
colima start -i ~/Downloads/ubuntu-24.04-minimal-cloudimg-amd64-docker.qcow2
- Done. The next time you run colima start it will work, since the vm is already created.
I hope that this “solution” will be helpful and that it can be solved soon in a definitive way