we need to remove drive after device has correctly by remove. With this patch:
Windows : if drive is locked/"mounted", the hot-unplug fail and disk is accessible (100% safe) Linux: without hotplug module : the hot-unplug fail and disk is accessible (100% safe) Linux : with hotplug module : the hot-unplug work, but no verification is done is the drive is mounted Signed-off-by: Alexandre Derumier <aderum...@odiso.com> --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 4e66cae..eba9aed 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2605,9 +2605,9 @@ sub vm_deviceunplug { die "can't unplug bootdisk" if $conf->{bootdisk} && $conf->{bootdisk} eq $deviceid; if ($deviceid =~ m/^(virtio)(\d+)$/) { - return undef if !qemu_drivedel($vmid, $deviceid); qemu_devicedel($vmid, $deviceid); return undef if !qemu_devicedelverify($vmid, $deviceid); + return undef if !qemu_drivedel($vmid, $deviceid); } if ($deviceid =~ m/^(lsi)(\d+)$/) { -- 1.7.10.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel