#!/usr/bin/env bash
cd /srv/jenkins/agent/workspace/base-test-kali-rolling-installer-amd64-preseed/
sudo qemu-system-x86_64 -display vnc=localhost:0 -audio none -enable-kvm -cpu host -m 2048 -cdrom /srv/jenkins/agent/workspace/base-test-kali-rolling-installer-amd64-preseed/kali-linux-rolling-installer-amd64.iso -drive file=/srv/jenkins/agent/workspace/base-test-kali-rolling-installer-amd64-preseed/qemu/base-test-kali-rolling-installer-amd64-preseed.raw,format=raw,index=0,media=disk,cache=unsafe -boot order=cd -boot once=d -nic user,host=10.0.2.1,dhcpstart=10.0.2.2,dns=10.0.2.254
ret=0
echo [i] qemu-system-x86_64 quit: ${ret}
[ ${ret} = 0 ] && touch /srv/jenkins/agent/workspace/base-test-kali-rolling-installer-amd64-preseed/qemu/qemu.done
