PORT=${PORT:-10021}
NAME=${NAME:-vm1}
KERNEL=/path/to/linux_v6.17
IMAGE=/path/to/bullseye.img

qemu-system-x86_64 \
  -m 10000 \
  -smp 2,sockets=2,cores=1 \
  -kernel $KERNEL/arch/x86/boot/bzImage \
  -append "console=ttyS0 root=/dev/sda earlyprintk=serial net.ifnames=0" \
  -drive file=$IMAGE,format=raw \
  -net user,host=10.0.2.10,hostfwd=tcp:127.0.0.1:${PORT}-:22 \
  -net nic,model=e1000 \
  -enable-kvm \
  -nographic \
  -pidfile vm.${NAME}.pid \
  -snapshot \
  2>&1 | tee vm.${NAME}.log

