Home

Advertisement

Customize

Linux - kvm - How to add multiple USB devices?

0)  Close the Virtual Machine Manager or any instance of VM

1) Edit the xml config file from your VM

Example:

shell> vi /etc/libvirt/qemu/NAME_OF_YOUR_VIRTUAL_MACHINE_HERE.xml

Add the following lines:

Example:

<devices> (do not include this line)
    <emulator>/usr/bin/qemu-kvm</emulator> (do not include this line)
   <hostdev mode='subsystem' type='usb'>
    <source>
           <vendor id='0xeb1a'/>
           <product id='0x2821'/>
    </source>
    </hostdev>

     <hostdev mode='subsystem' type='usb'>
     <source>
            <vendor id='0x046d'/>
            <product id='0x08d7'/>
     </source>
     </hostdev>

     <hostdev mode='subsystem' type='usb'>
     <source>
            <vendor id='0x0ac8'/>
            <product id='0x301b'/>
    </source>
    </hostdev>


3) Save and restart libvirt
shell> /etc/init.d/libvirtd restart

4) Now just start your VM and test if your usb was detectd:

shell from VM> lsusb

Comments

December 2009

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

Tags

Powered by LiveJournal.com

Advertisement

Customize