From: Dietmar Maurer Date: Tue, 25 Nov 2014 11:07:02 +0000 (+0100) Subject: vmconfig_update_net: do not call vm_deviceplug() if hotplug == 0 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=38c590d9f6e341dafafb859b3ea9d436c73e070c;p=qemu-server.git vmconfig_update_net: do not call vm_deviceplug() if hotplug == 0 Signed-off-by: Dietmar Maurer --- diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 7456158f..cdb7834d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3808,10 +3808,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 {