colima icon indicating copy to clipboard operation
colima copied to clipboard

Error starting with --network-address

Open liaden opened this issue 2 years ago • 59 comments

Description

Attempting to start --network-address fails. Additional starts without the flag fail with a different error message. Removing ~/.colima allows for a successful start, without the network address.

Version

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

Operating System

  • [ ] macOS Intel
  • [X] macOS M1
  • [ ] Linux

Reproduction Steps

  1. colima start --network-address

Expected behaviour

Colima starts correctly.

Additional context

First start:

INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ...                         context=vm
WARN[0015] error starting network: error at 'preparing network': error running [/opt/homebrew/bin/colima daemon status default], output: "time=\"2022-10-27T09:57:15-04:00\" level=fatal msg=\"pid file not found: stat /Users/joel.johnson/.colima/default/daemon/daemon.pid: no such file or directory\"", err: "exit status 1"  context=vm
INFO[0015] creating and starting ...                     context=vm
WARN[0015] error setting up routable IP address: vmnet ptp socket file not found: stat /Users/joel.johnson/.colima/default/daemon/vmnet.ptp: no such file or directory
> Using cache "/Users/joel.johnson/Library/Caches/lima/download/by-url-sha256/e9bac04e9bdb31be4d3de1506d97eb60d59d9ad1a2d97f2b21f760e06f3e4408/data"
> [hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/joel.johnson/.lima/colima/serial.log")
> SSH Local Port: 57347
> [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/joel.johnson/.lima/colima/ha.stderr.log")
FATA[0017] error starting vm: error at 'creating and starting': exit status 1

ha.stderr.log:

{"level":"debug","msg":"Creating iso file /Users/joel.johnson/.lima/colima/cidata.iso","time":"2022-10-27T09:57:15-04:00"}
{"level":"debug","msg":"Using /var/folders/1n/fvnyc01554s0240g36s382jh6nvfqs/T/diskfs_iso413631167 as workspace","time":"2022-10-27T09:57:15-04:00"}
{"level":"debug","msg":"firmware candidates = [/Users/joel.johnson/.local/share/qemu/edk2-aarch64-code.fd /Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/share/qemu/edk2-aarch64-code.fd /usr/share/AAVMF/AAVMF_CODE.fd /usr/share/qemu-efi-aarch64/QEMU_EFI.fd]","time":"2022-10-27T09:57:17-04:00"}
{"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2022-10-27T09:57:17-04:00"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing [email protected] and [email protected]","time":"2022-10-27T09:57:17-04:00"}
{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see \"/Users/joel.johnson/.lima/colima/serial.log\")","time":"2022-10-27T09:57:17-04:00"}
{"level":"debug","msg":"qCmd.Args: [/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/bin/qemu-system-aarch64 -m 2048 -cpu host -machine virt,accel=hvf,highmem=off -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/share/qemu/edk2-aarch64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/joel.johnson/.lima/colima/basedisk,media=cdrom,readonly=on -drive file=/Users/joel.johnson/.lima/colima/diffdisk,if=virtio,discard=on -cdrom /Users/joel.johnson/.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:57347-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:56:07:0a -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/joel.johnson/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/joel.johnson/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-qmp,path=/Users/joel.johnson/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/joel.johnson/.lima/colima/qemu.pid]","time":"2022-10-27T09:57:17-04:00"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-10-27T09:57:17-04:00"}
{"level":"debug","msg":"qemu[stderr]: time=\"2022-10-27T09:57:17-04:00\" level=fatal msg=\"dial unix /Users/joel.johnson/.colima/default/daemon/gvproxy.sock: connect: no such file or directory\"","time":"2022-10-27T09:57:17-04:00"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-10-27T09:57:17-04:00"}
{"error":"exit status 1","level":"info","msg":"QEMU has exited","time":"2022-10-27T09:57:17-04:00"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/joel.johnson/.lima/_config/user\" -o IdentityFile=\"/Users/joel.johnson/.ssh/id_ed25519\" -o IdentityFile=\"/Users/joel.johnson/.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/joel.johnson/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 57347 127.0.0.1 -- /bin/bash]","time":"2022-10-27T09:57:17-04:00"}
{"level":"debug","msg":"stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 57347: Connection refused\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 57347: Connection refused\\r\\n\": exit status 255","time":"2022-10-27T09:57:17-04:00"}

Second start:

INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ...                         context=vm
WARN[0015] error starting network: error at 'preparing network': error running [/opt/homebrew/bin/colima daemon status default], output: "time=\"2022-10-27T10:01:35-04:00\" level=fatal msg=\"pid file not found: stat /Users/joel.johnson/.colima/default/daemon/daemon.pid: no such file or directory\"", err: "exit status 1"  context=vm
WARN[0015] error setting up routable IP address: vmnet ptp socket file not found: stat /Users/joel.johnson/.colima/default/daemon/vmnet.ptp: no such file or directory
INFO[0015] starting ...                                  context=vm
> Using the existing instance "colima"
> [hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/joel.johnson/.lima/colima/serial.log")
> SSH Local Port: 57370
> [hostagent] QEMU has exited
> exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/joel.johnson/.lima/colima/ha.stderr.log")
FATA[0017] error starting vm: error at 'starting': exit status 1

which is obviously due to the colima.yaml being updated with the --network-address flag.

liaden avatar Oct 27 '22 14:10 liaden

Are you on macOS Ventura as well? If yes, we can close this in favour of https://github.com/abiosoft/colima/issues/457

abiosoft avatar Oct 27 '22 18:10 abiosoft

Can you kindly try with the current development version?

brew install --HEAD colima

abiosoft avatar Oct 29 '22 17:10 abiosoft

@abiosoft I am not on Ventura. It still errors after upgrading. Results are below.

console logging:

TRAC[0000] cmd ["limactl" "info"]
TRAC[0000] cmd ["limactl" "list" "colima" "--json"]
INFO[0000] starting colima
INFO[0000] runtime: docker
TRAC[0000] cmd ["limactl" "list" "colima" "--json"]
INFO[0000] preparing network ...                         context=vm
TRAC[0000] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0000] cmd ["/opt/homebrew/bin/colima" "daemon" "start" "default" "--vmnet" "--gvproxy" "--verbose"]
TRAC[0000] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0003] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0006] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0009] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0012] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0015] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
WARN[0015] error starting network: error at 'preparing network': error running [/opt/homebrew/bin/colima daemon status default], output: "time=\"2022-10-30T12:42:10-04:00\" level=fatal msg=\"pid file not found: stat /Users/joel.johnson/.colima/default/daemon/daemon.pid: no such file or directory\"", err: "exit status 1"  context=vm
WARN[0015] error setting up routable IP address: vmnet socket file not found: stat /Users/joel.johnson/.colima/default/daemon/vmnet.sock: no such file or directory
INFO[0015] starting ...                                  context=vm
TRAC[0015] cmd ["limactl" "start" "colima"]
> Using the existing instance "colima"
> [hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/joel.johnson/.lima/colima/serial.log")
> SSH Local Port: 51585
> [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/joel.johnson/.lima/colima/ha.stderr.log")
FATA[0017] error starting vm: error at 'starting': exit status 1

~/.lima/colima/ha.stderr.log

{"level":"debug","msg":"Creating iso file /Users/joel.johnson/.lima/colima/cidata.iso","time":"2022-10-30T12:42:10-04:00"}
{"level":"debug","msg":"Using /var/folders/1n/fvnyc01554s0240g36s382jh6nvfqs/T/diskfs_iso3203651481 as workspace","time":"2022-10-30T12:42:10-04:00"}
{"level":"debug","msg":"firmware candidates = [/Users/joel.johnson/.local/share/qemu/edk2-aarch64-code.fd /Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/share/qemu/edk2-aarch64-code.fd /usr/share/AAVMF/AAVMF_CODE.fd /usr/share/qemu-efi-aarch64/QEMU_EFI.fd]","time":"2022-10-30T12:42:11-04:00"}
{"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2022-10-30T12:42:11-04:00"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing [email protected] and [email protected]","time":"2022-10-30T12:42:11-04:00"}
{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see \"/Users/joel.johnson/.lima/colima/serial.log\")","time":"2022-10-30T12:42:11-04:00"}
{"level":"debug","msg":"qCmd.Args: [/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/bin/qemu-system-aarch64 -m 2048 -cpu host -machine virt,accel=hvf,highmem=off -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/share/qemu/edk2-aarch64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/joel.johnson/.lima/colima/basedisk,media=cdrom,readonly=on -drive file=/Users/joel.johnson/.lima/colima/diffdisk,if=virtio,discard=on -cdrom /Users/joel.johnson/.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:51585-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:56:07:0a -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/joel.johnson/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/joel.johnson/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-qmp,path=/Users/joel.johnson/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/joel.johnson/.lima/colima/qemu.pid]","time":"2022-10-30T12:42:11-04:00"}
{"level":"debug","msg":"qemu[stderr]: time=\"2022-10-30T12:42:12-04:00\" level=fatal msg=\"error connecting to gvproxy socket: dial unix /Users/joel.johnson/.colima/default/daemon/gvproxy.sock: connect: no such file or directory\"","time":"2022-10-30T12:42:12-04:00"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-10-30T12:42:12-04:00"}
{"error":"exit status 1","level":"info","msg":"QEMU has exited","time":"2022-10-30T12:42:12-04:00"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-10-30T12:42:12-04:00"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/joel.johnson/.lima/_config/user\" -o IdentityFile=\"/Users/joel.johnson/.ssh/id_ed25519\" -o IdentityFile=\"/Users/joel.johnson/.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/joel.johnson/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 51585 127.0.0.1 -- /bin/bash]","time":"2022-10-30T12:42:12-04:00"}

liaden avatar Oct 30 '22 16:10 liaden

This is very strange.

Can you start again with network address to reproduce the error and share the contents of the daemon directory?

ls -lah ~/.colima/default/daemon

abiosoft avatar Oct 31 '22 03:10 abiosoft

ls -lah ~/.colima/default/daemon

total 4.0K
drwxr-xr-x 3 joel.johnson 387623102   96 Oct 30 12:41 .
drwxr-xr-x 4 joel.johnson 387623102  128 Oct 30 12:39 ..
-rw-r--r-- 1 joel.johnson 387623102 1.6K Oct 30 12:41 daemon.log

cat ~/.colima/default/daemon/daemon.log

time="2022-10-30T12:39:30-04:00" level=info msg="- - - - - - - - - - - - - - -"
time="2022-10-30T12:39:30-04:00" level=info msg="daemon started by colima"
time="2022-10-30T12:39:30-04:00" level=info msg="Run `pkill -F /Users/joel.johnson/.colima/default/daemon/daemon.pid` to kill the daemon"
time="2022-10-30T12:39:30-04:00" level=info msg="waiting for clients..."
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
time="2022-10-30T12:39:30-04:00" level=error msg="error starting vmnet: error running vmnet: exit status 1"
time="2022-10-30T12:39:30-04:00" level=info msg="terminate signal received"
time="2022-10-30T12:39:30-04:00" level=fatal msg="context canceled"
time="2022-10-30T12:41:55-04:00" level=info msg="- - - - - - - - - - - - - - -"
time="2022-10-30T12:41:55-04:00" level=info msg="daemon started by colima"
time="2022-10-30T12:41:55-04:00" level=info msg="Run `pkill -F /Users/joel.johnson/.colima/default/daemon/daemon.pid` to kill the daemon"
time="2022-10-30T12:41:55-04:00" level=info msg="waiting for clients..."
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
time="2022-10-30T12:41:55-04:00" level=error msg="error starting vmnet: error running vmnet: exit status 1"
time="2022-10-30T12:41:55-04:00" level=info msg="terminate signal received"
time="2022-10-30T12:41:55-04:00" level=fatal msg="context canceled"

liaden avatar Oct 31 '22 12:10 liaden

Does it prompt you for a password for setting up network? Can you deleted the permission file and the extracted network files, then try again?

sudo rm -r /etc/sudoers.d/colima /opt/colima

abiosoft avatar Nov 01 '22 04:11 abiosoft

It did not prompt me for sudo. It has before, but even after the suggested command, it is not prompting.

liaden avatar Nov 01 '22 19:11 liaden

Oops, I made a typo in the command. I've fixed it now.

abiosoft avatar Nov 01 '22 19:11 abiosoft

Hey can you do one thing.

  1. Just uninstall the colima and docker cli.
  2. remove all .docker , .limb, .colima from the host machine.
  3. install the latest colima and docker-cli usging brew.
  4. colima start --network-address
  5. Above command will prompt you for the password.

Rajendraladkat1919 avatar Nov 07 '22 09:11 Rajendraladkat1919

Reran with the above steps plus removing /etc/sudoers.d/colima and /opt/colima. It failed same as before, but it did prompt for sudo.

STDOUT:

TRAC[0000] cmd ["limactl" "info"]
TRAC[0000] cmd ["limactl" "list" "colima" "--json"]
TRAC[0000] error retrieving running instance: error retrieving instance: unexpected end of JSON input
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ...                         context=vm
INFO[0000] dependencies missing for setting up reachable IP address  context=vm
INFO[0000] sudo password may be required                 context=vm
TRAC[0000] cmd int ["sudo" "mkdir" "-p" "/etc/sudoers.d"]
Password:
TRAC[0008] cmd int ["sudo" "sh" "-c" "cat > /etc/sudoers.d/colima"]
TRAC[0008] cmd int ["sudo" "mkdir" "-p" "/opt/colima"]
TRAC[0008] cmd int ["sudo" "sh" "-c" "cd /opt/colima && tar xfz /var/folders/1n/fvnyc01554s0240g36s382jh6nvfqs/T/vmnet.tar.gz2890914088 2>/dev/null"]
TRAC[0008] cmd int ["sudo" "mkdir" "-p" "/opt/colima/run"]
TRAC[0008] cmd ["ln" "-sf" "/opt/homebrew/bin/colima" "/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/bin/qemu-system-aarch64"]
TRAC[0008] cmd ["ln" "-sf" "/opt/homebrew/bin/colima" "/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/bin/qemu-system-x86_64"]
TRAC[0008] cmd ["ln" "-sf" "/opt/homebrew/share" "/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/share"]
TRAC[0008] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0008] cmd ["/opt/homebrew/bin/colima" "daemon" "start" "default" "--vmnet" "--gvproxy" "--verbose"]
TRAC[0008] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0011] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0014] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0017] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0020] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
TRAC[0023] cmd ["/opt/homebrew/bin/colima" "daemon" "status" "default"]
WARN[0023] error setting up network dependencies: error at 'preparing network': error running [/opt/homebrew/bin/colima daemon status default], output: "time=\"2022-11-10T13:49:37-05:00\" level=fatal msg=\"pid file not found: stat /Users/joel.johnson/.colima/default/daemon/daemon.pid: no such file or directory\"", err: "exit status 1"  context=vm
INFO[0023] creating and starting ...                     context=vm
WARN[0023] error setting up routable IP address: vmnet socket file not found: stat /Users/joel.johnson/.colima/default/daemon/vmnet.sock: no such file or directory
TRAC[0023] cmd ["limactl" "start" "--tty=false" "/var/folders/1n/fvnyc01554s0240g36s382jh6nvfqs/T/colima.yaml"]
> Terminal is not available, proceeding without opening an editor
> "Attempting to download the image from \"https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.4.5-1/alpine-lima-clm-3.16.2-aarch64.iso\"" digest="sha512:a79cdb3de4b297ddbc944f9f5de18ea34697b122facc94c7048324267929c19c4502fee8d2495f11f77867e2629dc721feed487affc96025212b0cccd49b28d1"
> Using cache "/Users/joel.johnson/Library/Caches/lima/download/by-url-sha256/e9bac04e9bdb31be4d3de1506d97eb60d59d9ad1a2d97f2b21f760e06f3e4408/data"
> [hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/joel.johnson/.lima/colima/serial.log")
> SSH Local Port: 64794
> [hostagent] QEMU has exited
> [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
> exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/joel.johnson/.lima/colima/ha.stderr.log")
FATA[0026] error starting vm: error at 'creating and starting': exit status 1

~/.lima/colima/ha.stderr.log

{"level":"debug","msg":"executing [ssh-keygen -t ed25519 -q -N  -f /Users/joel.johnson/.lima/_config/user]","time":"2022-11-10T13:49:38-05:00"}
{"level":"debug","msg":"Creating iso file /Users/joel.johnson/.lima/colima/cidata.iso","time":"2022-11-10T13:49:38-05:00"}
{"level":"debug","msg":"Using /var/folders/1n/fvnyc01554s0240g36s382jh6nvfqs/T/diskfs_iso2155425194 as workspace","time":"2022-11-10T13:49:38-05:00"}
{"level":"debug","msg":"firmware candidates = [/Users/joel.johnson/.local/share/qemu/edk2-aarch64-code.fd /Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/share/qemu/edk2-aarch64-code.fd /usr/share/AAVMF/AAVMF_CODE.fd /usr/share/qemu-efi-aarch64/QEMU_EFI.fd]","time":"2022-11-10T13:49:39-05:00"}
{"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2022-11-10T13:49:39-05:00"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing [email protected] and [email protected]","time":"2022-11-10T13:49:39-05:00"}
{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see \"/Users/joel.johnson/.lima/colima/serial.log\")","time":"2022-11-10T13:49:39-05:00"}
{"level":"debug","msg":"qCmd.Args: [/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/bin/qemu-system-aarch64 -m 2048 -cpu host -machine virt,accel=hvf,highmem=off -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/joel.johnson/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/share/qemu/edk2-aarch64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/joel.johnson/.lima/colima/basedisk,media=cdrom,readonly=on -drive file=/Users/joel.johnson/.lima/colima/diffdisk,if=virtio,discard=on -cdrom /Users/joel.johnson/.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:64794-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:56:07:0a -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/joel.johnson/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/joel.johnson/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-qmp,path=/Users/joel.johnson/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/joel.johnson/.lima/colima/qemu.pid]","time":"2022-11-10T13:49:39-05:00"}
{"level":"debug","msg":"qemu[stderr]: time=\"2022-11-10T13:49:39-05:00\" level=fatal msg=\"error connecting to gvproxy socket: dial unix /Users/joel.johnson/.colima/default/daemon/gvproxy.sock: connect: no such file or directory\"","time":"2022-11-10T13:49:39-05:00"}
{"error":"exit status 1","level":"info","msg":"QEMU has exited","time":"2022-11-10T13:49:39-05:00"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 5: \"ssh\"","time":"2022-11-10T13:49:39-05:00"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2022-11-10T13:49:39-05:00"}

~/.colima/default/daemon/daemon.log

time="2022-11-10T13:49:22-05:00" level=info msg="- - - - - - - - - - - - - - -"
time="2022-11-10T13:49:22-05:00" level=info msg="daemon started by colima"
time="2022-11-10T13:49:22-05:00" level=info msg="Run `pkill -F /Users/joel.johnson/.colima/default/daemon/daemon.pid` to kill the daemon"
time="2022-11-10T13:49:22-05:00" level=info msg="Using search domains: [omada.me omadahealth.net]"
time="2022-11-10T13:49:22-05:00" level=info msg="waiting for clients..."
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
time="2022-11-10T13:49:22-05:00" level=error msg="error starting vmnet: error running vmnet: exit status 1"
time="2022-11-10T13:49:22-05:00" level=info msg="terminate signal received"
time="2022-11-10T13:49:22-05:00" level=fatal msg="context canceled"

liaden avatar Nov 10 '22 18:11 liaden

I have the same issue on Ventura M1. The colima version with --HEAD option colima does start but there is no IP address assigned.

codrutpopescu avatar Nov 11 '22 16:11 codrutpopescu

Here is my daemon.log if it helps:

time="2022-11-11T21:40:10+01:00" level=info msg="- - - - - - - - - - - - - - -"
time="2022-11-11T21:40:10+01:00" level=info msg="daemon started by colima"
time="2022-11-11T21:40:10+01:00" level=info msg="Run `pkill -F /Users/codrut/.colima/oraxe/daemon/daemon.pid` to kill the daemon"
time="2022-11-11T21:40:10+01:00" level=info msg="waiting for clients..."
dyld[41864]: Library not loaded: /opt/colima/lib/libvdeplug.3.dylib
  Referenced from: <E0AE3F70-E540-36C8-9DA8-6846A194A2E7> /opt/colima/bin/vde_vmnet
  Reason: tried: '/opt/colima/lib/libvdeplug.3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64e', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/colima/lib/libvdeplug.3.dylib' (no such file), '/opt/colima/lib/libvdeplug.3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64e', need 'arm64')), '/usr/local/lib/libvdeplug.3.dylib' (no such file), '/usr/lib/libvdeplug.3.dylib' (no such file, not in dyld cache)
time="2022-11-11T21:40:10+01:00" level=error msg="error starting vmnet: error running vmnet: signal: abort trap"
time="2022-11-11T21:40:10+01:00" level=info msg="terminate signal received"
time="2022-11-11T21:40:10+01:00" level=fatal msg="context canceled"

codrutpopescu avatar Nov 11 '22 21:11 codrutpopescu

Reason: tried: '/opt/colima/lib/libvdeplug.3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64e', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/colima/lib/libvdeplug.3.dylib' (no such file), '/opt/colima/lib/libvdeplug.3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64e', need 'arm64')), '/usr/local/lib/libvdeplug.3.dylib' (no such file), '/usr/lib/libvdeplug.3.dylib' (no such file, not in dyld cache)

You just can't run that image, as it has an incompatible architecture, whatever arm64e is.

Really, oracle mysql image isn't going to work for you on an arm64 (mac M1) machine.

rfay avatar Nov 11 '22 21:11 rfay

Sorry, the above error is without installing using --HEAD. I am not using mysql. This is simply colima. Here are the steps:

brew uninstall colima docker docker-compose qemu
brew autoremove
brew cleanup
sudo rm -rf /opt/colima
rm -rf .docker .lima .colima

brew install --HEAD colima docker docker-compose
colima start --arch x86_64 --memory 4 --network-address oraxe

colima list
PROFILE    STATUS     ARCH      CPUS    MEMORY    DISK     RUNTIME    ADDRESS
oraxe      Running    x86_64    2       4GiB      60GiB    docker     

as you can see there is no IP address assigned

cat .colima/oraxe/daemon/daemon.log
time="2022-11-11T22:27:34+01:00" level=info msg="- - - - - - - - - - - - - - -"
time="2022-11-11T22:27:34+01:00" level=info msg="daemon started by colima"
time="2022-11-11T22:27:34+01:00" level=info msg="Run `pkill -F /Users/codrut/.colima/oraxe/daemon/daemon.pid` to kill the daemon"
time="2022-11-11T22:27:34+01:00" level=info msg="waiting for clients..."
on_accept(): vmnet_return_t VMNET_INVALID_ARGUMENT
vmnet_write: Undefined error: 0
time="2022-11-11T22:27:37+01:00" level=info msg="new connection from  to /Users/codrut/.colima/oraxe/daemon/gvproxy.sock"

codrutpopescu avatar Nov 11 '22 21:11 codrutpopescu

Sorry, I did read it wrong, usually this is seen with oracle. But the problem is the same. You seem to be trying to use an architecture arm64e, please change that in your config file to arm64. AFAIK arm64e not even a valid architecture. (I guess I saw "oraexe" and thought I read oracle).

To recreate your situation, rename the .colima folder to .colima.bak and the lima folder to .lima.bak and then go through your process.

rfay avatar Nov 11 '22 21:11 rfay

@altitudedashboard the error you shared should be gone with --HEAD.

Can you try starting with --network-driver slirp and see if it's same behaviour (using the --HEAD version)?

abiosoft avatar Nov 12 '22 02:11 abiosoft

@abiosoft This works! Thank you! Steps followed: clean everything:

brew uninstall qemu lima colima docker docker-compose
brew autoremove
brew cleanup
sudo rm -rf /opt/colima
rm -rf /opt/homebrew/etc/gnutls
rm -rf /opt/homebrew/etc/unbound
rm -rf .lima .colima .docker

starts from scratch:

brew install qemu lima docker docker-compose
mkdir -p ~/.docker/cli-plugins
ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
brew install --HEAD colima
colima start --arch x86_64 --memory 4 --network-driver slirp --network-address oraxe
colima list                                                                         
PROFILE    STATUS     ARCH      CPUS    MEMORY    DISK     RUNTIME    ADDRESS
oraxe      Running    x86_64    2       4GiB      60GiB    docker     192.168.106.2

codrutpopescu avatar Nov 12 '22 05:11 codrutpopescu

The above seems to work intermittently, as today trying to start colima doesn't revel an IP address

codrutpopescu avatar Nov 14 '22 17:11 codrutpopescu

Have the same problem on the latest (13.0.1) macOS and M1.

$ colima stop
$ colima delete -f
$ brew uninstall colima
$ brew autoremove
$ sudo rm -rf .lima .colima /etc/sudoers.d/colima /opt/colima
$ brew install --HEAD colima
$ colima start --network-address
$ colima list
PROFILE    STATUS     ARCH       CPUS    MEMORY    DISK     RUNTIME    ADDRESS
default    Running    aarch64    2       2GiB      60GiB    docker
$ cat ~/.colima/default/daemon/daemon.log
...
on_accept(): vmnet_return_t VMNET_INVALID_ARGUMENT
vmnet_write: Undefined error: 0

Having the same error with all combinations of runtimes and network drivers (--runtime containerd --network-driver slirp, --runtime docker --network-driver slirp, --runtime containerd --network-driver gvproxy, --runtime docker --network-driver gvproxy).

sparhomenko avatar Nov 14 '22 21:11 sparhomenko

just try also with the latest colima version:

brew install --HEAD colima

and also perform a reinstall of qemu after colima as it might fix some bugs

brew reinstall qemu

codrutpopescu avatar Nov 14 '22 21:11 codrutpopescu

@sparhomenko kindly use the --HEAD version. macOS Ventura has broken network address assignment in v0.4.6.

abiosoft avatar Nov 15 '22 02:11 abiosoft

Apologies, I should have mentioned that I was already using HEAD with the latest commit:

$ brew upgrade colima
Warning: colima HEAD-412d01b already installed

Reinstalling qemu also doesn't help (I was actually already doing that as brew autoremove removed qemu and brew install --HEAD colima reinstalled it). Perhaps there are any additional debug logs I can enable to provide more information?

sparhomenko avatar Nov 15 '22 16:11 sparhomenko

Having a similar problem... Clearing and reinstalling/updating (with dependencies) didn't help.

melnyk-viktor avatar Dec 07 '22 01:12 melnyk-viktor

I am also having the same problem, my logs are exactly the same however wiping the directories and reinstalling from HEAD works "intermittently" as described above but to the negative. Meaning: if I blow it all away and start over sometimes it errors out completely and sometimes it starts with no routable IP, I am not able to get a valid IP at all.

godfrey-philip avatar Dec 09 '22 14:12 godfrey-philip

It seems like there may be an issue with the default profile.

If I run the following (profile = main), I can get --network-address to work.

brew remove colima
brew install --HEAD colima
colima delete default
colima start --runtime containerd --network-address main
colima list
PROFILE    STATUS     ARCH       CPUS    MEMORY    DISK     RUNTIME       ADDRESS
main       Running    aarch64    2       2GiB      60GiB    containerd    192.168.106.4

If I don't specify a profile name and start Colima (colima start --runtime containerd --network-address), then it throws this error:

INFO[0000] starting colima
INFO[0000] runtime: containerd
INFO[0000] preparing network ...                         context=vm
WARN[0015] error starting network: error at 'preparing network': error running [/opt/homebrew/bin/colima daemon status default], output: "time=\"2022-12-29T17:29:16-06:00\" level=fatal msg=\"pid file not found: stat /Users/jonathan/.colima/default/daemon/daemon.pid: no such file or directory\"", err: "exit status 1"  context=vm
INFO[0015] creating and starting ...                     context=vm
WARN[0015] error setting up reachable IP address: vmnet socket file not found: stat /Users/jonathan/.colima/default/daemon/vmnet.sock: no such file or directory

jhult avatar Dec 30 '22 00:12 jhult

Hello folks,

Version: Colima Version: HEAD-fe625fb Lima Version: limactl version 0.14.2 Qemu Version: 7.2.0

Operating System macOS Apple M2 (ventura 13.1)

I would like to have some advices to solve the issue about the option --network-address, I have tried all the possibilities, a clean installation and all the stuff described above.

but I'm still getting this information :

  cat .colima/default/daemon/daemon.log
  
  time="2022-11-11T22:27:34+01:00" level=info msg="- - - - - - - - - - - - - - -"
  time="2022-11-11T22:27:34+01:00" level=info msg="daemon started by colima"
  time="2022-11-11T22:27:34+01:00" level=info msg="Run `pkill -F /Users/XXX/.colima/default/daemon/daemon.pid` to kill the daemon"
  time="2022-11-11T22:27:34+01:00" level=info msg="waiting for clients..."
  on_accept(): vmnet_return_t VMNET_INVALID_ARGUMENT
  
  vmnet_write: Undefined error: 0

and no attribution of IP is made.

Thanks in advance.

PARENTELF avatar Jan 03 '23 11:01 PARENTELF

@PARENTELF I am struggling with properly reproducing this as well.

It seems to happen (for me) in one of the following scenarios.

  • Having another virtual machine software running that is utilising vmnet networking, e.g. VMWare, Parallel, UTMApp
  • Changing network connections (wired or wifi)

The main issue is that the behaviour is not consistent, it works most time but when it breaks I am usually unable to resolve it until a macOS restart.

Since you are on macOS 13 Ventura, you can give the VZ driver a try --vm-type vz. While VZ is more experimental, the network address is more stable.

colima delete # required for switching vm types
colima start --vm-type vz --network-address

PS: kindly update to latest head as it includes a fix to a regression introduced in HEAD-fe625fb

abiosoft avatar Jan 03 '23 11:01 abiosoft

Hello thanks for your quick reply,

Colima updated: colima version HEAD-ed49fef

when I add this extra option :--vm-type vz, I fall into the following case:

note: after the installation of colima I have give a restart.

hostagent] [VZ] - vm state change: running
> [hostagent] 2023/01/03 14:54:33 tcpproxy: for incoming conn 127.0.0.1:49378, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: no route
> [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
> [hostagent] 2023/01/03 14:54:43 tcpproxy: for incoming conn 127.0.0.1:49379, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: connection was refused

wich is also related #533

thanks!

PARENTELF avatar Jan 03 '23 13:01 PARENTELF

when I add this extra option :--vm-type vz, I fall into the following case:

note: after the installation of colima I have give a restart.

hostagent] [VZ] - vm state change: running
> [hostagent] 2023/01/03 14:54:33 tcpproxy: for incoming conn 127.0.0.1:49378, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: no route
> [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
> [hostagent] 2023/01/03 14:54:43 tcpproxy: for incoming conn 127.0.0.1:49379, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: connection was refused

@PARENTELF this is not "an issue" except it got stuck. It's due to the VM booting and ssh server not yet running, you can disregard it.

abiosoft avatar Jan 03 '23 14:01 abiosoft

ok thanks,

the problem is persisting:

➜  ~ colima ls
PROFILE    STATUS     ARCH       CPUS    MEMORY    DISK     RUNTIME    ADDRESS
default    Running    x86_64     4       8GiB      60GiB    docker     
main       Running    aarch64    2       2GiB      60GiB    docker     
oraxe      Running    aarch64    2       2GiB      60GiB    docker     
oraxe1     Running    aarch64    2       2GiB      60GiB    docker     
oraxe2     Running    aarch64    2       2GiB      60GiB    docker     

thank you

PARENTELF avatar Jan 03 '23 14:01 PARENTELF