[pve-devel] applied: [PATCH qemu-server] fix #2131: get correct device when deleting iothreads
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Mar 14 08:29:41 CET 2019
On 3/13/19 5:28 PM, Dominik Csapak wrote:
> we map scsiX to virtioscsiX/scsihwX when we use virtio-scsi-single to add
> and iothread so we have to map it back when we delete an iothread, else the
> parsing fails with
>
> 'invalid drive key: virtioscsi0'
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> PVE/QemuServer.pm | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 546b22e..ed950fc 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -4278,7 +4278,11 @@ sub qemu_iothread_add {
> sub qemu_iothread_del {
> my($conf, $vmid, $deviceid) = @_;
>
> - my $device = parse_drive($deviceid, $conf->{$deviceid});
> + my $confid = $deviceid;
> + if ($deviceid =~ m/^(?:virtioscsi|scsihw)(\d+)$/) {
> + $confid = 'scsi' . $1;
> + }
> + my $device = parse_drive($confid, $conf->{$confid});
> if ($device->{iothread}) {
> my $iothreads = vm_iothreads_list($vmid);
> qemu_objectdel($vmid, "iothread-$deviceid") if $iothreads->{"iothread-$deviceid"};
>
applied, thanks!
More information about the pve-devel
mailing list