
11 Oct
2007
11 Oct
'07
7:50 a.m.
John Davey wrote:
I am experimenting with the following Redhat 9 kvm on Fedora 7.
How do I add a USB device with Libvirt? Specifically I'd like to add a usb-serial converter for logging data. "Man qemu-kvm" shows -usbdevice devname to add a USB device but I cannot find out how to do this with libvirt.
Libvirt will only use "-usbdevice table" or "-usbdevice mouse" depending on the input device you've selected. A hack I've found useful for modifying the kvm command-line arguments is to change the <emulator> tag to point to a shell script that invokes kvm as you'd like. For example, /etc/libvirt/kvm-wrapper containing: #!/bin/sh exec /usr/bin/qemu-kvm "$@" -usbdevice host:1234:5678 might do the trick. -jim