QEMU usb 键盘直通困难

QEMU usb keyboard passthrough difficulties

我无法让 QEMU 识别我的键盘。 主机是windows7。客户端是solaris 10 SPARC。我正在通过 cygwin 运行ning 命令。

一切都启动了,但是当需要输入任何内容时,没有捕捉到任何笔画。

我的键盘、鼠标和显示器通过物理戴尔集线器连接到我的计算机,这可能会影响某些事情。但是因为我的电脑usb槽少,所以需要hub

但是,我可以像往常一样使用 lsusb 看到我的 usb 键盘和鼠标:

$ lsusb
Bus 002 Device 022: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
...
Bus 002 Device 029: ID 413c:2107 Dell Computer Corp.
Bus 002 Device 002: ID 413c:9016 Dell Computer Corp.
...

我用-v仔细检查过,总线002,设备029是键盘

Bus 002 Device 029: ID 413c:2107 Dell Computer Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x413c Dell Computer Corp.
  idProduct          0x2107
  bcdDevice            1.15
  iManufacturer           1 Dell
  iProduct                2 Dell USB Entry Keyboard

我通常可以进入选择语言对话框,但后来我要么无法输入任何内容,要么不输入(取决于选项):

OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Feb 15 2019 10:05
  Type 'help' for detailed information
[Evaling fcode, entry point...]
SunOS Release 5.10 Version Generic_147147-26 64-bit
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
could not find debugger-vocabulary-hook>threads:interpret: exception -13 caught
interpret \ Copyright (c) 1995-1999 by Sun Microsystems, Inc.
[Some pragma stuff...]
h# unix-tte:interpret: exception -13 caught
interpret ' unix-tte is va>tte-data failed with error ffffffffffffffed
WARNING: consconfig: cannot find driver for screen device /pci@1fe,0/pci@1,1/QEMU,VGA@2
Configuring devices.
WARNING: ata_controller[0] - Unsupported Controller
        Vendor 0x9510, Device 0x4606, Revision 0x7
WARNING: Out of range register specification from device node <fdthree>
/platform/sun4u/kernel/drv/sparcv9/i8042: undefined symbol 'i_ddi_alloc_ispec'
WARNING: mod_load: cannot load module 'i8042'
WARNING: ata_controller[0] - Unsupported Controller
        Vendor 0x9510, Device 0x4606, Revision 0x7
WARNING: Out of range register specification from device node <fdthree>
/platform/sun4u/kernel/drv/sparcv9/i8042: undefined symbol 'i_ddi_alloc_ispec'
WARNING: mod_load: cannot load module 'i8042'
WARNING: SUNW,hme0 : No transceiver found., SEVERITY_HIGH, XCVR

WARNING: SUNW,hme0 : No transceiver found., SEVERITY_HIGH, XCVR

WARNING: SUNW,hme0 : Failed to initialize hardware/driver, SEVERITY_HIGH, INIT  

Using RPC Bootparams for network configuration information.
svc:/system/filesystem/local:default: WARNING: /usr/sbin/zfs mount -a failed: one or more file systems failed to mount
Serial console, reverting to text install
Beginning system identification...
Searching for configuration file(s)...
Search complete.
Discovering additional network configuration...
Select a Language

   0. English
   1. Brazilian Portuguese
   2. French
   3. German
   4. Italian
   5. Japanese
   6. Korean
   7. Simplified Chinese
   8. Spanish
   9. Swedish
  10. Traditional Chinese

Please make a choice (0 - 10), or press h or ? for help:
[Cannot input, or if can, doesn't take]

我确信这与 USB 直通的正确参数有关,但我不确定是哪些参数。为了方便起见,假设以下所有命令都以

开头
"C:\Program Files\qemu\qemu-system-sparc64" -m 2048 -cdrom "sol-10-u11-ga-sparc-dvd.iso" -k en-us -boot d 

我尝试过的事情:

  1. 无附加选项

    我进入了 select 语言步骤,但无法输入任何内容。当我尝试输入时,我已经通过 qemu window 检查了我是 'grabbed'。

  2. 无图形模式

     -nographic 
    

    我最终需要图形(这将是另一袋蠕虫),但现在我尝试将其关闭。这让我可以进入 select 语言步骤,但是输入 selection 并按回车键什么都不做。可能跟硬件驱动初始化失败有关?

  3. 指定高级键盘

    -device usb-kbd
    

    这给了我

    No 'usb-bus' bus found for device 'usb-kbd'
    
  4. 指定主机总线和地址

    -device usb-host,hostbus=2,hostaddr=29
    

    这也给了我

    No 'usb-bus' bus found for device 'usb-host'
    
  5. 指定 vendorid 和 productid

    -device piix4-usb-uhci,id=usb,bus=pci,addr=0x4 -device usb-host,vendorid=0x413c,productid=0x2107
    

    我似乎找不到空闲的非预留插槽。他们都已经有一个设备或 return 类似的东西:

    PCI: slot 4 function 0 not available for piix4-usb-uhci, reserved
    

    我认为 uhci 是 usb 1.0,我应该在第一个设备参数中使用不同的说明符吗?我可以看到带有 -device help 的选项,但不知道我应该选择什么。

  6. 不同的设备和OS

    我已经尝试让 QEMU 在 Windows 7、10 和 Ubuntu 18.04.2 LTE 主机上跨两台不同的物理计算机为这个 solaris 客户端获取输入,这产生了同样的问题。

    我知道键盘可以用,因为它在主机上没问题 OS。我知道键盘可以与其他模拟 OS 一起使用,因为我有一个 x86 ubuntu 客户端工作正常。

  7. QEMU 监视器

    我尝试启动 QEMU 监视器,因为 VM 运行正在使用 sendkey。没用。然而,info 表示 VM 是 运行ning。 usb return没有设备。

我浏览了以下链接:

我 运行 遇到了同样的问题并尝试了几种方法。从 运行 不同的 ISO 到尝试不同的驱动程序配置,但没有任何效果。我相信 QEMU 架构尚未完全支持 SPARC64。我还按照@Andrew Henle 的建议尝试了 Solaris 11。虽然我无法得到它 运行 -M niagara 但我相信这可能是正确的方向。

现在,如果您不特别需要 QEMU,而只想 use/testSPARC 架构上的 Solaris 10 或 11。我想你还有两个选择:

  1. 您可以在 eBay 上购买支持的硬件。
  2. 如果您不想购买硬件,您可以从 Oracle Cloud 获得共享 SPARC 服务器。

祝你好运!