[Libvir] how to setup usb/serial ports with libvirt & kvm (Fedora 7)

John Davey john at davey.net.au
Thu Oct 11 13:33:23 UTC 2007


> 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.

Thanks Jim,

A wrapper containing

#!/bin/sh
exec /usr/bin/qemu-kvm "$@" -serial /dev/ttyUSB0

Did the trick nicely for me mapping the usb/serial converter plugged into
the host machine to /dev/ttyS0 on the virtual guest machine.

I've now got the virtual guest (RH9) transferred & logging data from the
serial port.
Regards John





More information about the libvir-list mailing list