diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07febe0..4877c12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,7 +131,7 @@ jobs: if: always() uses: crazy-max/ghaction-dump-context@v2 - colima-start-args: + lima-start-args: runs-on: macos-latest steps: - @@ -141,7 +141,7 @@ jobs: name: Set up Docker uses: ./ env: - COLIMA_START_ARGS: --cpu 4 --memory 8 --disk 32 --dns 1.1.1.1 --dns 8.8.8.8 --dns-host example.com=1.2.3.4 + LIMA_START_ARGS: --cpus 4 --memory 8 build-linux: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 91c9f98..255c54a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ ___ * [Usage](#usage) * [Quick start](#quick-start) * [Daemon configuration](#daemon-configuration) - * [Define custom `colima start` arguments (macOS)](#define-custom-colima-start-arguments-macos) + * [Define custom `limactl start` arguments (macOS)](#define-custom-limactl-start-arguments-macos) * [Customizing](#customizing) * [inputs](#inputs) * [Contributing](#contributing) @@ -71,10 +71,10 @@ jobs: } ``` -### Define custom `colima start` arguments (macOS) +### Define custom `limactl start` arguments (macOS) -You can define custom [`colima start` arguments](https://github.com/abiosoft/colima#customizing-the-vm) -using the `COLIMA_START_ARGS` environment variable to customize the VM: +You can define custom [`limactl start` arguments](https://lima-vm.io/docs/reference/limactl_start/) +using the `LIMA_START_ARGS` environment variable to customize the VM: ```yaml name: ci @@ -90,14 +90,14 @@ jobs: name: Set up Docker uses: crazy-max/ghaction-setup-docker@v2 env: - COLIMA_START_ARGS: --cpu 4 --memory 8 --disk 32 + LIMA_START_ARGS: --cpus 4 --memory 8 ``` ## Customizing ### inputs -Following inputs can be used as `step.with` keys +The following inputs can be used as `step.with` keys | Name | Type | Default | Description | |-----------------|--------|-----------------------|-----------------------------------------------------------------------------------------------------------------------------| diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md deleted file mode 100644 index 1b2b2dc..0000000 --- a/TROUBLESHOOTING.md +++ /dev/null @@ -1,56 +0,0 @@ -# Troubleshooting - -## macOS: `qemu[stderr]: qemu-system-x86_64: Unknown Error` - -Colima may fail to start with the following error: - -``` -time="2023-08-26T06:30:33Z" level=info msg="[hostagent] Starting QEMU (hint: to watch the boot progress, see \"/Users/runner/.lima/colima/serial*.log\")" -time="2023-08-26T06:30:34Z" level=info msg="SSH Local Port: 49209" -time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 3: \"ssh\"" -time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Driver stopped due to error: \"exit status 255\"" -time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Shutting down the host agent" -time="2023-08-26T06:30:34Z" level=warning msg="[hostagent] failed to exit SSH master" -time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Shutting down QEMU with ACPI" -time="2023-08-26T06:30:34Z" level=warning msg="[hostagent] failed to open the QMP socket \"/Users/runner/.lima/colima/qmp.sock\", forcibly killing QEMU" -time="2023-08-26T06:30:34Z" level=info msg="[hostagent] QEMU has already exited" -time="2023-08-26T06:30:34Z" level=fatal msg="exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see \"/Users/runner/.lima/colima/ha.stderr.log\")" -time="2023-08-26T06:30:34Z" level=fatal msg="error starting vm: error at 'creating and starting': exit status 1" -``` - -``` -{"level":"debug","msg":"executing [ssh-keygen -t ed25519 -q -N -f /Users/runner/.lima/_config/user]","time":"2023-08-26T07:16:40Z"} -{"level":"debug","msg":"Creating iso file /Users/runner/.lima/colima/cidata.iso","time":"2023-08-26T07:16:41Z"} -{"level":"debug","msg":"Using /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/diskfs_iso3418167253 as workspace","time":"2023-08-26T07:16:41Z"} -{"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2023-08-26T07:16:41Z"} -{"level":"debug","msg":"AES accelerator seems available, prioritizing aes128-gcm@openssh.com and aes256-gcm@openssh.com","time":"2023-08-26T07:16:41Z"} -{"level":"debug","msg":"QEMU version 8.0.4 detected","time":"2023-08-26T07:16:43Z"} -{"level":"debug","msg":"firmware candidates = [/Users/runner/.local/share/qemu/edk2-x86_64-code.fd /Users/runner/.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":"2023-08-26T07:16:43Z"} -{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see \"/Users/runner/.lima/colima/serial*.log\")","time":"2023-08-26T07:16:43Z"} -{"level":"debug","msg":"qCmd.Args: [/Users/runner/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/bin/qemu-system-x86_64 -m 2048 -cpu host,-pdpe1gb -machine q35,accel=hvf -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/runner/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/runner/.lima/colima/basedisk,format=raw,media=cdrom,readonly=on -drive file=/Users/runner/.lima/colima/diffdisk,if=virtio,discard=on -drive id=cdrom0,if=none,format=raw,readonly=on,file=/Users/runner/.lima/colima/cidata.iso -device virtio-scsi-pci,id=scsi0 -device scsi-cd,bus=scsi0.0,drive=cdrom0 -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:49168-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:be:6e:dd -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/runner/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/runner/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-serial-virtio,path=/Users/runner/.lima/colima/serialv.sock,server=on,wait=off,logfile=/Users/runner/.lima/colima/serialv.log -device virtio-serial-pci,id=virtio-serial0,max_ports=1 -device virtconsole,chardev=char-serial-virtio,id=console0 -virtfs local,mount_tag=mount0,path=/Users/runner,security_model=none -virtfs local,mount_tag=mount1,path=/tmp/colima,security_model=none -chardev socket,id=char-qmp,path=/Users/runner/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/runner/.lima/colima/qemu.pid]","time":"2023-08-26T07:16:43Z"} -{"level":"info","msg":"Waiting for the essential requirement 1 of 3: \"ssh\"","time":"2023-08-26T07:16:43Z"} -{"level":"debug","msg":"executing script \"ssh\"","time":"2023-08-26T07:16:43Z"} -{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/runner/.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=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=runner -o ControlMaster=auto -o ControlPath=\"/Users/runner/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 49168 127.0.0.1 -- /bin/bash]","time":"2023-08-26T07:16:43Z"} -{"level":"debug","msg":"stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49168: Connection refused\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49168: Connection refused\\r\\n\": exit status 255","time":"2023-08-26T07:16:43Z"} -{"level":"debug","msg":"qemu[stderr]: qemu-system-x86_64: Unknown Error","time":"2023-08-26T07:16:43Z"} -{"level":"info","msg":"Driver stopped due to error: \"exit status 255\"","time":"2023-08-26T07:16:43Z"} -{"level":"info","msg":"Shutting down the host agent","time":"2023-08-26T07:16:44Z"} -{"level":"debug","msg":"shutting down the SSH master","time":"2023-08-26T07:16:44Z"} -{"level":"debug","msg":"executing ssh for exiting the master: /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/runner/.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=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=runner -o ControlMaster=auto -o ControlPath=\"/Users/runner/.lima/colima/ssh.sock\" -o ControlPersist=5m -O exit -p 49168 127.0.0.1]","time":"2023-08-26T07:16:44Z"} -{"error":"failed to execute `ssh -O exit -p 49168 127.0.0.1`, out=\"Control socket connect(/Users/runner/.lima/colima/ssh.sock): No such file or directory\\r\\n\": exit status 255","level":"warning","msg":"failed to exit SSH master","time":"2023-08-26T07:16:44Z"} -{"level":"info","msg":"Shutting down QEMU with ACPI","time":"2023-08-26T07:16:44Z"} -{"error":"dial unix /Users/runner/.lima/colima/qmp.sock: connect: connection refused","level":"warning","msg":"failed to open the QMP socket \"/Users/runner/.lima/colima/qmp.sock\", forcibly killing QEMU","time":"2023-08-26T07:16:44Z"} -{"level":"info","msg":"QEMU has already exited","time":"2023-08-26T07:16:44Z"} -``` - -To fix this issue you can replace the existing signature of QEMU binary with -the required entitlements as suggested in https://github.com/abiosoft/colima/issues/786#issuecomment-1693629650. -This can be done within this action by setting the env var `SIGN_QEMU_BINARY=1`: - -```yaml - - - name: Set up Docker - uses: crazy-max/ghaction-setup-docker@v2 - env: - SIGN_QEMU_BINARY: 1 -```