ESXi6.7.0 U2 直通USB键盘、鼠标给Win10虚拟机
mportant;">垃圾佬爱折腾(All in Boom)计划——在ESXi中安装Windows10虚拟机当作电视盒子,需要将显卡、外接USB键盘、鼠标直通给Windows10虚拟机。
1. ESXi主机【启用安全Shell(SSH)】
路径:【主机】-【操作】-【服务】-【启用安全Shell(SSH)】
2. 查询USB键鼠的VID、PID
SSH客户端:PuTTY(https://www.putty.org/)
[root@anonymous:~] lsusb Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver Bus 003 Device 002: ID 8087:8002 Intel Corp. Bus 002 Device 002: ID 8087:800a Intel Corp. Bus 001 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver Bus 003 Device 001: ID 0e0f:8002 VMware, Inc. Root Hub Bus 002 Device 001: ID 0e0f:8002 VMware, Inc. Root Hub Bus 001 Device 001: ID 0e0f:8003 VMware, Inc. Root Hub
查询USB键鼠的ID号,VID在前,PID在后
罗技键盘:Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
VID=046d,PID=c534
罗技鼠标:Bus 001 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver
VID=046d,PID=c52f
3. 编辑虚拟机设置
路径:【需直通键鼠的虚拟机】-【编辑】-【虚拟机选项】-【高级】-【配置参数】-【编辑配置】-【添加参数】
添加如下三行参数
usb.genreic.allowHID TRUE usb.quirks.device0 0x046d:0xc534 allow usb.quirks.device1 0x046d:0xc52f allow
4. 修改/etc/vmware/config配置
[root@anonymous:~] vi /etc/vmware/config libdir = "/usr/lib/vmware"authd.proxy.nfc = "vmware-hostd:ha-nfc"authd.proxy.nfcssl = "vmware-hostd:ha-nfcssl"authd.proxy.vpxa-nfcssl = "vmware-vpxa:vpxa-nfcssl"authd.proxy.vpxa-nfc = "vmware-vpxa:vpxa-nfc"authd.fullpath = "/sbin/authd"usb.quirks.device0 = "0x046d:0xc534 allow"usb.quirks.device1 = "0x046d:0xc52f allow"
5. 修改启动引导文件/bootbank/boot.cfg
ESXi重启后还会再次获取设备的控制权,因此需要在ESXi启动引导中禁用VMkernel对上述设备的控制权。
使用VI编辑器打开启动引导文件/bootbank/boot.cfg;
在”kernelopt=“行末尾添加 :
CONFIG./USB/quirks=0x046d:0xc534::0xffff:UQ_KBD_IGNORE:0x046d:0xc52f::0xffff:UQ_KBD_IGNORE
以此类推,添加第三个USB设备则在末尾追加:
:0x****:0x****::0xffff:UQ_KBD_IGNORE
[root@anonymous:~] vi /bootbank/boot.cfgbootstate=0title=timeout=5prefix=kernel=b.b00kernelopt=installerDiskDumpSlotSize=2560 no-auto-partition CONFIG./USB/quirks=0x046d:0xc534::0xffff:UQ_KBD_IGNORE:0x046d:0xc52f::0xffff:UQ_KBD_IGNOREmodules=jumpstrt.gz --- useropts.gz --- features.gz --- k.b00 --- chardevs.b00 --- user.b00 --- procfs.b00 --- uc_intel.b00 --- uc_amd.b00 --- uc_hygon.b00 -build=6.7.0-2.52.13473784updated=2
6. 重启ESXi
[root@anonymous:~] reboot
7. 虚拟机上添加USB设备
路径:【需直通键鼠的虚拟机】-【编辑】-【虚拟硬件】-【添加其他设备】-【USB设备】
添加2次后,保存。
8. 启动虚拟机
启动后即可实现直通USB键鼠控制虚拟机。
本文链接:https://www.kinber.cn/post/4716.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝: