From a9ce7583cf0e1979255978216d6860b10c49a1f9 Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Wed, 11 Sep 2019 14:43:33 +0200 Subject: [PATCH] usb: Fix local resource check of Spice USB devices The check relied on the fact that in a regular use case a usb device of type spice would not have any other settings like `usb3=1`. An exact match worked fine for this. This patch changes the behaviour and makes it possible to migrate VMs with Spice USB devices that have additional usb options set. Signed-off-by: Aaron Lauterer --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 1260cc0..33bf966 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2925,7 +2925,7 @@ sub check_local_resources { push @loc_res, "ivshmem" if $conf->{ivshmem}; foreach my $k (keys %$conf) { - next if $k =~ m/^usb/ && ($conf->{$k} eq 'spice'); + next if $k =~ m/^usb/ && ($conf->{$k} =~ m/^spice(?![^,])/); # sockets are safe: they will recreated be on the target side post-migrate next if $k =~ m/^serial/ && ($conf->{$k} eq 'socket'); push @loc_res, $k if $k =~ m/^(usb|hostpci|serial|parallel)\d+$/; -- 2.39.2