Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <[email protected]>
  • Loading branch information
davidcassany committed Dec 12, 2024
1 parent 6f2830c commit 7fb7acb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build_and_test_x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ jobs:
- name: Enable KVM group perms
run: |
sudo apt-get update
sudo apt-get install qemu-system qemu-utils ovmf qemu-system-x86
sudo apt-get install 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
Expand Down Expand Up @@ -281,14 +281,20 @@ jobs:
fail-on-cache-miss: true
- name: Enable KVM group perms
run: |
ls /dev/kvm -alh
sudo apt-get update
sudo apt-get install qemu-system qemu-utils ovmf qemu-system-x86
sudo apt-get install qemu-utils ovmf qemu-system-x86 bridge-utils
ls /dev/kvm -alh
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
sudo udevadm settle
ls /dev/kvm -alh
- name: Run installer test
run: |
make ISO=/tmp/elemental-${{ env.FLAVOR }}.${{ env.ARCH}}.iso ELMNTL_TARGETARCH=${{ env.ARCH }} ELMNTL_FIRMWARE=/usr/share/OVMF/OVMF_CODE.fd test-installer
ip addr show
ELMNTL_DEBUG=yes make ISO=/tmp/elemental-${{ env.FLAVOR }}.${{ env.ARCH}}.iso ELMNTL_TARGETARCH=${{ env.ARCH }} ELMNTL_FIRMWARE=/usr/share/OVMF/OVMF_CODE_4M.fd prepare-installer-test
make ISO=/tmp/elemental-${{ env.FLAVOR }}.${{ env.ARCH}}.iso ELMNTL_TARGETARCH=${{ env.ARCH }} ELMNTL_FIRMWARE=/usr/share/OVMF/OVMF_CODE_4M.fd test-installer
- name: Upload serial console for installer tests
uses: actions/upload-artifact@v4
if: always()
Expand Down
8 changes: 4 additions & 4 deletions scripts/run_vm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -x

set -e

Expand Down Expand Up @@ -29,7 +29,7 @@ function _abort {

function start {
local base_disk=$1
local usrnet_arg="-netdev user,id=user0,hostfwd=tcp:${ELMNTL_FWDIP}:${ELMNTL_FWDPORT}-:22 -device virtio-net-pci,romfile=,netdev=user0"
local usrnet_arg="-netdev user,id=user0,restrict=off,hostfwd=tcp::${ELMNTL_FWDPORT}-:22 -device virtio-net-pci,romfile=,netdev=user0"
local accel_arg
local memory_arg="-m ${ELMNTL_MEMORY}"
local firmware_arg="-drive if=pflash,format=raw,unit=0,readonly=on,file=${ELMNTL_FIRMWARE}"
Expand Down Expand Up @@ -73,12 +73,12 @@ function start {
[ "kvm" == "${ELMNTL_ACCEL}" ] && cpu_arg="-cpu host" && kvm_arg="-enable-kvm"

if [ "${ELMNTL_DEBUG}" == "yes" ]; then
qemu-system-${ELMNTL_TARGETARCH} ${kvm_arg} ${disk_arg} ${cdrom_arg} ${global_arg} ${firmware_arg} \
qemu-system-${ELMNTL_TARGETARCH} ${disk_arg} ${cdrom_arg} ${global_arg} ${firmware_arg} \
${usrnet_arg} ${kvm_arg} ${memory_arg} ${graphics_arg} -serial stdio ${pidfile_arg} \
${display_arg} ${machine_arg} ${accel_arg} ${cpu_arg}
else
qemu-system-${ELMNTL_TARGETARCH} ${kvm_arg} ${disk_arg} ${cdrom_arg} ${global_arg} ${firmware_arg} \
${usrnet_arg} ${kvm_arg} ${memory_arg} ${graphics_arg} ${serial_arg} ${pidfile_arg} \
${usrnet_arg} ${memory_arg} ${graphics_arg} ${serial_arg} ${pidfile_arg} \
${display_arg} ${machine_arg} ${accel_arg} ${cpu_arg} > ${ELMNTL_VMSTDOUT} 2>&1 &
fi
}
Expand Down

0 comments on commit 7fb7acb

Please sign in to comment.