colima
colima copied to clipboard
Failed to start colima ssh connection refused
I can't seem to start colima for the first time. Looks like ssh trying to connect on a ephemeral port being refused. But maybe this is a qemu problem. Any insight would be appreciated
lima version 0.8.2 colima version 0.3.2 QEMU emulator version 6.2.0 Mac M1
INFO[0000] starting colima
INFO[0000] creating and starting ... context=vm
> msg="Terminal is not available, proceeding without opening an editor"
> msg="Attempting to download the image from \"https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.3.2/alpine-lima-clm-3.14.3-x86_64.iso\"" digest="sha512:875482176ff2f43bf9472f84137d8b9a56d692ae19243436079c7f2f78cb6b13576601eef9102aaea796629215fc60308e69b590c81fe4139e9e84f1ec4a57f5"
> msg="Using cache \"/Users/kbowerma/Library/Caches/lima/download/by-url-sha256/2001a61186d9a6a460637e4b69dec0b002ea5cffbaeac9ca590771f129e1ab79/data\""
> msg="[hostagent] Starting QEMU (hint: to watch the boot progress, see \"/Users/kbowerma/.lima/colima/serial.log\")"
> msg="SSH Local Port: 49844"
> msg="[hostagent] Waiting for the essential requirement 1 of 5: \"ssh\""
> msg="[hostagent] QEMU has exited"
> msg="exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see \"/Users/kbowerma/.lima/colima/ha.stderr.log\")"
stderror log ...
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-02-09T08:07:55-06:00"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/kbowerma/.lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=kbowerma -o ControlMaster=auto -o ControlPath=\"/Users/kbowerma/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 49844 127.0.0.1 -- /bin/bash]","time":"2022-02-09T08:07:55-06:00"}
{"level":"debug","msg":"stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49844: Connection refused\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49844: Connection refused\\r\\n\": exit status 255","time":"2022-02-09T08:07:55-06:00"}
{"level":"debug","msg":"qemu[stderr]: qemu-system-x86_64: Error: HV_ERROR","time":"2022-02-09T08:07:55-06:00"}
{"error":"signal: abort trap","level":"info","msg":"QEMU has exited","time":"2022-02-09T08:07:55-06:00"}
It seems you have an incorrect version of qemu installed. Most likely an x86 version.
Can you brew uninstall qemu
and reinstall it?
thanks @abiosoft I did that and now I don't have the qemu binary in the path: > msg="[hostagent] exec: \"qemu-system-x86_64\": executable file not found in $PATH" fields.level=fatal
. but qemu shows up in brew list. Hmm, I wonder if I have a problem with brew
thanks @abiosoft I did that and now I don't have the qemu binary in the path:
> msg="[hostagent] exec: \"qemu-system-x86_64\": executable file not found in $PATH" fields.level=fatal
. but qemu shows up in brew list. Hmm, I wonder if I have a problem with brew
yeah, re-install it with brew install qemu
that is what I did, but I dont have a "qemu-system-x86_64" binary now just:
qemu-edid qemu-img qemu-nbd qemu-system-aarch64
qemu-ga qemu-io qemu-storage-daemon
@kbowerma you're on an m1 device, so that is expected.
You probably have your arch set to x86 for your initial colima instance for whatever reason.
Can you colima delete
and colima start
?
If it still fails, explicitly set the arch to aarch64 with colima start --arch aarch64
.
thanks it looks like it can not find aarch64 firmware.
kbowerma@fritz ~ % colima start --arch aarch64
INFO[0000] starting colima
INFO[0000] creating and starting ... context=vm
> msg="Terminal is not available, proceeding without opening an editor"
> msg="Attempting to download the image from \"https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.3.2/alpine-lima-clm-3.14.3-aarch64.iso\"" digest="sha51
> msg="Using cache \"/Users/kbowerma/Library/Caches/lima/download/by-url-sha256/3a75c93f466616135f3435210ad7e4083e511cae199cb9b585dca8fbf245dad0/data\""
> msg="[hostagent] could not find firmware for \"/usr/local/bin/qemu-system-aarch64\"" fields.level=fatal
> msg="host agent process has exited: exit status 1"
FATA[0000] error starting vm: error at 'creating and starting': exit status 1
> msg="[hostagent] could not find firmware for \"/usr/local/bin/qemu-system-aarch64\"" fields.level=fatal > msg="host agent process has exited: exit status 1" FATA[0000] error starting vm: error at 'creating and starting': exit status 1
This is an entirely new error for me. Do you have any other version of qemu installed outside of brew?
Not that I am aware of.
but I did have docker desktop running at the time, so I stopped that and did a reinstall. But now I do see the qemu-system-aarch binary:
qemu-edid qemu-ga qemu-img qemu-io qemu-nbd qemu-storage-daemon qemu-system-aarch64
My Docker Desktop was early M1 trial so I wonder if that has something to do with it.
can you try this to see if qemu is installed via a custom brew tap?
brew tap-info --installed
Doesn't look like it:
heroku/brew: 2 formulae
/usr/local/Homebrew/Library/Taps/heroku/homebrew-brew (29 files, 296.7KB)
From: https://github.com/heroku/homebrew-brew
homebrew/cask: 3959 casks
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (4,069 files, 307.3MB)
From: https://github.com/Homebrew/homebrew-cask
homebrew/core: 3 commands, 5957 formulae
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core (6,327 files, 550.8MB)
From: https://github.com/Homebrew/homebrew-core
This looks similar to the upstream issue https://github.com/lima-vm/lima/issues/543
I have this problem as well, but it also occurs just with limactl start
so I have left information on the upstream issue you posted.
resolved my lima issue and colima is working excellently now — thanks for having developed it!
I'm facing similar issue. Using mac M1, freshly installed colima and docker via brew. Here's the error log output.
{"level":"warning","msg":"local user "mani.kancharla" is not a valid Linux username (must match "^[a-z_][a-z0-9_-]*$"); using "lima" username instead","time":"2022-07-07T12:54:39+05:30"} {"level":"debug","msg":"executing [ssh-keygen -t ed25519 -q -N -f /Users/mani.kancharla/.lima/_config/user]","time":"2022-07-07T12:54:39+05:30"} {"level":"debug","msg":"firmware candidates = [/Users/mani.kancharla/.local/share/qemu/edk2-x86_64-code.fd /Users/mani.kancharla/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd /usr/share/OVMF/OVMF_CODE.fd /usr/share/qemu/ovmf-x86_64-code.bin /usr/share/edk2-ovmf/x64/OVMF_CODE.fd]","time":"2022-07-07T12:54:41+05:30"} {"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2022-07-07T12:54:41+05:30"} {"level":"debug","msg":"AES accelerator seems available, prioritizing [email protected] and [email protected]","time":"2022-07-07T12:54:41+05:30"} {"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see "/Users/mani.kancharla/.lima/colima/serial.log")","time":"2022-07-07T12:54:41+05:30"} {"level":"debug","msg":"qCmd.Args: [/Users/mani.kancharla/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/bin/qemu-system-x86_64 -m 2048 -cpu host -machine q35,accel=hvf -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/mani.kancharla/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/mani.kancharla/.lima/colima/basedisk,media=cdrom,readonly=on -drive file=/Users/mani.kancharla/.lima/colima/diffdisk,if=virtio -cdrom /Users/mani.kancharla/.lima/colima/cidata.iso -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:59734-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:a0:15:8b -device virtio-rng-pci -display none -device virtio-vga -device virtio-keyboard-pci -device virtio-mouse-pci -parallel none -chardev socket,id=char-serial,path=/Users/mani.kancharla/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/mani.kancharla/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-qmp,path=/Users/mani.kancharla/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/mani.kancharla/.lima/colima/qemu.pid]","time":"2022-07-07T12:54:41+05:30"} {"level":"info","msg":"Waiting for the essential requirement 1 of 5: "ssh"","time":"2022-07-07T12:54:41+05:30"} {"level":"debug","msg":"executing script "ssh"","time":"2022-07-07T12:54:41+05:30"} {"level":"debug","msg":"executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/mani.kancharla/.lima/_config/user" -o IdentityFile="/Users/mani.kancharla/.ssh/id_rsa" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^[email protected],[email protected]" -o User=lima -o ControlMaster=auto -o ControlPath="/Users/mani.kancharla/.lima/colima/ssh.sock" -o ControlPersist=5m -p 59734 127.0.0.1 -- /bin/bash]","time":"2022-07-07T12:54:41+05:30"} {"level":"debug","msg":"qemu[stderr]: qemu-system-x86_64: Unknown Error","time":"2022-07-07T12:54:41+05:30"} {"level":"debug","msg":"stdout="", stderr="ssh: connect to host 127.0.0.1 port 59734: Connection refused\r\n", err=failed to execute script "ssh": stdout="", stderr="ssh: connect to host 127.0.0.1 port 59734: Connection refused\r\n": exit status 255","time":"2022-07-07T12:54:41+05:30"} {"error":"exit status 255","level":"info","msg":"QEMU has exited","time":"2022-07-07T12:54:41+05:30"}
I tried reinstalling colima, deleting .lima and .colima folders, everything.
It still fails with error starting vm: error at 'creating and starting': exit status 1
When I try with --arch arch64
I'm getting following log
{"level":"warning","msg":"local user \"mani.kancharla\" is not a valid Linux username (must match \"^[a-z_][a-z0-9_-]*$\"); using \"lima\" username instead","time":"2022-07-07T13:08:10+05:30"}
{"level":"debug","msg":"firmware candidates = [/Users/mani.kancharla/.local/share/qemu/edk2-aarch64-code.fd /Users/mani.kancharla/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-aarch64-code.fd /usr/share/AAVMF/AAVMF_CODE.fd /usr/share/qemu-efi-aarch64/QEMU_EFI.fd]","time":"2022-07-07T13:08:11+05:30"}
{"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2022-07-07T13:08:11+05:30"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing [email protected] and [email protected]","time":"2022-07-07T13:08:11+05:30"}
{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see \"/Users/mani.kancharla/.lima/colima/serial.log\")","time":"2022-07-07T13:08:12+05:30"}
{"level":"debug","msg":"qCmd.Args: [/Users/mani.kancharla/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/bin/qemu-system-aarch64 -m 2048 -cpu cortex-a72 -machine virt,accel=tcg,highmem=off -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/mani.kancharla/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-aarch64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/mani.kancharla/.lima/colima/basedisk,media=cdrom,readonly=on -drive file=/Users/mani.kancharla/.lima/colima/diffdisk,if=virtio -cdrom /Users/mani.kancharla/.lima/colima/cidata.iso -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:56191-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:a0:15:8b -device virtio-rng-pci -display none -vga none -device ramfb -device qemu-xhci,id=usb-bus -device usb-kbd,bus=usb-bus.0 -device usb-mouse,bus=usb-bus.0 -parallel none -chardev socket,id=char-serial,path=/Users/mani.kancharla/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/mani.kancharla/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-qmp,path=/Users/mani.kancharla/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/mani.kancharla/.lima/colima/qemu.pid]","time":"2022-07-07T13:08:12+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:08:12+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:08:12+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:08:12+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:09:27+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:09:37+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:09:37+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:09:37+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:10:52+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:11:02+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:11:02+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:11:02+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:12:17+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:12:27+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:12:27+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:12:27+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:13:42+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:13:52+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:13:52+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:13:52+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:15:07+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:15:17+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:15:17+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:15:17+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:16:32+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:16:42+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:16:42+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:16:42+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:17:57+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:18:07+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:18:07+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:18:07+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:19:22+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:19:32+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:19:32+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:19:32+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:20:47+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:20:57+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:20:57+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:20:57+05:30"}
{"level":"debug","msg":"stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"kex_exchange_identification: read: Connection reset by peer\\r\\nConnection reset by 127.0.0.1 port 56191\\r\\n\": exit status 255","time":"2022-07-07T13:22:13+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-07-07T13:22:23+05:30"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-07-07T13:22:23+05:30"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/mani.kancharla/.lima/_config/user\" -o IdentityFile=\"/Users/mani.kancharla/.ssh/id_rsa\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=lima -o ControlMaster=auto -o ControlPath=\"/Users/mani.kancharla/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 56191 127.0.0.1 -- /bin/bash]","time":"2022-07-07T13:22:23+05:30"}
@KManiKumarReddy you are most likely running x86_64 version of brew and utilising rosetta. You should ensure brew is running on native aarch64.
Likely related to https://github.com/abiosoft/colima/issues/204#issuecomment-1083220386.
Hi, I am trying to install Lima using this confluence steps.I have Mac M1 chip on machine. https://shoprunner.atlassian.net/wiki/spaces/CLO/pages/3148873778/How+to+use+Docker+with+an+Apple+M1+processor. Could you please help me resolving this issue?
Error: colima: Failed to download resource "colima"
Failure while executing; git clone --branch main -c advice.detachedHead=false https://github.com/abiosoft/colima.git /Users/nikhila.janga/Library/Caches/Homebrew/colima--git
exited with 1. Here's the output:
/opt/homebrew/Library/Homebrew/shims/utils.sh: line 73: /opt/homebrew/bin/git: Permission denied
/opt/homebrew/Library/Homebrew/shims/utils.sh: line 73: /opt/homebrew/bin/git: Undefined error: 0
nikhila.janga@m-nikhilaJanga-SR10362 lima_machines % sudo brew install --head colima Password: Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system. nikhila.janga@m-nikhilaJanga-SR10362 lima_machines % lima --version limactl version 0.11.1 nikhila.janga@m-nikhilaJanga-SR10362 lima_machines %
I have same issue too, > [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
[hostagent] QEMU has exited exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/even/.lima/colima/ha.stderr.log") FATA[0000] error starting vm: error at 'creating and starting': exit status 1
ha.stderr.log:
{"comment":"main file \"/Users/even/.lima/colima/lima.yaml\"","error":"[111:1] unknown field \"colimaState\"\n\u003e 111 |#!/usr/bin/env sh\n 112 | \n 113 | FILE=/etc/network/interfaces\n 114 | \n 115 | written() (\n 116 | grep -q \"^auto ${1}\" \"${FILE}\"\n 117 | )\n 118 | \n 119 | vmnet() (\n 120 | IFACE=\"\"\n 121 | \n 122 | if written $IFACE; then exit 0; fi\n 123 | \n 124 | cat \u003e\u003e$FILE \u003c\u003cEOF\n 125 | auto $IFACE\n 126 | iface $IFACE inet dhcp\n 127 | \n 128 | EOF\n 129 | )\n 130 | \n 131 | gvproxy() (\n 132 | IFACE=$(ifconfig -a | grep 'HWaddr 5A:94:EF:5C:64:B9' | awk -F' ' '{print $1}')\n 133 | \n 134 | if written $IFACE; then exit; fi\n 135 | \n 136 | cat \u003e\u003e$FILE \u003c\u003cEOF\n 137 | auto $IFACE\n 138 | iface $IFACE inet static\n 139 | address 192.168.107.2\n 140 | netmask 255.255.255.0\n 141 | gateway 192.168.107.1\n 142 | metric 200\n 143 | \n 144 | EOF\n 145 | )\n 146 | \n 147 | \n 148 | gvproxy\n 149 | service networking restart\n 150 | colimaState: Y3B1OiAyCmRpc2s6IDYwCm1lbW9yeTogMgphcmNoOiB4ODZfNjQKbW91bnRUeXBlOiBzc2hmcwpydW50aW1lOiBkb2NrZXIKa3ViZXJuZXRlczoKICAgIGVuYWJsZWQ6IGZhbHNlCiAgICB2ZXJzaW9uOiB2MS4yMy42K2szczEKICAgIGluZ3Jlc3M6IGZhbHNlCg==\n ^\n","level":"warning","msg":"Non-strict YAML is deprecated and will be unsupported in a future version of Lima","time":"2022-09-23T20:33:21+08:00"}
{"comment":"main file \"/Users/even/.lima/colima/lima.yaml\"","error":"[111:1] unknown field \"colimaState\"\n\u003e 111 | #!/usr/bin/env sh\n 112 | \n 113 | FILE=/etc/network/interfaces\n 114 | \n 115 | written() (\n 116 | grep -q \"^auto ${1}\" \"${FILE}\"\n 117 | )\n 118 | \n 119 | vmnet() (\n 120 | IFACE=\"\"\n 121 | \n 122 | if written $IFACE; then exit 0; fi\n 123 | \n 124 | cat \u003e\u003e$FILE \u003c\u003cEOF\n 125 | auto $IFACE\n 126 | iface $IFACE inet dhcp\n 127 | \n 128 | EOF\n 129 | )\n 130 | \n 131 | gvproxy() (\n 132 | IFACE=$(ifconfig -a | grep 'HWaddr 5A:94:EF:5C:64:B9' | awk -F' ' '{print $1}')\n 133 | \n 134 | if written $IFACE; then exit; fi\n 135 | \n 136 | cat \u003e\u003e$FILE \u003c\u003cEOF\n 137 | auto $IFACE\n 138 | iface $IFACE inet static\n 139 | address 192.168.107.2\n 140 | netmask 255.255.255.0\n 141 | gateway 192.168.107.1\n 142 | metric 200\n 143 | \n 144 | EOF\n 145 | )\n 146 | \n 147 | \n 148 | gvproxy\n 149 | service networking restart\n 150 | colimaState: Y3B1OiAyCmRpc2s6IDYwCm1lbW9yeTogMgphcmNoOiB4ODZfNjQKbW91bnRUeXBlOiBzc2hmcwpydW50aW1lOiBkb2NrZXIKa3ViZXJuZXRlczoKICAgIGVuYWJsZWQ6IGZhbHNlCiAgICB2ZXJzaW9uOiB2MS4yMy42K2szczEKICAgIGluZ3Jlc3M6IGZhbHNlCg==\n ^\n","level":"warning","msg":"Non-strict YAML is deprecated and will be unsupported in a future version of Lima","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"Creating iso file /Users/even/.lima/colima/cidata.iso","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"Using /var/folders/q1/720_n3k53275jq9xrhlyszbm0000gn/T/diskfs_iso2394121710 as workspace","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"firmware candidates = [/Users/even/.local/share/qemu/edk2-x86_64-code.fd /Users/even/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd /usr/share/OVMF/OVMF_CODE.fd /usr/share/qemu/ovmf-x86_64-code.bin /usr/share/edk2-ovmf/x64/OVMF_CODE.fd]","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing [email protected] and [email protected]","time":"2022-09-23T20:33:21+08:00"}
{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see \"/Users/even/.lima/colima/serial.log\")","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"qCmd.Args: [/Users/even/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/bin/qemu-system-x86_64 -m 2048 -cpu host -machine q35,accel=hvf -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/even/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/even/.lima/colima/basedisk,media=cdrom,readonly=on -drive file=/Users/even/.lima/colima/diffdisk,if=virtio -cdrom /Users/even/.lima/colima/cidata.iso -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:49367-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:58:37:cc -device virtio-rng-pci -display none -device virtio-vga -device virtio-keyboard-pci -device virtio-mouse-pci -device qemu-xhci,id=usb-bus -parallel none -chardev socket,id=char-serial,path=/Users/even/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/even/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-qmp,path=/Users/even/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/even/.lima/colima/qemu.pid]","time":"2022-09-23T20:33:21+08:00"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/even/.lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^[email protected],[email protected]\" -o User=even -o ControlMaster=auto -o ControlPath=\"/Users/even/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 49367 127.0.0.1 -- /bin/bash]","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49367: Connection refused\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49367: Connection refused\\r\\n\": exit status 255","time":"2022-09-23T20:33:21+08:00"}
{"level":"debug","msg":"qemu[stderr]: qemu-system-x86_64: Error: HV_ERROR","time":"2022-09-23T20:33:21+08:00"}
{"error":"exit status 255","level":"info","msg":"QEMU has exited","time":"2022-09-23T20:33:21+08:00"}
FYI, I am using an AMD x86_64 hackintosh, and I can start qumu by $(which qemu-system-x86_64) successfully.
@evenlee it shows Error: HV_ERROR
, most likely your hackintosh does not have HVF virtualisation enabled.
For now, you can install the development version to get rid of the warnings brew install --head colima
. The fix will be part of the next release.
@evenlee it shows
Error: HV_ERROR
, most likely your hackintosh does not have HVF virtualisation enabled.For now, you can install the development version to get rid of the warnings
brew install --head colima
. The fix will be part of the next release.
Thanks for your advice @abiosoft, I uninstalled Colima from brew, and re-installed with --head parameter, but still got same error.
Same issue :( could anyone solve it?
Same issue :( could anyone solve it?
@elramirezv are you on M1 device? If yes, have you confirmed you have the arm64 version of brew installed?
Same issue :( could anyone solve it?
@elramirezv are you on M1 device? If yes, have you confirmed you have the arm64 version of brew installed?
@abiosoft Yes, im using a M1. Mmmmm not really sure what version i have installed, but this is my brew config
HOMEBREW_VERSION: 3.6.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: 978a452ea7ccdff1ed7377f88add3ff0513ba2b7
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 76200ff370469c6f5f8d1a1684ff259cf9337ac6
Core tap last commit: 26 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.32.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.6-arm64
CLT: 14.0.0.0.1.1661618636
Xcode: 13.4.1
Rosetta 2: false
I have the same issue with m1 device 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] Starting QEMU SSH Local Port: 57687 [hostagent] Waiting for the essential requirement 1 of 5: "ssh" [hostagent] QEMU has exited exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} FATA[0001] error starting vm: error at 'starting': exit status 1
Same problem, different cause and solution.
It was nothing to do with the architecture mismatch for me, but rather brew sources. I ran brew upgrade
, and had the same errors as above afterwards. I tried everything mentioned here, and in other tickets (there are dupes in the upstream lima project).
Solution for me in the end was:
brew uninstall --zap qemu colima lima
brew upgrade
brew update
brew upgrade
brew install colima
Basically just out of date formula after an upgrade, though this shouldn't have been possible.
Hit the same issue with my M1 Max: ERROR: sshd failed to start
!
What I have tried so far:
-
rm -rf ~/.lima
- Reinstalled all components from Brew
-
colima start --cpu 1 --disk 10 --memory 1 --cpu-type max --arch aarch64 --ssh-agent
-
colima start --cpu 1 --disk 5 --memory 1 --mount-type virtiofs --vm-type vz --ssh-agent
Error seems to be persist:
tail -f ~/.lima/colima/serial*.log
==> /Users/furkan/.lima/colima/serial.log <==
[ 1.307130] usb 1-2: Manufacturer: QEMU
[ 1.307518] usb 1-2: SerialNumber: 89126-0000:00:04.0-2
[ 2.980095] Loading user settings from /media/vda/alpine.apkovl.tar.gz: ok.
[ 2.995886] Installing packages to root filesystem...
[ 4.080902] Installing packages to root filesystem: ok.
Welcome to Alpine Linux 3.18
Kernel 6.1.29-0-virt on an aarch64 (/dev/ttyAMA0)
colima login:
==> /Users/furkan/.lima/colima/serialp.log <==
ssh-keygen: generating new host keys: RSA Saving key "/etc/ssh/ssh_host_rsa_key.XXXXdhGAmL" failed: No space left on device
ssh-keygen: generating new host keys: ECDSA Saving key "/etc/ssh/ssh_host_ecdsa_key.XXXXKceoPN" failed: No space left on device
ssh-keygen: generating new host keys: ED25519 Saving key "/etc/ssh/ssh_host_ed25519_key.XXXXjHgfaN" failed: No space left on device
/lib/rc/sh/openrc-run.sh: line 118: /usr/sbin/sshd: not found
* ERROR: sshd failed to start
Welcome to Alpine Linux 3.18
Kernel 6.1.29-0-virt on an aarch64 (/dev/ttyS0)
colima login:
==> /Users/furkan/.lima/colima/serialv.log <==
But it works as expected without ssh
:
$ colima start debug
INFO[0000] starting colima [profile=debug]
INFO[0000] runtime: docker
INFO[0000] preparing network ... context=vm
INFO[0000] creating and starting ... context=vm
INFO[0023] provisioning ... context=docker
INFO[0024] starting ... context=docker
INFO[0031] done
It also works by just passing --ssh-agent
flag.
colima start --ssh-agent
Just re-tried to run colima start --ssh-agent
today and --ssh-agent
does not work. It seems there is slight inconsistency with that flag. colima start debug
still does work.