From 38c590d9f6e341dafafb859b3ea9d436c73e070c Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 25 Nov 2014 12:07:02 +0100 Subject: [PATCH] vmconfig_update_net: do not call vm_deviceplug() if hotplug == 0 Signed-off-by: Dietmar Maurer --- PVE/QemuServer.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 {