diff --git a/Dockerfile b/Dockerfile index ed40760..483c9dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN set -x; arch=$(echo ${TARGETARCH} | sed 's/amd/x/g') \ # --- build QEMU and Python venv FROM qemu-build-${TARGETARCH} AS qemu-build -ARG QEMU_VERSION=6.2.0 +ARG QEMU_VERSION=8.1.2 WORKDIR /opt @@ -38,6 +38,7 @@ RUN install_packages \ libfdt-dev \ libglib2.0-dev \ libpixman-1-dev \ + libslirp-dev \ ninja-build \ zlib1g-dev @@ -50,9 +51,9 @@ COPY requirements.txt . RUN pip install -r requirements.txt RUN wget -q https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz \ - && echo "68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45 qemu-${QEMU_VERSION}.tar.xz" | sha256sum -c - \ + && echo "541526a764576eb494d2ff5ec46aeb253e62ea29035d1c23c0a8af4e6cd4f087 qemu-${QEMU_VERSION}.tar.xz" | sha256sum -c - \ && tar -xf qemu-${QEMU_VERSION}.tar.xz && cd qemu-${QEMU_VERSION} \ - && ./configure --target-list=x86_64-softmmu && make -j"$(nproc)" \ + && ./configure --target-list=x86_64-softmmu --enable-slirp && make -j"$(nproc)" \ && make install diff --git a/resources/qemu.robot b/resources/qemu.robot index 740eecf..e941d94 100644 --- a/resources/qemu.robot +++ b/resources/qemu.robot @@ -20,9 +20,9 @@ Run "${image}" with "${memory}" MB memory "${cpus}" cpus and "${serial_port_path Run Keyword And Return If '${result.stdout}' != '0' Run image with KVM enabled Run image with KVM enabled - ${handle} = Start Process qemu-system-x86_64 -device ahci,id\=ahci -drive file\=${image_copy},media\=disk,cache\=none,format\=raw,if\=none,id\=disk -device ide-hd,drive\=disk,bus\=ahci.0 -device virtio-net-pci,netdev\=n1 -netdev \"user,id\=n1,dns\=127.0.0.1,guestfwd\=tcp:10.0.2.100:80-cmd:netcat haproxy 80,guestfwd\=tcp:10.0.2.100:443-cmd:netcat haproxy 443\" -m ${memory} -nographic -machine type\=q35,accel\=kvm -smp ${cpus} -chardev socket,id\=serial0,path\=${serial_port_path},server,nowait -serial chardev:serial0 -bios "/usr/share/ovmf/OVMF.fd" -nodefaults \ shell=yes + ${handle} = Start Process qemu-system-x86_64 -device ahci,id\=ahci -drive file\=${image_copy},media\=disk,cache\=none,format\=raw,if\=none,id\=disk -device ide-hd,drive\=disk,bus\=ahci.0 -device virtio-net-pci,netdev\=n1 -netdev \"user,id\=n1,dns\=127.0.0.1,guestfwd\=tcp:10.0.2.100:80-cmd:netcat haproxy 80,guestfwd\=tcp:10.0.2.100:443-cmd:netcat haproxy 443\" -m ${memory} -nographic -machine type\=q35,accel\=kvm -smp ${cpus} -chardev socket,id\=serial0,path\=${serial_port_path},server=on,wait=off -serial chardev:serial0 -bios "/usr/share/ovmf/OVMF.fd" -nodefaults \ shell=yes Return From Keyword ${handle} Run image with KVM disabled - ${handle} = Start Process qemu-system-x86_64 -device ahci,id\=ahci -drive file\=${image_copy},media\=disk,cache\=none,format\=raw,if\=none,id\=disk -device ide-hd,drive\=disk,bus\=ahci.0 -device virtio-net-pci,netdev\=n1 -netdev \"user,id\=n1,dns\=127.0.0.1,guestfwd\=tcp:10.0.2.100:80-cmd:netcat haproxy 80,guestfwd\=tcp:10.0.2.100:443-cmd:netcat haproxy 443\" -m ${memory} -nographic -machine type\=q35 -smp ${cpus} -chardev socket,id\=serial0,path\=${serial_port_path},server,nowait -serial chardev:serial0 -bios "/usr/share/ovmf/OVMF.fd" -nodefaults \ shell=yes shell=yes + ${handle} = Start Process qemu-system-x86_64 -device ahci,id\=ahci -drive file\=${image_copy},media\=disk,cache\=none,format\=raw,if\=none,id\=disk -device ide-hd,drive\=disk,bus\=ahci.0 -device virtio-net-pci,netdev\=n1 -netdev \"user,id\=n1,dns\=127.0.0.1,guestfwd\=tcp:10.0.2.100:80-cmd:netcat haproxy 80,guestfwd\=tcp:10.0.2.100:443-cmd:netcat haproxy 443\" -m ${memory} -nographic -machine type\=q35 -smp ${cpus} -chardev socket,id\=serial0,path\=${serial_port_path},server=on,wait=off -serial chardev:serial0 -bios "/usr/share/ovmf/OVMF.fd" -nodefaults \ shell=yes shell=yes Return From Keyword ${handle}