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
我尝试过的事情:
无附加选项
我进入了 select 语言步骤,但无法输入任何内容。当我尝试输入时,我已经通过 qemu window 检查了我是 'grabbed'。
无图形模式
-nographic
我最终需要图形(这将是另一袋蠕虫),但现在我尝试将其关闭。这让我可以进入 select 语言步骤,但是输入 selection 并按回车键什么都不做。可能跟硬件驱动初始化失败有关?
指定高级键盘
-device usb-kbd
这给了我
No 'usb-bus' bus found for device 'usb-kbd'
指定主机总线和地址
-device usb-host,hostbus=2,hostaddr=29
这也给了我
No 'usb-bus' bus found for device 'usb-host'
指定 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
的选项,但不知道我应该选择什么。
不同的设备和OS
我已经尝试让 QEMU 在 Windows 7、10 和 Ubuntu 18.04.2 LTE 主机上跨两台不同的物理计算机为这个 solaris 客户端获取输入,这产生了同样的问题。
我知道键盘可以用,因为它在主机上没问题 OS。我知道键盘可以与其他模拟 OS 一起使用,因为我有一个 x86 ubuntu 客户端工作正常。
QEMU 监视器
我尝试启动 QEMU 监视器,因为 VM 运行正在使用 sendkey
。没用。然而,info
表示 VM 是 运行ning。 usb
return没有设备。
我浏览了以下链接:
Mouse and Keyboard not working in qemu emulator
我没有收到 key event queue full
错误,但尝试了给出的答案,即简单的 -device usb-kbd
方法和 bus/address 方法。
QEMU: problems with mouse and keyboard settings
听起来相似但原因无关。
How to passthrough USB device through Qemu in Windows?
没有答案
https://brezular.com/2012/02/17/installation-solaris-2-6-sparc-on-qemu-part2-solaris-installation/
他们没有运行这个错误。
-
这详细介绍了我尝试过的 bus/address 和 vendorid/productid 方法。
https://bugs.launchpad.net/qemu/+bug/685096
线程中途;还详细介绍了 vendorid/productid 我尝试过的方法。
https://www.linuxquestions.org/questions/slackware-14/qemu-keyboard-does-not-work-523168/
我试过运行-k
选项没有影响。我不是 运行 sudo。
我 运行 遇到了同样的问题并尝试了几种方法。从 运行 不同的 ISO 到尝试不同的驱动程序配置,但没有任何效果。我相信 QEMU 架构尚未完全支持 SPARC64。我还按照@Andrew Henle 的建议尝试了 Solaris 11。虽然我无法得到它 运行 -M niagara
但我相信这可能是正确的方向。
现在,如果您不特别需要 QEMU,而只想 use/testSPARC 架构上的 Solaris 10 或 11。我想你还有两个选择:
- 您可以在 eBay 上购买支持的硬件。
- 如果您不想购买硬件,您可以从 Oracle Cloud 获得共享 SPARC 服务器。
祝你好运!
我无法让 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
我尝试过的事情:
无附加选项
我进入了 select 语言步骤,但无法输入任何内容。当我尝试输入时,我已经通过 qemu window 检查了我是 'grabbed'。
无图形模式
-nographic
我最终需要图形(这将是另一袋蠕虫),但现在我尝试将其关闭。这让我可以进入 select 语言步骤,但是输入 selection 并按回车键什么都不做。可能跟硬件驱动初始化失败有关?
指定高级键盘
-device usb-kbd
这给了我
No 'usb-bus' bus found for device 'usb-kbd'
指定主机总线和地址
-device usb-host,hostbus=2,hostaddr=29
这也给了我
No 'usb-bus' bus found for device 'usb-host'
指定 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
的选项,但不知道我应该选择什么。不同的设备和OS
我已经尝试让 QEMU 在 Windows 7、10 和 Ubuntu 18.04.2 LTE 主机上跨两台不同的物理计算机为这个 solaris 客户端获取输入,这产生了同样的问题。
我知道键盘可以用,因为它在主机上没问题 OS。我知道键盘可以与其他模拟 OS 一起使用,因为我有一个 x86 ubuntu 客户端工作正常。
QEMU 监视器
我尝试启动 QEMU 监视器,因为 VM 运行正在使用
sendkey
。没用。然而,info
表示 VM 是 运行ning。usb
return没有设备。
我浏览了以下链接:
Mouse and Keyboard not working in qemu emulator
我没有收到
key event queue full
错误,但尝试了给出的答案,即简单的-device usb-kbd
方法和 bus/address 方法。QEMU: problems with mouse and keyboard settings
听起来相似但原因无关。
How to passthrough USB device through Qemu in Windows?
没有答案
https://brezular.com/2012/02/17/installation-solaris-2-6-sparc-on-qemu-part2-solaris-installation/
他们没有运行这个错误。
-
这详细介绍了我尝试过的 bus/address 和 vendorid/productid 方法。
https://bugs.launchpad.net/qemu/+bug/685096
线程中途;还详细介绍了 vendorid/productid 我尝试过的方法。
https://www.linuxquestions.org/questions/slackware-14/qemu-keyboard-does-not-work-523168/
我试过运行
-k
选项没有影响。我不是 运行 sudo。
我 运行 遇到了同样的问题并尝试了几种方法。从 运行 不同的 ISO 到尝试不同的驱动程序配置,但没有任何效果。我相信 QEMU 架构尚未完全支持 SPARC64。我还按照@Andrew Henle 的建议尝试了 Solaris 11。虽然我无法得到它 运行 -M niagara
但我相信这可能是正确的方向。
现在,如果您不特别需要 QEMU,而只想 use/testSPARC 架构上的 Solaris 10 或 11。我想你还有两个选择:
- 您可以在 eBay 上购买支持的硬件。
- 如果您不想购买硬件,您可以从 Oracle Cloud 获得共享 SPARC 服务器。
祝你好运!