From ad5f4f3837adeaaac214f832bbebf249f798644b Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 27 Nov 2018 11:32:17 +0100 Subject: [PATCH] fix check if machine type is q35 When live migrating, with a q35 machine will get the qemu version encoded in the machine type, for example,'pc-q35-2.12', so we need to allow this too and cannot expect that all q35 machine have q35' in verbatim as their type. So, when migrating such a machine live, we missed to include the q35 cfg because we didn't allowed versioned q35 machine types, which then failed the migration. Signed-off-by: Dominik Csapak --- PVE/QemuServer/USB.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm index 3d65d384..036c16cf 100644 --- a/PVE/QemuServer/USB.pm +++ b/PVE/QemuServer/USB.pm @@ -42,7 +42,7 @@ sub get_usb_controllers { if ($arch eq 'aarch64') { $pciaddr = print_pci_addr('ehci', $bridges, $arch, $machine); push @$devices, '-device', "usb-ehci,id=ehci$pciaddr"; - } elsif ($machine eq 'q35') { + } elsif ($machine =~ /q35/) { # the q35 chipset support native usb2, so we enable usb controller # by default for this machine type push @$devices, '-readconfig', '/usr/share/qemu-server/pve-q35.cfg';