]> git.proxmox.com Git - qemu-server.git/commitdiff
vmconfig_update_net: do not call vm_deviceplug() if hotplug == 0
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 25 Nov 2014 11:07:02 +0000 (12:07 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 7 Jan 2015 05:44:39 +0000 (06:44 +0100)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
PVE/QemuServer.pm

index 7456158fda31c3b5e0991e3e55193bfb8ab27ac5..cdb7834d3d877f32ec8fa58a94296fda44e46a21 100644 (file)
@@ -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 {