[pve-devel] [PATCH 3/3] nic hotplug : use pxe roms for older machinetype

Alexandre Derumier aderumier at odiso.com
Fri Nov 6 10:27:06 CET 2015


we want to avoid mix some nics with pxe rom and other with efi rom.

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index d0345a7..feb9db1 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3337,7 +3337,12 @@ sub vm_deviceplug {
     } elsif ($deviceid =~ m/^(net)(\d+)$/) {
 
         return undef if !qemu_netdevadd($vmid, $conf, $device, $deviceid);
-        my $netdevicefull = print_netdevice_full($vmid, $conf, $device, $deviceid);
+
+        my $machine_type = PVE::QemuServer::qemu_machine_pxe($vmid, $conf); 
+        my $use_old_bios_files = undef;
+        ($use_old_bios_files, $machine_type) = qemu_use_old_bios_files($machine_type);
+
+        my $netdevicefull = print_netdevice_full($vmid, $conf, $device, $deviceid, undef, $use_old_bios_files);
         qemu_deviceadd($vmid, $netdevicefull);
         eval { qemu_deviceaddverify($vmid, $deviceid); };
 	if (my $err = $@) {
-- 
2.1.4



More information about the pve-devel mailing list