qemu & USB devices
Posted: Fri Jan 09, 2009 10:22 am
I'm using QEMU with kqemu and qemulator to run virtual machines on Ubuntu Hardy. Runs like a charm, even on an (already older) AMD 64 3500+
In order to use USB devices within the virtual machines, you must make the deprecated "/proc/bus/usb" available. Thanks to the instructions found in "Howto: Install VirtualBox in Ubuntu Hardy Heron with USB Support in 5 easy Steps!", it was no problem.
Simply do the following:
1) Open /etc/init.d/mountdevsubfs.sh in your favorite text editor - as root (!).
2) Look for this code:
3) Uncomment the last 4 lines to make it look like this:
Now either restart your computer or simply type the following command into a console:
4) In Qemulator, enable USB support for your virtual machine:
- Select "My Machines"
- "show settings" and select "Hardware". Check "enable usb" in the lower right corner.
- Start the virtual machine
- in Qemulator, open the "Running jobs" tab and right-click on your virtual machine entry and click "open control monitor"
5) In the control monitor, you have a tab called "USB" where you should now see all attached USB devices in the upper half.
Just select a device you want to use and click "add". It should now show up in the virtual system as if it had just been plugged in.
Enjoy!
open the "Running jobs" tab and right-click on the
In order to use USB devices within the virtual machines, you must make the deprecated "/proc/bus/usb" available. Thanks to the instructions found in "Howto: Install VirtualBox in Ubuntu Hardy Heron with USB Support in 5 easy Steps!", it was no problem.
Simply do the following:
1) Open /etc/init.d/mountdevsubfs.sh in your favorite text editor - as root (!).
2) Look for this code:
Code: Select all
#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usbCode: Select all
#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usbIf all went well, the output of "ls /proc/bus/usb/" will match the output of "ls /dev/bus/usb/" - making the devices available to Qemulator's device list.sudo /etc/init.d/mountdevsubfs.sh start
4) In Qemulator, enable USB support for your virtual machine:
- Select "My Machines"
- "show settings" and select "Hardware". Check "enable usb" in the lower right corner.
- Start the virtual machine
- in Qemulator, open the "Running jobs" tab and right-click on your virtual machine entry and click "open control monitor"
5) In the control monitor, you have a tab called "USB" where you should now see all attached USB devices in the upper half.
Just select a device you want to use and click "add". It should now show up in the virtual system as if it had just been plugged in.
Enjoy!
open the "Running jobs" tab and right-click on the