- ls $bios >/dev/null 2>&1 || bios=/usr/share/ovmf/OVMF.fd
- ls $helper >/dev/null 2>&1 || helper=/usr/lib/qemu/qemu-bridge-helper
maybe can add the follow two function: get_bios() get_helper()
good
Thanks, Yinsi
Thanks Yu Chuan
}
get_initrd() @@ -122,6 +129,17 @@ individual_option() -bios $bios -nic $nic )
- x86_64=(
-bios $bios
-nic $nic
- )
- riscv64=(
-machine virt
-device virtio-net-device,netdev=net0,mac=${mac}
-netdev bridge,br=br0,id=net0,helper=${helper}
- )
}
run_qemu() @@ -132,6 +150,13 @@ run_qemu() ;; qemu-kvm) [ "$(arch)" == "aarch64" ] && kvm=("${kvm[@]}" "${aarch64[@]}")
[ "$(arch)" == "x86_64" ] && kvm=("${kvm[@]}" "${x86_64[@]}")
;;
qemu-system-x86_64)
kvm=("${kvm[@]}" "${x86_64[@]}")
;;
qemu-system-riscv64)
esackvm=("${kvm[@]}" "${riscv64[@]}") ;;
-- 2.23.0