Re: 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

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux