QEMU USB 键盘直通困难 [英] QEMU usb keyboard passthrough difficulties
问题描述
我无法让 QEMU 识别我的键盘.主机是windows 7.客户端是solaris 10 SPARC.我正在通过 cygwin 运行命令.
I'm having trouble getting QEMU to recognize my keyboard. The host machine is windows 7. The client is solaris 10 SPARC. I'm running commands through cygwin.
一切都开始了,但是当需要输入任何东西时,没有捕捉到任何笔划.
Everything starts up, but when it comes time to input anything, no strokes are captured.
我的键盘、鼠标和显示器通过物理戴尔集线器连接到我的计算机,这可能会影响某些事情.但是因为我的电脑usb插槽很少,所以需要集线器.
My keyboard, mouse and monitors are connected to my computer via a physical dell hub which might affect things. But because my computer has few usb slots, the hub is needed.
但是,我可以像平常一样使用 lsusb 看到我的 USB 键盘和鼠标:
However, I can see my usb keyboard and mouse like normal using lsusb:
$ 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 是键盘
I double checked with -v, and Bus 002, Device 029 is the keyboard
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
我通常可以进入选择语言对话框,但我要么无法输入任何内容,要么无法输入(取决于选项):
I can usually get to the choose language dialog but then I either can't input anything or it doesn't take (depending on the options):
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 直通的正确参数有关,但我不确定是哪些参数.为方便起见,假设以下所有命令都以
I'm convinced this has to do with proper arguments for usb passthrough, but I'm not sure which ones. For convenience sake, assume all the following commands start with
"C:\Program Files\qemu\qemu-system-sparc64" -m 2048 -cdrom "sol-10-u11-ga-sparc-dvd.iso" -k en-us -boot d
我尝试过的事情:
无附加选项
我进入了选择语言步骤,但无法输入任何内容.当我尝试输入时,我已经检查过我是否被 qemu 窗口抓住"了.
I get to the select language step but cannot input anything. I have checked that I am 'grabbed' by the qemu window when I try to type.
无图形模式
-nographic
我最终需要图形(这将是另一袋蠕虫),但现在我尝试将其关闭.这使我可以进入选择语言步骤,但输入选择并按 Enter 键没有任何作用.可能跟硬件驱动初始化失败有关系?
I eventually need graphics (which is going to be another bag of worms), but for now I tried turning it off. This allows me to get to the select language step, but imputing the selection and hitting enter does nothing. Perhaps it has something to do with the failure to initialize hardware driver?
指定高级键盘
-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
我似乎找不到免费的、非保留的位置.他们都已经有一个设备或返回类似的东西:
I can't seem to find a free, non-reserved slot. They all already have a device in them or return something like:
PCI: slot 4 function 0 not available for piix4-usb-uhci, reserved
我认为 uhci 是 USB 1.0,我应该在第一个设备参数中使用不同的说明符吗?我可以看到带有 -device help
的选项,但不知道我应该选择什么.
I think uhci is usb 1.0, should I have a different specifier in the first device argument? I can see the options with -device help
but don't know what I should pick.
不同的设备和操作系统
我已经尝试让 QEMU 在两台不同的物理计算机上的 Windows 7、10 和 Ubuntu 18.04.2 LTE 主机上为这个 solaris 客户端获取输入,但出现了同样的问题.
I've tried getting QEMU to take input for this solaris client on Windows 7, 10 and Ubuntu 18.04.2 LTE hosts across two different physical computers and this gave the same problem.
我知道键盘可以工作,因为它在主机操作系统上很好.我知道键盘适用于其他模拟操作系统,因为我的 x86 ubuntu 客户端工作正常.
I know the keyboard works, as it is fine on the host OS. I know the keyboard works with other emulated OS because I got an x86 ubuntu client working fine.
QEMU 监视器
我尝试在 VM 运行时启动 QEMU 监视器并使用 sendkey
.没用.但是,info
表示 VM 正在运行.usb
不返回设备.
I've tried bringing up the QEMU monitor as the VM is running and using sendkey
. Didn't work. However, info
says that the VM is running. usb
returns no devices.
我浏览了以下链接:
我没有收到 key event queue full
错误,但还是尝试了给出的答案,即简单的 -device usb-kbd
方法和总线/地址方法.
I'm not getting the key event queue full
error but tried the answers given anyway, namely the simple -device usb-kbd
approach and bus/address approaches.
听起来相似但不相关的原因.
Similar sounding but unrelated cause.
没有答案
https://brezular.com/2012/02/17/installation-solaris-2-6-sparc-on-qemu-part2-solaris-installation/
他们没有遇到这个错误.
They didn't run into this error.
这详细说明了我尝试过的总线/地址和 vendorid/productid 方法.
This details both the bus/address and vendorid/productid approach, which I tried.
https://bugs.launchpad.net/qemu/+bug/685096
线程中途;还详细介绍了我尝试过的 vendorid/productid 方法.
Halfway through thread; also details vendorid/productid approach, which I tried.
https:///www.linuxquestions.org/questions/slackware-14/qemu-keyboard-does-not-work-523168/
我尝试使用 -k
选项运行但没有任何影响.我没有用 sudo 运行.
I tried running with -k
option to no affect. I'm not running with sudo.
推荐答案
我遇到了同样的问题并尝试了几种方法.从运行不同的 ISO 到尝试不同的驱动程序配置,但没有任何效果.我相信 QEMU 架构尚未完全支持 SPARC64.我还按照@Andrew Henle 的建议尝试了 Solaris 11.虽然我无法使用 -M niagara
让它运行,但我相信这可能是正确的方向.
I ran into same issue and tried several approaches. From running different ISOs to trying out different driver configurations but nothing worked. I believe SPARC64 is not yet fully supported with QEMU architecture. I also tried Solaris 11 as suggested by @Andrew Henle. Though I wasn't able to get it running with -M niagara
but I believe that could be the right direction.
现在,如果您不是特别想要 QEMU,而只想在 SPARC 架构上使用/测试 Solaris 10 或 11.我想你还有两个选择:
Now if you don't specifically want the QEMU but just want to use/test Solaris 10 or 11 on SPARC architecture. I think you still have two options:
- 您可以在 eBay 上购买支持的硬件.
- 如果您不想购买硬件,可以从 Oracle Cloud 获取共享 SPARC 服务器.
祝你好运!
这篇关于QEMU USB 键盘直通困难的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!