]> git.proxmox.com Git - qemu-server.git/commitdiff
fix check if machine type is q35
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 27 Nov 2018 10:32:17 +0000 (11:32 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 27 Nov 2018 12:35:52 +0000 (13:35 +0100)
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 <d.csapak@proxmox.com>
PVE/QemuServer/USB.pm

index 3d65d384be71d05f922f06377d4f811333887a10..036c16cfcd59cb0c896c2c64d21a1a21fbcb511e 100644 (file)
@@ -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';