Signed-off-by: Alexandre Derumier <[email protected]>
---
 PVE/QemuServer.pm |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 434afe3..669f2e5 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2519,7 +2519,7 @@ sub vm_deviceplug {
        return 1;
     }
 
-    return 1 if !$conf->{hotplug};
+    return 1 if $conf->{hotplug} && $conf->{hotplug} == 0;
 
     my $devices_list = vm_devices_list($vmid);
     return 1 if defined($devices_list->{$deviceid});
@@ -2586,7 +2586,7 @@ sub vm_deviceunplug {
        return 1;
     }
 
-    return 1 if!$conf->{hotplug};
+    return 1 if $conf->{hotplug} && $conf->{hotplug} == 0;
 
     my $devices_list = vm_devices_list($vmid);
     return 1 if !defined($devices_list->{$deviceid});
-- 
1.7.10.4

_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to