qemu动态设备管理(hotplug)

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))