mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-25 06:03:52 +03:00
virtio disk hot-unplug: drive_del after device_del
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 <aderumier@odiso.com>
This commit is contained in:
parent
750886f87a
commit
1f219ef546
@ -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+)$/) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user