Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colima does not start on Github actions Ubuntu runner #696

Closed
1 of 5 tasks
cristianrgreco opened this issue Apr 17, 2023 · 5 comments
Closed
1 of 5 tasks

Colima does not start on Github actions Ubuntu runner #696

cristianrgreco opened this issue Apr 17, 2023 · 5 comments

Comments

@cristianrgreco
Copy link

Description

I run Colima without issue on my local Ubuntu machine.

I am trying to create a Github actions pipeline using Colima on a Ubuntu runner, but it does not start. It times out with the message "[hostagent] Waiting for the essential requirement 1 of 5: \"ssh\""

The step is simply this:

- name: Setup Colima
  run: |
    curl -L https://nixos.org/nix/install | sh -s -- --daemon
    nix-env -iA nixpkgs.colima
    colima start --runtime docker

Is there some example of Colima running on Linux in Github actions? I've tried several different things from other issues (such as installing qemu, different cpu types, etc), but nothing works.

I'm able to run it on macos, but the performance of the macos machines in GHA is terrible. The build takes on average 3x longer than on a linux machine.

Any help greatly appreciated.

Version

Colima Version: 0.5.4
Lima Version: 0.15.0
Qemu Version: 7.2.1

Operating System

  • macOS Intel <= 12 (Monterrey)
  • macOS Intel >= 13 (Ventura)
  • macOS M1 <= 12 (Monterrey)
  • macOS M1 >= 13 (Ventura)
  • Linux

Output of colima status

N/A, cannot start.

Reproduction Steps

  1. Create a github action with the YAML in the description.

Expected behaviour

Colima should start.

Additional context

No response

@abiosoft
Copy link
Owner

@cristianrgreco can you use the --verbose flag and check the logs?

@abiosoft
Copy link
Owner

Is virtualization enabled by default on Github actions for Linux?
e.g. on Github codespaces, I either need to add the user to the kvm group or modify the permissions on /dev/kvm.

@cristianrgreco
Copy link
Author

Thanks for your reply @abiosoft. This is the output when providing --very-verbose:

time="2023-04-18T17:52:01Z" level=trace msg="cmd [\"limactl\" \"info\"]"
time="2023-04-18T17:52:01Z" level=trace msg="cmd [\"limactl\" \"list\" \"colima\" \"--json\"]"
time="2023-04-18T17:52:01Z" level=trace msg="error retrieving running instance: instance 'colima' does not exist"
time="2023-04-18T17:52:01Z" level=info msg="starting colima"
time="2023-04-18T17:52:01Z" level=info msg="runtime: docker"
time="2023-04-18T17:52:01Z" level=info msg="creating and starting ..." context=vm
time="2023-04-18T17:52:01Z" level=trace msg="cmd [\"limactl\" \"start\" \"--tty=false\" \"/tmp/colima.yaml\"]"
time="2023-04-18T17:52:01Z" level=info msg="Terminal is not available, proceeding without opening an editor"
time="2023-04-18T17:52:01Z" level=info msg="Attempting to download the image from \"[https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.5.0-2/alpine-lima-clm-3.16.2-x86_64.iso\](https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.5.0-2/alpine-lima-clm-3.16.2-x86_64.iso/)"" digest="sha512:e9e118498f3a0745574ffc3686105d2c9777f7142164fe50ee47909dabd504c80ac29aeb76f9582706173310d1488d3b6f0ee9018e2a6aadc28eefb7767b63ec"
290.00 MiB / 290.00 MiB (100.00%) ? p/stime="2023-04-18T17:52:03Z" level=info msg="Downloaded the image from \"[https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.5.0-2/alpine-lima-clm-3.16.2-x86_64.iso\](https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.5.0-2/alpine-lima-clm-3.16.2-x86_64.iso/)""
time="2023-04-18T17:52:05Z" level=info msg="[hostagent] Starting QEMU (hint: to watch the boot progress, see \"/home/runner/.lima/colima/serial.log\")"
time="2023-04-18T17:52:05Z" level=info msg="SSH Local Port: 33367"
time="2023-04-18T17:52:06Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 5: \"ssh\""
time="2023-04-18T17:52:06Z" level=info msg="[hostagent] Driver stopped due to error: \"exit status 1\""
time="2023-04-18T17:52:06Z" level=info msg="[hostagent] Shutting down the host agent"
time="2023-04-18T17:52:06Z" level=warning msg="[hostagent] failed to exit SSH master"
time="2023-04-18T17:52:06Z" level=info msg="[hostagent] Shutting down QEMU with ACPI"
time="2023-04-18T17:52:06Z" level=warning msg="[hostagent] failed to open the QMP socket \"/home/runner/.lima/colima/qmp.sock\", forcibly killing QEMU"
time="2023-04-18T17:52:06Z" level=warning msg="[hostagent] failed to kill QEMU"
time="2023-04-18T17:52:16Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 5: \"ssh\""
time="2023-04-18T17:52:26Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 5: \"ssh\""
time="2023-04-18T17:52:36Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 5: \"ssh\""

I've just looked into whether GHA Linux runners support nested virtualisation, it seems only the larger ones are capable as of 2 months ago: https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/

Does this mean that Colima cannot run on the normal Linux runners?

@abiosoft
Copy link
Owner

Does this mean that Colima cannot run on the normal Linux runners?

Yeah, colima utilises VMs on Linux as well.

@cristianrgreco
Copy link
Author

Hopefully in the future GH will either fix the performance of their MacOS runners, or support nested virtualisation on their normal runners.

Thanks for your time @abiosoft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants