KVM virtualization is full of wonders. :-/ I would need to attach an USB disk to a vm, but how? The command "qemu" would provide a way: [root at a134-224 yum.repos.d]# man qemu-kvm> QEMU(1) > NAME > qemu-doc - QEMU Emulator User Documentation > > SYNOPSIS > usage: qemu [options] [disk_image](...)> -usbdevice devname > Add the USB device devname.But when I try it: [root at a134-224 yum.repos.d]# qemu start -usbdevice host:059f:1018 mail -bash: qemu: command not found That command syntax is probably ot right yet, but the main question is, where is qemu? I was tempted to yum-install qemu from rpmforge, but I would rather not. Besides the rpmforge version has a conflict with another manual page. - Jussi -- Jussi Hirvi * Green Spot Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi at greenspot.fi * http://www.greenspot.fi
Jussi Hirvi
2011-Apr-27 09:12 UTC
[CentOS-virt] Attach USB drive (Re: Where is my qemu command?)
Haha, I found a way to attach the USB drive to my kvm guest. It is a little cumbersome (involves editing the xml conf), but it works!! Victories seem to be far between, so better enjoy. :-) http://david.wragg.org/blog/2009/03/using-usb-pass-through-under-libvirt.html Limitations: you have to restart the guest, and the USB device must be attached at that time. After mounting the usb drive on the guest, it took at least 10 seconds for it to appear at the mount point. First I thought the mount failed. When I came back to check, the contents was there. - Jussi On 27.4.2011 11.39, Jussi Hirvi wrote:> KVM virtualization is full of wonders. :-/ > > I would need to attach an USB disk to a vm, but how? > > The command "qemu" would provide a way: > > [root at a134-224 yum.repos.d]# man qemu-kvm > >> QEMU(1) >> NAME >> qemu-doc - QEMU Emulator User Documentation >> >> SYNOPSIS >> usage: qemu [options] [disk_image] > (...) >> -usbdevice devname >> Add the USB device devname. > > But when I try it: > > [root at a134-224 yum.repos.d]# qemu start -usbdevice host:059f:1018 mail > -bash: qemu: command not found > > That command syntax is probably ot right yet, but the main question is, > where is qemu? > > I was tempted to yum-install qemu from rpmforge, but I would rather not. > Besides the rpmforge version has a conflict with another manual page. > > - Jussi > >-- Jussi Hirvi * Green Spot Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi at greenspot.fi * http://www.greenspot.fi
Am 27.04.2011 10:39, schrieb Jussi Hirvi:> KVM virtualization is full of wonders. :-/ > > I would need to attach an USB disk to a vm, but how? > > The command "qemu" would provide a way: > > [root at a134-224 yum.repos.d]# man qemu-kvm > >> QEMU(1) >> NAME >> qemu-doc - QEMU Emulator User Documentation >> >> SYNOPSIS >> usage: qemu [options] [disk_image] > (...) >> -usbdevice devname >> Add the USB device devname. > > But when I try it: > > [root at a134-224 yum.repos.d]# qemu start -usbdevice host:059f:1018 mail > -bash: qemu: command not found > > That command syntax is probably ot right yet, but the main question is, > where is qemu? > > I was tempted to yum-install qemu from rpmforge, but I would rather not. > Besides the rpmforge version has a conflict with another manual page. >Yeah, you hit a bug in the man page. Because qemu-kvm (thats the right name) is not meant to run directly it resides here: # rpm -ql kvm|grep qemu /usr/libexec/qemu-kvm /usr/share/man/man1/qemu-kvm.1.gz So # /usr/libexec/qemu-kvm should get you going. Rainer