mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-05 11:34:23 +00:00
fix bootorder
This commit is contained in:
parent
ac021d2e1d
commit
0888fdce30
@ -2025,20 +2025,12 @@ sub config_to_command {
|
|||||||
|
|
||||||
my $bootorder = $conf->{boot} || $confdesc->{boot}->{default};
|
my $bootorder = $conf->{boot} || $confdesc->{boot}->{default};
|
||||||
|
|
||||||
my $bootindex_hash = {
|
my $bootindex_hash = {};
|
||||||
c => 100,
|
|
||||||
a => 200,
|
|
||||||
d => 300,
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($bootorder) {
|
|
||||||
$bootindex_hash = {};
|
|
||||||
my $i = 1;
|
my $i = 1;
|
||||||
foreach my $o (split(//, $bootorder)) {
|
foreach my $o (split(//, $bootorder)) {
|
||||||
$bootindex_hash->{$o} = $i*100;
|
$bootindex_hash->{$o} = $i*100;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
push @$cmd, '-boot', "menu=on";
|
push @$cmd, '-boot', "menu=on";
|
||||||
|
|
||||||
@ -2184,8 +2176,7 @@ sub config_to_command {
|
|||||||
|
|
||||||
# qemu > 0.15 always try to boot from network - we disable that by
|
# qemu > 0.15 always try to boot from network - we disable that by
|
||||||
# not loading the pxe rom file
|
# not loading the pxe rom file
|
||||||
my $extra = (!$conf->{boot} || ($conf->{boot} !~ m/n/)) ?
|
my $extra = ($bootorder !~ m/n/) ? "romfile=," : '';
|
||||||
"romfile=," : '';
|
|
||||||
$pciaddr = print_pci_addr("${k}");
|
$pciaddr = print_pci_addr("${k}");
|
||||||
my $tmpstr = "$device,${extra}mac=$net->{macaddr},netdev=${k}$pciaddr";
|
my $tmpstr = "$device,${extra}mac=$net->{macaddr},netdev=${k}$pciaddr";
|
||||||
if (my $bootindex = $bootindex_hash->{n}) {
|
if (my $bootindex = $bootindex_hash->{n}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user