Skip to content

Commit

Permalink
use new qemu options for network devices
Browse files Browse the repository at this point in the history
this omits warnings about deprecated options
  • Loading branch information
Mrfai committed Jan 17, 2021
1 parent f19e744 commit b940792
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 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-2020
# Author: Thomas Lange, Uni Koeln, 2011-2021
# 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 Down Expand Up @@ -118,7 +118,7 @@ fi
if ! [[ $user =~ ^[0-9]+$ ]] ; then
die 2 "Error: Option -u needs a number"
fi
hex=$(printf %X $user)
hex=$(printf %02X $user)
diskfile=$diskdir/faitest-disk-$user

if [ $daemonize -eq 1 ]; then
Expand All @@ -135,9 +135,10 @@ fi
mac=$macprefix:$hex

if [ $usernet = 1 ]; then
net="-net nic,name=eth0,model=virtio -net user,name=eth0"
net="-device virtio-net-pci,netdev=net0 -netdev user,id=net0"
else
net="-net nic,macaddr=$mac,model=virtio -net tap,ifname=tap$user,script=no,downscript=no"
net="-device virtio-net-pci,netdev=net0,mac=$mac -netdev tap,ifname=tap$user,id=net0,script=no,downscript=no
"
fi


Expand Down

0 comments on commit b940792

Please sign in to comment.