abiosoft / colima

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

FATA[0000] error starting vm: error at 'starting': exit status 1 #502

Closed FilipeTeixeira-TomTom closed 1 year ago

FilipeTeixeira-TomTom commented 1 year ago

Description

Just installed colima for the first time and I'm not able to run colima start:

-> % colima start
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ...                         context=vm
INFO[0000] starting ...                                  context=vm
> Using the existing instance "colima"
> "[hostagent] failed to run [system_profiler SPNetworkDataType -json]: stdout=\"\", stderr=\"\": exec: \"system_profiler\": executable file not found in $PATH" fields.level=fatal
> host agent process has exited: exit status 1

Version

Colima Version: 0.4.6 Lima Version: 0.13.0 Qemu Version: 7.1.0

Operating System

Reproduction Steps

  1. brew install docker docker-compose
  2. brew install colima
  3. colima start

Expected behaviour

No response

Additional context

No response

jandubois commented 1 year ago

This is the 2nd time I see a report about this. For some reason /usr/sbin seems to be not on the PATH in some configurations. There is an (unreleased) fix for this in Lima (https://github.com/lima-vm/lima/pull/1226), but for now you should manually add the directory to your PATH before invoking colima/lima.

haexyh commented 1 year ago

I had the same problem and could solve it with: colima delete colima start

sonidhiman commented 1 year ago

Thanks @haexyh , above solution works for me .now colima is running successfully

AriPal commented 1 year ago

I had the same problem and could solve it with: colima delete colima start

Thanks, this worked!

lecorsim commented 9 months ago

same error with qemu, no workaround???

not working just with colima delete & start

Same error log with last 0.6.7 version and HEAD version :

INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0001] starting ...                                  context=vm
> Using the existing instance "colima"
> Starting the instance "colima" with VM driver "qemu"
> QEMU binary "/opt/homebrew/bin/qemu-system-aarch64" seems properly signed with the "com.apple.security.hypervisor" entitlement
> [hostagent] hostagent socket created at /Users/<me>/.colima/_lima/colima/ha.sock
> exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/<me>/.colima/_lima/colima/ha.stderr.log")
FATA[0002] error starting vm: error at 'starting': exit status 1

can't delete too:

INFO[0001] deleting colima
> The qemu driver process seems already stopped
> The host agent process seems already stopped
> Removing /Users/<me>/.colima/_lima/colima under "*.pid *.sock *.tmp"
> Removing "/Users/<me>/.colima/_lima/colima/ha.sock"
> Deleted "colima" ("/Users/<me>/.colima/_lima/colima")
> failed to stop usernet "user-v2": Get "http://lima/services/dhcp/leases": dial unix /Users/<me>/.colima/_lima/_networks/user-v2/user-v2_ep.sock: connect: connection refused
FATA[0002] error during teardown of vm: exit status 1

yesterday it was working. I use the last version of Mac OS 14.2

Guilospanck commented 9 months ago

same error with qemu, no workaround???

not working just with colima delete & start

Same error log with last 0.6.7 version and HEAD version :

INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0001] starting ...                                  context=vm
> Using the existing instance "colima"
> Starting the instance "colima" with VM driver "qemu"
> QEMU binary "/opt/homebrew/bin/qemu-system-aarch64" seems properly signed with the "com.apple.security.hypervisor" entitlement
> [hostagent] hostagent socket created at /Users/<me>/.colima/_lima/colima/ha.sock
> exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/<me>/.colima/_lima/colima/ha.stderr.log")
FATA[0002] error starting vm: error at 'starting': exit status 1

can't delete too:

INFO[0001] deleting colima
> The qemu driver process seems already stopped
> The host agent process seems already stopped
> Removing /Users/<me>/.colima/_lima/colima under "*.pid *.sock *.tmp"
> Removing "/Users/<me>/.colima/_lima/colima/ha.sock"
> Deleted "colima" ("/Users/<me>/.colima/_lima/colima")
> failed to stop usernet "user-v2": Get "http://lima/services/dhcp/leases": dial unix /Users/<me>/.colima/_lima/_networks/user-v2/user-v2_ep.sock: connect: connection refused
FATA[0002] error during teardown of vm: exit status 1

yesterday it was working. I use the last version of Mac OS 14.2

Try:

I'm not sure if all these steps are necessary to work, but I did these things before I got it working and I had the same problem as yours.

kse3hi commented 9 months ago

Still face an issue:

user@comp:~/Developer/SoftwareDefinedVehicle/velocitas-app-java-uprotocol-template/.devcontainer(main⚡) » colima --version
colima version 0.6.7
user@comp:~/Developer/SoftwareDefinedVehicle/velocitas-app-java-uprotocol-template/.devcontainer(main⚡) » colima start    
INFO[0000] starting colima                              
INFO[0000] runtime: docker                              
INFO[0000] creating and starting ...                     context=vm
> 379.75 MiB / 417.00 MiB (91.07%) 15.74 MiB/s
> 417.00 MiB / 417.00 MiB (100.00%) 18.48 MiB/stime="2024-01-02T11:28:18+01:00" level=info msg="Downloaded the image from \"https://github.com/abiosoft/colima-core/releases/download/v0.6.7/ubuntu> [hostagent] hostagent socket created at /Users/kse3hi/.colima/_lima/colima/ha.sock
> [hostagent] Attempting to download UEFI code https://gitlab.com/kraxel/qemu/-/raw/704f7cad5105246822686f65765ab92045f71a3b/pc-bios/edk2-aarch64-code.fd.bz2
> [hostagent] decompressing .bz2 with [bzip2 -d]
> [hostagent] Decompressing data

