Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <dcassany@suse.com>
  • Loading branch information
davidcassany committed Dec 13, 2024
1 parent 6f2830c commit a327a74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_and_test_x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ 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
- name: Run ${{ matrix.test }}
run: |
make DISK=/tmp/elemental-${{ env.FLAVOR }}.${{ env.ARCH}}.qcow2 ELMNTL_TARGETARCH=${{ env.ARCH }} ELMNTL_FIRMWARE=/usr/share/OVMF/OVMF_CODE.fd ${{ matrix.test }}
make DISK=/tmp/elemental-${{ env.FLAVOR }}.${{ env.ARCH}}.qcow2 ELMNTL_TARGETARCH=${{ env.ARCH }} ELMNTL_FIRMWARE=/usr/share/OVMF/OVMF_CODE_4M.fd ${{ matrix.test }}
- name: Upload serial console for ${{ matrix.test }}
uses: actions/upload-artifact@v4
if: always()
Expand Down Expand Up @@ -282,13 +282,13 @@ 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
- 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
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 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,ipv6=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 @@ -74,11 +74,11 @@ function start {

if [ "${ELMNTL_DEBUG}" == "yes" ]; then
qemu-system-${ELMNTL_TARGETARCH} ${kvm_arg} ${disk_arg} ${cdrom_arg} ${global_arg} ${firmware_arg} \
${usrnet_arg} ${kvm_arg} ${memory_arg} ${graphics_arg} -serial stdio ${pidfile_arg} \
${usrnet_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 a327a74

Please sign in to comment.