In our HOWTO we describe a task when you can use some USB device in VM under Rosa Virtualization (oVirt 3.5).
Or some more.... even iPod or iPhone :)
Before we start, I have to say about some important restrictions you need to know:
In this example we use simple 8GB FAT32 USB flash drive, which is mounted on host system in /mnt
Our host system is named "hammer2" (See on Picture 2).
VM, which we use USB device for, is named rels67_min (ip — 192.168.231.108, FQDN — "rels76minimal").
At least, our HOWTO (you must be root or use sudo to grant access):
1. Attach your USB device to your host system in DC (in our case we use "hammer2")
2. Install on your host system (in our case on "hammer2"), and install on your host running oVirt-engine (in our case we use host "head") vdsm-hook-hostusb package:
yum install vdsm-hook-hostusb
3. On your oVirt-engine host run:
engine-config -s UserDefinedVMProperties='hostusb=[\w:&]+'
After your oVirt-engine will ask you to point appropriate oVirt version.
In our case we choose 3.5 (press 6 on keyboard).
4. Run on oVirt-engine host (on host "head"):
5. Run on host system (run on host "hammer2", where USB device has been attached):
6. Check USB device on host system:
(if you can not run lsusb install usbutils package: yum install usbutils)
In our example we see our USB device as:
Bus 001 Device 004: ID 8564:1000 Transcend Information, Inc. JetFlash
Look at Picture 1.
7. Open VM properties (right mouse click and choose Edit in menu). Virtual machine must be powered off, when you edit its properties.
Attach your VM to specific host (see on Picture 3, we choose host "hammer2"), where your USB device is.
8. In Custom Properties menu a new option Please select a key appears. Choose hostusb and write USB device ID, but do not forget to write prefix 0x. So in our case we write 0x8564:0x1000
See on Picture 4
9. Run your VM as usual, use SSH, VNC, SPICE, etc, to check USB device status:
Look at Picture 1.
Now you can mount your USB device inside your VM.