From: root <[email protected]>

The usb-kbd on q35 in tablet mode removes the need for "hotpatching"
when trying to install MacOS on Proxmox.
---
 PVE/QemuServer.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6dc68a4..7eb6f37 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1733,9 +1733,12 @@ sub print_tabletdevice_full {
 sub print_keyboarddevice_full {
     my ($conf, $arch, $machine) = @_;
 
-    return undef if $arch ne 'aarch64';
+    my $usbkbd;
+    if (machine_type_is_q35($conf) || $arch eq 'aarch64') {
+       $usbkbd = "usb-kbd,id=keyboard,bus=ehci.0,port=2";
+    }
 
-    return "usb-kbd,id=keyboard,bus=ehci.0,port=2";
+    return $usbkbd;
 }
 
 sub print_drivedevice_full {
-- 
2.17.1

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

Reply via email to