blob: 71e85e15735dfc1e5f609ab9514b7b1e991e47f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
if [[ $# -eq 0 ]]; then
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"
# echo "vc boot .iso as virtio cd-rom"
exit 1
fi
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";;
# vc) IF="virtio"; MEDIA="cdrom";;
*) IF="scsi"; MEDIA="cdrom";;
esac
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
|