[pve-devel] [PATCH 52/52] fix net device pci addr
Derumier Alexandre
aderumier at odiso.com
Tue Oct 4 08:25:37 CEST 2011
---
PVE/QemuServer.pm | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b332d85..09459ce 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2173,7 +2173,8 @@ sub config_to_command {
# not loading the pxe rom file
my $extra = (!$conf->{boot} || ($conf->{boot} !~ m/n/)) ?
"romfile=," : '';
- push @$cmd, '-device', "$device,${extra}mac=$net->{macaddr},netdev=${k}";
+ $pciaddr = print_pci_addr("${k}");
+ push @$cmd, '-device', "$device,${extra}mac=$net->{macaddr},netdev=${k}$pciaddr";
}
}
@@ -2815,6 +2816,13 @@ sub print_pci_addr {
virtio5 => { bus => 0, addr => 15 },
hostpci0 => { bus => 0, addr => 16 },
hostpci1 => { bus => 0, addr => 17 },
+ net0 => { bus => 0, addr => 18 },
+ net1 => { bus => 0, addr => 19 },
+ net2 => { bus => 0, addr => 20 },
+ net3 => { bus => 0, addr => 21 },
+ net4 => { bus => 0, addr => 22 },
+ net5 => { bus => 0, addr => 23 },
+ net6 => { bus => 0, addr => 24 },
};
--
1.7.2.5
More information about the pve-devel
mailing list