[pve-devel] [PATCH 4/7] don't try to hotplug|unplug ide && sata drive

Alexandre Derumier aderumier at odiso.com
Wed Dec 31 14:38:11 CET 2014


We can't hotplug theses devices,
so we can avoid to throw always an error when adding them

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 67e3015..df9ce74 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3541,7 +3541,7 @@ sub vmconfig_hotplug_pending {
 		die "skip\n" if !$hotplug;
 		vm_deviceunplug($vmid, $conf, $opt);
 	    } elsif (valid_drivename($opt)) {
-		die "skip\n" if !$hotplug;
+		die "skip\n" if !$hotplug || $opt =~ m/(ide|sata)(\d+)/;
 		vm_deviceunplug($vmid, $conf, $opt);
 		vmconfig_register_unused_drive($storecfg, $vmid, $conf, parse_drive($opt, $conf->{$opt}));
 	    } else {
@@ -3788,7 +3788,7 @@ sub vmconfig_update_disk {
 	}
 
     } else { 
-	die "skip\n" if !$conf->{hotplug};
+	die "skip\n" if !$conf->{hotplug} || $opt =~ m/(ide|sata)(\d+)/;   
 	# hotplug new disks
 	vm_deviceplug($storecfg, $conf, $vmid, $opt, $drive);
     }
-- 
1.7.10.4




More information about the pve-devel mailing list