]> git.proxmox.com Git - qemu-server.git/commitdiff
device unplug: verify that unplugging scsi disk completed
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 9 Mar 2022 10:09:03 +0000 (11:09 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 11 Mar 2022 09:45:59 +0000 (10:45 +0100)
Avoids the error
  adding drive failed: Duplicate ID 'drive-scsi1' for drive
that could happen when switching over to a new disk (e.g. via qm set),
if unplugging wasn't fast enough.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuServer.pm

index 42f0fbda18648af936c059991e71e602365e3e7d..b7e6a8eda72ea878dd3d40a0bf946093a3559b47 100644 (file)
@@ -4249,6 +4249,7 @@ sub vm_deviceunplug {
        my $device = parse_drive($deviceid, $conf->{$deviceid});
 
        qemu_devicedel($vmid, $deviceid);
+       qemu_devicedelverify($vmid, $deviceid);
        qemu_drivedel($vmid, $deviceid);
        qemu_deletescsihw($conf, $vmid, $deviceid);