RE: attach hot usb device

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

 



No go for me, maybe I'm running the wrong version of virsh?

virsh # attach-device XPJohn usbPhone2.xml
libvir: QEMU error : unknown device type
error: Failed to attach device from usbPhone2.xml

virsh # version
Compiled against library: libvir 0.4.0
Using library: libvir 0.4.0
Using API: QEMU 0.4.0
Running hypervisor: QEMU 0.9.1

[root@e6400:/etc/libvirt/ 482]$virsh list
Connecting to uri: qemu:///system
 Id Name                 State
----------------------------------
  1 XPJohn               running
  2 ubuntuVNC            running
  3 webserver            running
  4 XPTest               running

[root@e6400:/etc/libvirt/ 481]$lsusb
Bus 007 Device 004: ID 0bb4:0b2e High Tech Computer Corp.
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

[root@e6400:/etc/libvirt/ 481]$cat usbPhone2.xml
<hostdev mode='subsystem' type='usb'>
      <source>
        <address bus='7' device='4'/>
      </source>

What am I doing wrong?

-Jay

> -----Original Message-----
> From: Cole Robinson [mailto:crobinso@xxxxxxxxxx]
> Sent: Sunday, February 22, 2009 6:09 PM
> To: Fedora/Linux Management Tools
> Cc: Libvirt; jmandawg@xxxxxxxxxxx
> Subject: Re:  attach hot usb device
> 
> 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