KVM通过qemu实现USB重定向

您所在的位置:网站首页 礼貌用语说一句话二年级 KVM通过qemu实现USB重定向

KVM通过qemu实现USB重定向

2024-07-17 23:59:37| 来源: 网络整理| 查看: 265

KVM是通过qemu来支持USB设备的,可以在启动的时候就指定需要连接的USB设备,也可以系统启动后动态的添加删除.通过qemu的help可知,使用qemu的usb_add host:xxx:xxx来添加usb设备,那么如何知道对应的host:xxx:xxx呢,有2种方法: 1)在host主机ubuntu中执行lsusb得到这些信息 比如在我机器上usb的信息如下: 

1 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub 2 Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub 3 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 4 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 5 Bus 001 Device 003: ID 0461:4d80 Primax Electronics, Ltd 6 Bus 001 Device 006: ID 0951:1665 Kingston Technology 7 Bus 001 Device 004: ID 058f:b002 Alcor Micro Corp. 8 Bus 002 Device 003: ID 0489:e010 Foxconn / Hon Hai

  0951:1665就是我们需要的了。

2)进入服务端虚拟机后,通过ctrl+alt+2调出qemu控制台,输入info usb来列出相关已经加载的USB信息。如果显示:

(qemu): usb support not enabled

If you see 'USB support not enabled', confirm to use option -usb at startup.

-usb This option adds pseudo USB mouse device to a guest OS. -usbdevice tablet When a guest OS has a driver for USB tablet, a mouse doesn't need to click in the guest OS windows to capture. -usbdevice host:xxxx:yyyy A USB device xxxx:yyyy on a host OS can be used from a guest OS.

3.)Press Ctrl-Alt-2 and check USB device ID of host OS in QEMU monotor.

 

 Then connect USB device (0951:1665) to the guest OS. 0951 is a vender ID and 1665 is a product ID.

(qemu) usb_add host:0951:1665

 Finally, PnP manager of WindowsXP guest recognizes USB mouse and a device driver is installed.

4.)When you want to remove the USB device, remove USB device in guest OS. For example, right click on task bar and select remove the device. The mouse doesn't need to do this. Then check a number of USB bus and address in QEMU monitor.

Use usb_del in QEMU monitor. 0.3 means that the bus number is 0 and the address of USB device is 3.

(qemu) usb_del 0.3

Then remove USB device in host OS. For example, right click on the task bar and remove the USB device as in guest OS. The mouse doesn't need to do this.

After that, unplug the USB device on your machine.



【本文地址】

公司简介

联系我们

今日新闻


点击排行

实验室常用的仪器、试剂和
说到实验室常用到的东西,主要就分为仪器、试剂和耗
不用再找了,全球10大实验
01、赛默飞世尔科技(热电)Thermo Fisher Scientif
三代水柜的量产巅峰T-72坦
作者:寞寒最近,西边闹腾挺大,本来小寞以为忙完这
通风柜跟实验室通风系统有
说到通风柜跟实验室通风,不少人都纠结二者到底是不
集消毒杀菌、烘干收纳为一
厨房是家里细菌较多的地方,潮湿的环境、没有完全密
实验室设备之全钢实验台如
全钢实验台是实验室家具中较为重要的家具之一,很多

推荐新闻


图片新闻

实验室药品柜的特性有哪些
实验室药品柜是实验室家具的重要组成部分之一,主要
小学科学实验中有哪些教学
计算机 计算器 一般 打孔器 打气筒 仪器车 显微镜
实验室各种仪器原理动图讲
1.紫外分光光谱UV分析原理:吸收紫外光能量,引起分
高中化学常见仪器及实验装
1、可加热仪器:2、计量仪器:(1)仪器A的名称:量
微生物操作主要设备和器具
今天盘点一下微生物操作主要设备和器具,别嫌我啰嗦
浅谈通风柜使用基本常识
 众所周知,通风柜功能中最主要的就是排气功能。在

专题文章

    CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