DISK2="-drive index=1,id=boot,media=disk,format=raw,file=tiniest.iso"
fi
fi
-
-[ -d disk.raw ] || dd if=/dev/zero of=disk.raw bs=1G count=0 seek=8
+
+case "$NET" in
+ vde)
+ #NET="-net nic,macaddr=06:7f:57:5e:c8:92 -net vde,sock=/run/vde.ctl"
+ NET="-net nic,model=e1000 -net vde,sock=/run/vde.ctl"
+ ;;
+ *)
+ NET=
+ ;;
+esac
+
+[ -e disk.raw ] || dd if=/dev/zero of=disk.raw bs=1G count=0 seek=8
ARGS=(
-m 2G -M pc,accel=kvm -cpu host -vga qxl
$BOOT
-drive index=0,id=disk,media=disk,format=raw,file=disk.raw
$DISK2
+ $NET
)
exec qemu-system-x86_64 ${ARGS[@]}