[pve-devel] [PATCH v6 21/22] vmconfig_update_net: do not call vm_deviceplug() if hotplug == 0

Alexandre DERUMIER aderumier at odiso.com
Tue Nov 25 16:16:56 CET 2014


Ok, It's working fine now

----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: pve-devel at pve.proxmox.com 
Envoyé: Mardi 25 Novembre 2014 12:24:28 
Objet: [pve-devel] [PATCH v6 21/22] vmconfig_update_net: do not call vm_deviceplug() if hotplug == 0 


Signed-off-by: Dietmar Maurer <dietmar at proxmox.com> 
--- 
PVE/QemuServer.pm | 8 +++++++- 
1 file changed, 7 insertions(+), 1 deletion(-) 

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm 
index 4a44ac8..24c77ef 100644 
--- a/PVE/QemuServer.pm 
+++ b/PVE/QemuServer.pm 
@@ -3699,10 +3699,16 @@ sub vmconfig_update_net { 
PVE::Network::tap_unplug($iface); 
PVE::Network::tap_plug($iface, $newnet->{bridge}, $newnet->{tag}, $newnet->{firewall}); 
} 
+ 
+ return 1; 
} 
} 

- vm_deviceplug($storecfg, $conf, $vmid, $opt, $newnet); 
+ if ($conf->{hotplug}) { 
+ vm_deviceplug($storecfg, $conf, $vmid, $opt, $newnet); 
+ } else { 
+ die "skip\n"; 
+ } 
} 

sub vmconfig_update_disk { 
-- 
1.7.10.4 

_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list