From: Dominik Csapak Date: Tue, 27 Nov 2018 10:32:17 +0000 (+0100) Subject: fix check if machine type is q35 X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff_plain;h=ad5f4f3837adeaaac214f832bbebf249f798644b 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 --- diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm index 3d65d38..036c16c 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';