2010-06-29 07:58:55 +02:00
|
|
|
#!/bin/bash
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2011-12-16 20:27:17 +01:00
|
|
|
if [[ $# -eq 0 ]]; then
|
2010-06-29 07:58:55 +02:00
|
|
|
echo "usage: testiso <isofile> [id|ic|sd|sc|vd|vc]"
|
|
|
|
echo
|
|
|
|
echo "id boot .iso as IDE disk"
|
|
|
|
echo "ic boot .iso as IDE cd-rom"
|
|
|
|
echo "sd boot .iso as SCSI disk"
|
|
|
|
echo "sc boot .iso as SCSI cd-rom"
|
|
|
|
echo "vd boot .iso as virtio disk"
|
2011-12-16 20:27:17 +01:00
|
|
|
# echo "vc boot .iso as virtio cd-rom"
|
2008-09-07 03:39:35 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
2010-06-29 07:58:55 +02:00
|
|
|
|
|
|
|
case "${2}" in
|
|
|
|
id) IF="ide"; MEDIA="disk";;
|
|
|
|
ic) IF="ide"; MEDIA="cdrom";;
|
|
|
|
sd) IF="scsi"; MEDIA="disk";;
|
|
|
|
sc) IF="scsi"; MEDIA="cdrom";;
|
|
|
|
vd) IF="virtio"; MEDIA="disk";;
|
2011-12-16 20:27:17 +01:00
|
|
|
# vc) IF="virtio"; MEDIA="cdrom";;
|
2010-06-29 07:58:55 +02:00
|
|
|
*) IF="scsi"; MEDIA="cdrom";;
|
|
|
|
esac
|
|
|
|
|
2011-12-16 20:27:17 +01:00
|
|
|
echo qemu-system-x86_64 -m 256 -drive file=${1},if=${IF},media=${MEDIA},boot=on
|
|
|
|
qemu-system-x86_64 -m 256 -drive file=${1},if=${IF},media=${MEDIA},boot=on
|