[pve-devel] [PATCH 1/7] pending : add disk hot-unplug

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


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

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index ab8565d..1d85ac8 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3541,7 +3541,9 @@ sub vmconfig_hotplug_pending {
 		die "skip\n" if !$hotplug;
 		vm_deviceunplug($vmid, $conf, $opt);
 	    } elsif (valid_drivename($opt)) {
-		die "skip\n"; # we do not allow to hot-remove disk?		
+		die "skip\n" if !$hotplug;
+		vm_deviceunplug($vmid, $conf, $opt);
+		vmconfig_register_unused_drive($storecfg, $vmid, $conf, parse_drive($opt, $conf->{$opt}));
 	    } else {
 		die "skip\n";
 	    }
-- 
1.7.10.4




More information about the pve-devel mailing list