> [hostagent] 1.51 MiB / 1.51 MiB (100.00%) ? p/s
> [hostagent] Using cache "/Users/kse3hi/Library/Caches/lima/download/by-url-sha256/9d6efeae76809fa9a7d0bd6097f40b30fea2b58f88dfe246d81a00cca4a6f1ad/data"
> [hostagent] Using firmware "/Users/kse3hi/.colima/_lima/colima/qemu-efi-code.fd" (downloaded from "https://gitlab.com/kraxel/qemu/-/raw/704f7cad5105246822686f65765ab92045f71a3b/pc-bios/edk2-aarch64-code.fd.bz2")
> exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/kse3hi/.colima/_lima/colima/ha.stderr.log")
FATA[0031] error starting vm: error at 'creating and starting': exit status 1 

Content of /Users/kse3hi/.colima/_lima/colima/ha.stderr.log:

cat /Users/kse3hi/.colima/_lima/colima/ha.stderr.log                       1 ↵
{"level":"debug","msg":"Creating iso file /Users/kse3hi/.colima/_lima/colima/cidata.iso","time":"2024-01-02T11:28:19+01:00"}
{"level":"debug","msg":"Using /var/folders/7l/tt6l86xx5vv2fj71_cd8hl3r0000gp/T/diskfs_iso698126623 as workspace","time":"2024-01-02T11:28:19+01:00"}
{"level":"debug","msg":"Failed to detect CPU features. Assuming that AES acceleration is available on this Apple silicon.","time":"2024-01-02T11:28:19+01:00"}
{"level":"debug","msg":"OpenSSH version 9.4.1 detected","time":"2024-01-02T11:28:19+01:00"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing aes128-gcm@openssh.com and aes256-gcm@openssh.com","time":"2024-01-02T11:28:19+01:00"}
{"level":"info","msg":"hostagent socket created at /Users/kse3hi/.colima/_lima/colima/ha.sock","time":"2024-01-02T11:28:19+01:00"}
{"level":"debug","msg":"QEMU version 8.2.0 detected","time":"2024-01-02T11:28:19+01:00"}
{"arch":"aarch64","digest":"sha256:a5fc228623891297f2d82e22ea56ec57cde93fea5ec01abf543e4ed5cacaf277","level":"info","location":"https://gitlab.com/kraxel/qemu/-/raw/704f7cad5105246822686f65765ab92045f71a3b/pc-bios/edk2-aarch64-code.fd.bz2","msg":"Attempting to download UEFI code https://gitlab.com/kraxel/qemu/-/raw/704f7cad5105246822686f65765ab92045f71a3b/pc-bios/edk2-aarch64-code.fd.bz2","time":"2024-01-02T11:28:19+01:00"}
{"level":"debug","msg":"file \"/Users/kse3hi/.colima/_lima/colima/qemu-efi-code.fd\" is cached as \"/Users/kse3hi/Library/Caches/lima/download/by-url-sha256/9d6efeae76809fa9a7d0bd6097f40b30fea2b58f88dfe246d81a00cca4a6f1ad/data\"","time":"2024-01-02T11:28:19+01:00"}
{"level":"debug","msg":"Comparing digest \"sha256:a5fc228623891297f2d82e22ea56ec57cde93fea5ec01abf543e4ed5cacaf277\" with the cached digest file \"/Users/kse3hi/Library/Caches/lima/download/by-url-sha256/9d6efeae76809fa9a7d0bd6097f40b30fea2b58f88dfe246d81a00cca4a6f1ad/sha256.digest\", not computing the actual digest of \"/Users/kse3hi/Library/Caches/lima/download/by-url-sha256/9d6efeae76809fa9a7d0bd6097f40b30fea2b58f88dfe246d81a00cca4a6f1ad/data\"","time":"2024-01-02T11:28:19+01:00"}
{"level":"info","msg":"decompressing .bz2 with [bzip2 -d]","time":"2024-01-02T11:28:19+01:00"}
{"level":"info","msg":"Decompressing data\n","time":"2024-01-02T11:28:19+01:00"}

1.51 MiB / 1.51 MiB (100.00%) ? p/s{"level":"debug","msg":"res.ValidatedDigest=true","time":"2024-01-02T11:28:19+01:00"}
{"level":"info","msg":"Using cache \"/Users/kse3hi/Library/Caches/lima/download/by-url-sha256/9d6efeae76809fa9a7d0bd6097f40b30fea2b58f88dfe246d81a00cca4a6f1ad/data\"","time":"2024-01-02T11:28:19+01:00"}
{"level":"info","msg":"Using firmware \"/Users/kse3hi/.colima/_lima/colima/qemu-efi-code.fd\" (downloaded from \"https://gitlab.com/kraxel/qemu/-/raw/704f7cad5105246822686f65765ab92045f71a3b/pc-bios/edk2-aarch64-code.fd.bz2\")","time":"2024-01-02T11:28:19+01:00"}
{"level":"fatal","msg":"template: :1:21: executing \"\" at \u003cfd_connect \"/Users/kse3hi/.colima/_lima/_networks/user-v2/user-v2_qemu.sock\"\u003e: error calling fd_connect: fd_connect: dial unix /Users/kse3hi/.colima/_lima/_networks/user-v2/user-v2_qemu.sock: connect: connection refused","time":"2024-01-02T11:28:19+01:00"}
jppribeiro commented 8 months ago

@Guilospanck's steps worked for me! 👍

jatin-accedo commented 8 months ago

Thanks @Guilospanck steps you mentioned above worked.