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@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@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
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.htm...
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@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@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
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@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@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
On 27.4.2011 12.18, Rainer Traut wrote:
So # /usr/libexec/qemu-kvm
should get you going.
Hei, thanks! So it is there, just not in the path. There may be a reason to why it is hidden... But I may have to give it a try soon.
I suppose kvm virtualization is still so young and rapidly evolving that there are no good (up-to-date) tutorials, no best practices etc. Makes me feel like a damn pioneer without a compass. I would like a little more of the comfy armchair.
- Jussi
I'm so glad we are still on Xen :-) Especially with para-virt CentOS running in all the VMs, anyway, it seems hardly to be beaten.
Kai
On Wed, Apr 27, 2011 at 2:29 AM, Jussi Hirvi listmember@greenspot.fi wrote: [...]
There may be a reason to why it is hidden... But I may have to give it a try soon.
I suspect the reason it is hidden is that KVM is "best" used with a front-end like libvirt, which would provide the interface to add a disk (e.g. virsh attach-disk).
(Unfortunately libvirt frustrates me with the way it's difficult to manage config files for your guests (like I could with /etc/xen/* ...) with cfengine/puppet. Files in /etc/libvirt/qemu are not friendly to direct edits.)
Eric