On 11/27/18 12:05 PM, Thomas Lamprecht wrote:
On 11/27/18 11:32 AM, Dominik Csapak wrote:
with live migration the machine type not q35, but something like
pc-q35-2.12
so we missed to include the q35 cfg

in the future we probably want to have a QemuServer::Tools
to refactor such methods

there's machine_type_is_q35 in PVE::QemuServer, why not using that one?
That way the error wouldn't have been there in the first place...


yes, but i wanted to fix this fast, but ofc i can send a v2 with a
refactored QemuServer::Tools which contains (for now) only
machine_type_is_q35, or do you have a better suggestion for the
name/place?

>> Signed-off-by: Dominik Csapak <[email protected]>
---
  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 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';


_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to