From: Ralph Ronnquist Date: Mon, 12 Jun 2023 07:47:11 +0000 (+1000) Subject: Fix disk creation bug. X-Git-Tag: good-1~2 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=f5739457558241e16a52c196f43394d145f110f2;p=rrq%2Ftiniest.git Fix disk creation bug. Add vde network option via NET=vde --- diff --git a/vm.sh b/vm.sh index f6304aa..41f024d 100755 --- a/vm.sh +++ b/vm.sh @@ -19,8 +19,18 @@ else 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 @@ -28,6 +38,7 @@ ARGS=( $BOOT -drive index=0,id=disk,media=disk,format=raw,file=disk.raw $DISK2 + $NET ) exec qemu-system-x86_64 ${ARGS[@]}