Skip to content

Commit

Permalink
add option -E, support for uefi
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Jan 1, 2020
1 parent 2c02b01 commit 328a0c3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dev-utils/fai-kvm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fai-kvm, start kvm host for testing FAI software
#
# Author: Thomas Lange, Uni Koeln, 2011-2019
# Author: Thomas Lange, Uni Koeln, 2011-2020
# License: GPL v2 or any later version

fix="-k en-us -smp 2 -cpu host -global isa-fdc.driveA= " # if loading cirrusfb (via pcimodules and modprobe cirrusfb) causes errors in kvm
Expand All @@ -18,6 +18,7 @@ diskdir=/tmp # directory where the disk images will be created, a RAM disk i
usernet=0
newdisk=0
daemonize=0
efi=0
macprefix=52:54:00:11:23
# - - - - - - - - - - - - - - - - - - - - - - - - -
boot_disk() {
Expand Down Expand Up @@ -86,9 +87,10 @@ EOF
}
# - - - - - - - - - - - - - - - - - - - - - - - - -

while getopts "bUhnNu:s:m:d:VD:t:" opt ; do
while getopts "EbUhnNu:s:m:d:VD:t:" opt ; do
case "$opt" in
b) daemonize=1 ;;
E) efi=1 ;;
n) newdisk=1 ;;
N) newdisk=2 ;;
U) usernet=1 ;;
Expand Down Expand Up @@ -146,6 +148,12 @@ for i in `seq 1 $disks` ; do
fi
done
gopt="$fix $vga -m $ram -name $title"
if [ $efi = 1 ]; then
if [ ! -f /usr/share/ovmf/OVMF.fd ]; then
die 99 "UEFI firmware not found. Please install package ovmf."
fi
gopt="-bios /usr/share/ovmf/OVMF.fd $gopt"
fi


# create new disk images
Expand Down

0 comments on commit 328a0c3

Please sign in to comment.