Bug 1323268

Summary: USB isn't passed automatically at KVM VM start. Can't boot from USB.
Product: [Fedora] Fedora Reporter: javiertury
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: berrange, crobinso, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-03 17:22:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description javiertury 2016-04-01 16:30:32 UTC
Description of problem:

virt-manager doesn't automatically pass the configured USB devices during machine bootup.

How reproducible:

Create a virtual machine, add a bootable USB redirection and select that bootable device as the only one in boot options. Start the machine and enter the boot menu. The USB device won't be listed as it wasn't passed when the machine was started. Go to "Virtual Machine" > "Redirect USB device" and enable it, now restart and it will boot as expected.

Steps to Reproduce:
1. Create a new virtual machine from virt-manager's gui. 
2. Click "Add Hardware" and add a USB controller
2. Click "Add Hardware" and add a USB Host Device to pass a physical bootable USB device attached to your computer.
3. Click "Add Hardware" and add a USB redirection.
4. In boot options enable "boot menu" and disable everything but the USB device added in step 2
5. Start the VM
6. Enter the boot menu(press F12 quickly after starting the VM)

Actual results:

There is no entry to select the USB device. Press ESC to exit the menu and the bios won't boot as the USB device wasn't passed.

Steps for workaround:

1. Continuing from above, while in the boot menu go to the upper toolbar, go to "Virtual Machine" > "Redirect USB Device" and enable your bootable USB device
2. Go to the upper toolbar, click the arrow next to the switch button/icon and select "Force Reset". The machine will restart.
3. Enter the boot menu(press F12 quickly after restarting the VM)
4. Now you'll see the bootable USB device. Select it and and it should boot.

Expected results:

I would expect an entry for the USB device in the boot menu


Additional info:

Comment 1 javiertury 2016-04-03 17:22:48 UTC
I checked the logs and the problem seems to be a SELinux denial that prevents qemu-system-x86_64 from accessing usb2 devices. I'll close this bug and file a correct one against qemu-system-x86