46 lines
734 B
Fish
46 lines
734 B
Fish
# vim: syntax=fish:
|
|
|
|
for opt in $_vm_args
|
|
switch "$opt"
|
|
case ""
|
|
case -i --install
|
|
set _use_install 1
|
|
case \*
|
|
echo "error: unknown option $opt"
|
|
exit 1
|
|
end
|
|
end
|
|
|
|
set _boot_order c
|
|
|
|
set _args \
|
|
--display sdl,gl=on \
|
|
$_args
|
|
|
|
if test $_arch = "i386" || test $_arch = "x86_64"
|
|
set _args \
|
|
--machine accel=kvm \
|
|
$_args
|
|
end
|
|
|
|
if test $_install && test $_use_install
|
|
set _boot_order d
|
|
set _args \
|
|
--drive file="$_install",media=cdrom,readonly \
|
|
$_args
|
|
end
|
|
|
|
if test $_boot
|
|
set _boot_order a
|
|
set _args \
|
|
--drive file="$_boot",format=raw,if=floppy,readonly \
|
|
$_args
|
|
end
|
|
|
|
env QEMU_AUDIO_DRV=pa "qemu-system-$_arch" \
|
|
--drive file="$_vm_img",format=qcow2,media=disk \
|
|
--boot order=$_boot_order \
|
|
$_args
|
|
|
|
## EOF
|