From d31102a59820997f4b17ab344344c3f2ae845618 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Sat, 26 Jul 2025 20:59:00 +1000 Subject: [PATCH] build: Attempt to start libvirt daemon in container --- .gitea/workflows/actions.yaml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/actions.yaml b/.gitea/workflows/actions.yaml index 8513de0..f0a5ea3 100644 --- a/.gitea/workflows/actions.yaml +++ b/.gitea/workflows/actions.yaml @@ -54,6 +54,12 @@ jobs: run: | mkdir -p \ ubuntu-vm + - name: Assert source Ubuntu ISO + run: | + # TODO: Make this path configurable in a yaml file + [[ ! -f '/iso/Canonical/Ubuntu Server 24.04/ubuntu-24.04.2-desktop-amd64.iso' ]] || { + echo 'Missing source iso file - exiting'; exit 1 + } - name: Generate seed ISO run: | apt-get update && \ @@ -72,12 +78,6 @@ jobs: env: ROOT_HASHED_PASSWORD: ${{ secrets.ROOT_HASHED_PASSWORD }} PUBLIC_SSHKEY: ${{ secrets.PUBLIC_SSHKEY }} - - name: Assert source Ubuntu ISO - run: | - # TODO: Make this path configurable in a yaml file - [[ ! -f '/iso/Canonical/Ubuntu Server 24.04/ubuntu-24.04.2-desktop-amd64.iso' ]] || { - echo 'Missing source iso file - exiting'; exit 1 - } - name: Create empty QCOW2 disk run: | apt-get update && \ @@ -86,10 +86,19 @@ jobs: qemu-img create -f qcow2 ubuntu-vm/ubuntu.qcow2 10G - name: Run virt-install + # container: quay.io/kubevirt/libvirt run: | apt-get update && \ apt-get install -y \ - virtinst + libvirt-daemon-system \ + libvirt-clients \ + virtinst \ + qemu-utils + + libvirtd -d + + ps aux | grep libvirtd + ls -l /var/run/libvirt/libvirt-sock virt-install \ --name ubuntu-harvester \