Skip to content

Test machine boots in kvm #10

Test machine boots in kvm

Test machine boots in kvm #10

Workflow file for this run

name: Build disk
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/rancher/elemental-toolkit/elemental-cli:v2.0.0
steps:
- name: Install tar
run: zypper install -y tar qemu-tools
- name: Checkout code
uses: actions/checkout@v4
- name: Build disk
uses: frelon/actions/elemental/build-disk@main
with:
name: tangent-x86_64
system: frallan/tangent:v0.1.0
output-dir: build
debug: true
- name: Convert to qcow2
run: qemu-img convert -O qcow2 build/tangent-x86_64.raw build/tangent-x86_64.qcow2
- name: Archive disk
uses: actions/upload-artifact@v4
with:
name: tangent-x86_64.qcow2
path: build/tangent-x86_64.qcow2
test:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Enable KVM group perms
run: |
sudo apt-get update
sudo apt-get install qemu qemu-utils ovmf qemu-system-x86
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: actions/download-artifact@v4
with:
name: tangent-x86_64.qcow2
path: build/tangent-x86_64.qcow2
- name: Start machine
run: |
ls /usr/share/OVMF