3 # QEMU setup for trial VM
5 if [ -z "$ISO" ] ; then
6 if [ -z "$EFI" ] ; then
8 DISK2="-drive index=1,id=boot,media=disk,format=raw,file=bootimage.raw"
10 BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd"
11 DISK2="-drive index=1,id=boot,media=disk,format=raw,file=bootimage.raw"
14 if [ -z "$EFI" ] ; then
16 DISK2="-drive index=1,id=boot,media=cdrom,format=raw,file=tiniest.iso"
18 BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd"
19 DISK2="-drive index=1,id=boot,media=disk,format=raw,file=tiniest.iso"
25 #NET="-net nic,macaddr=06:7f:57:5e:c8:92 -net vde,sock=/run/vde.ctl"
26 NET="-net nic,model=e1000 -net vde,sock=/run/vde.ctl"
33 [ -e disk.raw ] || dd if=/dev/zero of=disk.raw bs=1G count=0 seek=8
36 -m 2G -M pc,accel=kvm -cpu host -vga qxl
37 -serial mon:stdio -echr 0x1c # Using ^\ as meta character
39 -drive index=0,id=disk,media=disk,format=raw,file=disk.raw
44 exec qemu-system-x86_64 ${ARGS[@]}