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

Alexandre Derumier aderumier at odiso.com
Fri Jan 2 15:16:00 CET 2015


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 1d85ac8..2f93d13 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