Testbench: 2 KVM Debian nodes w/ Soft RoCE

This commit is contained in:
Zhengyi Chen 2023-11-28 13:48:44 +00:00
parent b4d0749854
commit 7d125a9793
8 changed files with 40 additions and 0 deletions

BIN
test/bzimage/bzImage.0 Normal file

Binary file not shown.

BIN
test/bzimage/bzImage.1 Normal file

Binary file not shown.

2
test/qcow2-img/.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
debian-12-nocloud-amd64.node0.qcow2 filter=lfs diff=lfs merge=lfs -text
debian-12-nocloud-amd64.node1.qcow2 filter=lfs diff=lfs merge=lfs -text

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b55060ccdb33e4108020bcb391872eb29813806b66f9a8cb5dfacce217ff5019
size 377356288

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b55060ccdb33e4108020bcb391872eb29813806b66f9a8cb5dfacce217ff5019
size 377356288

32
test/qemu-linux-node0.sh Executable file
View file

@ -0,0 +1,32 @@
#!/bin/bash
_SCRIPT_DIR=$(dirname -- $0)
# Should have called the directory linux-torvalds, ah well.
# Be careful not to drop serial port driver support!
_KERNEL_DIR="${_SCRIPT_DIR}/bzimage/bzImage.0"
# BusyBox + glibc.
_ROOTFS_DIR="${_SCRIPT_DIR}/rootfs-img/rootfs.ext4.0"
# Number of processes usable by VM.
_SMP=2
printf "Using kernel @ %s\n" $_KERNEL_DIR
printf "Using rootfs @ %s\n" $_ROOTFS_DIR
printf "Press any key to continue...\n"
read -n 1 -r &>/dev/null
qemu-system-x86_64 \
-kernel $_KERNEL_DIR \
-append "root=/dev/vda console=ttyS0 earlyprintk=serial nokaslr" \
-nographic \
-drive file=$_ROOTFS_DIR,if=virtio,index=0,media=disk,format=raw \
-m 512M \
-enable-kvm \
-cpu host \
-smp $_SMP \
-nic bridge,br=virbr0,model=e1000 \
# `-s` enables gdb listening at :1234
# `-S` stops emulator from running unless gdb listens

Binary file not shown.

Binary file not shown.