
23 Feb
2009
23 Feb
'09
12:08 a.m.
cc-ing libvir-list (future libvirt questions should be directed there) jmandawg wrote:
Hi,
Quick question, since I can’t get to the qemu monitor anymore, how do I hot add a usb device (smartphone)?
Is it possible to do through virsh?
Sure: - Use 'lsusb' to determine the bus and device. Example listing looks like: Bus 001 Device 006: ID 0781:5151 SanDisk Corp. Cruzer Micro 256/512MB Flash Drive - Put hostdev xml in a file: cat << __EOF__ > usb.xml <hostdev mode='subsystem' type='usb'> <source> <address bus='1' device='6'/> </source> </hostdev> __EOF__ - Run 'virsh attach-device {VMNAME} usb.xml' on a running VM. Hope that helps, Cole