do not set romfile= if network is not in boot order

Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
This commit is contained in:
Stefan Priebe 2015-01-09 06:56:14 +01:00 committed by Dietmar Maurer
parent d14ccfd28a
commit 5e2068d285

View File

@ -1236,11 +1236,8 @@ sub print_netdevice_full {
$device = 'virtio-net-pci'; $device = 'virtio-net-pci';
}; };
# qemu > 0.15 always try to boot from network - we disable that by
# not loading the pxe rom file
my $extra = ($bootorder !~ m/n/) ? "romfile=," : '';
my $pciaddr = print_pci_addr("$netid", $bridges); my $pciaddr = print_pci_addr("$netid", $bridges);
my $tmpstr = "$device,${extra}mac=$net->{macaddr},netdev=$netid$pciaddr,id=$netid"; my $tmpstr = "$device,mac=$net->{macaddr},netdev=$netid$pciaddr,id=$netid";
if ($net->{queues} && $net->{queues} > 1 && $net->{model} eq 'virtio'){ if ($net->{queues} && $net->{queues} > 1 && $net->{model} eq 'virtio'){
#Consider we have N queues, the number of vectors needed is 2*N + 2 (plus one config interrupt and control vq) #Consider we have N queues, the number of vectors needed is 2*N + 2 (plus one config interrupt and control vq)
my $vectors = $net->{queues} * 2 + 2; my $vectors = $net->{queues} * 2 + 2;