美文网首页
qemu动态设备管理(hotplug)

qemu动态设备管理(hotplug)

作者: Freboat | 来源:发表于2018-04-20 17:44 被阅读0次

1.  直接采用monitor管理

$qemu-kvm  -usb -monitor stdio
(qemu) device_add usb-host,vendorid=0x03f0,productid=0x134a,id=usb0               #增加usb设备
(qemu) device_del usb0                                                                                         #删除对应id的usb设备

2. 采用virsh管理:

virsh qemu-monitor-command --hmp testwin7 'device_del usb-host,vendorid=0x03f0,productid=0x134a,  id=usbxx0'   

删除: virsh qemu-monitor-command testwin7 --hmp "device_del usbx"
查询: virsh qemu-monitor-command testwin7 --hmp "info usb"

相关文章

网友评论

      本文标题:qemu动态设备管理(hotplug)

      本文链接:https://www.haomeiwen.com/subject/zyszkftx.html