[pve-devel] [PATCH v6 21/22] vmconfig_update_net: do not call vm_deviceplug() if hotplug == 0
Dietmar Maurer
dietmar at proxmox.com
Tue Nov 25 12:24:28 CET 2014
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
More information about the pve-devel
mailing list