[libvirt] Re: [et-mgmt-tools] attach hot usb device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]