Bug 1004926

Summary: [spice-gtk] Redirecting a USB device to a VM_Guest warns with "There are no free USB channels"
Product: [Fedora] Fedora Reporter: PaulB <pbunyan>
Component: spice-gtkAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: alevy, berrange, bpeck, cfergeau, crobinso, hdegoede, jburke, marcandre.lureau, pbunyan, sandmann, virt-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-10 15:41:11 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:
Attachments:
Description Flags
warning-message none

Description PaulB 2013-09-05 18:41:56 UTC
Description of problem:
 Using a Fedora19 Host with a Windows7 VM_Guest installed.
 Redirecting a USB device to the Windows7 x64 VM_Guest, we see the 
 following issue:
 When you start the VM_Win7Guest and select  
 File->USB device selection   you _are_ able to check the box
 next to the USB device you inserted. However, we see a warning
 (an exclamation point inside a yellow triangle) that states 
 "There are no free USB channels". However, once I click the close 
 button, the USB device is detected and accessible by the VM_Win7Guest.

Version-Release number of selected component (if applicable):
 kernel                  3.9.5-301.fc19.x86_64
 qemu-kvm.x86_64         2:1.4.2-3.fc19  
 qemu-kvm-tools.x86_64   2:1.4.2-7.fc19 
 qemu-guest-agent.x86_64 2:1.4.2-3.fc19 
 libverto.x86_64         0.2.5-2.fc19  
 virt-manager.noarch     0.10.0-0.5.gitde1695b2.fc19 
 virt-viewer.x86_64      0.5.6-1.fc19

How reproducible:
 Consistently

Steps to Reproduce:
1. In virt-manager-> Show virtual hardware details
    -Display-> type spice 
    -Video-> model QXL
    -Controller USB-> type USB / model USB2
    -Add hardware-> USB redirection-> spice channel
2. virt-viewer --connect qemu:///system $VM_Guest
3. From task bar: 
    File->USB device selection
4. Check the box next to your inserted USB device
5. Warning message appears 
    (see attached image: warning-message)

Actual results:
 I see a warning message that states "There are no free USB channels".  
 However, once I click the close button, the USB device is detected 
 and accessible by the VM_Win7Guest.

Expected results:
 No warning message

Additional info:
 This is a follow up from the following BZ:
 https://bugzilla.redhat.com/show_bug.cgi?id=1003083

Comment 1 PaulB 2013-09-05 18:45:01 UTC
All,
Just an FYI...
Modifying /etc/libvert/quemu/$VM_GuestName.xml to include the xml snippet from
http://hansdegoede.livejournal.com/11084.html
the warning message does not appear.

[] stop VM_Guest with virt-manger
[] service libvertd stop
[] vi /etc/libvert/quemu/$VM_GuestName.xml
   Comment out -or- remove <controller type='usb'> xml entries
   Add in xml from here, as instructed:
    http://hansdegoede.livejournal.com/11084.html
[] service libvertd start
[] start VM_Guest with virt-manager
[] view VM_Guest 
    virt-viewer --connect qemu:///system $VM_Guest
[] Select  File->USB device selection  you _are_ able to check the box next 
   to the USB device you inserted without the warning message. 


Best,
-pbunyan

Comment 2 PaulB 2013-09-05 18:45:37 UTC
Created attachment 794445 [details]
warning-message

Comment 3 Marc-Andre Lureau 2013-09-05 18:55:34 UTC
(In reply to PaulB from comment #2)
> Created attachment 794445 [details]
> warning-message

Presumably because Hans XML had 4 redir devices. If you have the same number, you should get the same result.

Comment 4 Hans de Goede 2013-09-06 09:59:41 UTC
The warning + exclamation mark is intended behavior, the info box at the top containing the warning is there to explain why some devices are grayed out / why you cannot select any other devices to redirect.

As is seen in the screen-shot the line for the selected device is not grayed out, and unchecking it will clear the warning, and you've noticed the device is redirected and works fine.

Closing this as notabug.

One possible improvement would be for the warning to read "There are no more free USB channels" rather then "There are no free USB channels", would that be more clear ?

Comment 5 PaulB 2013-09-09 20:31:11 UTC
Hans,
Thank you for the explanation.
After reading your comment#4, I understand.

I think this should be improved, as it is confusing enough to require an explanation. As it seems to me when you "select the check box" the warning appears, making one feel they have created an issue.

Regarding possible improvement:
[] Can we have multiple USB channels by default?
[] Could we use bullets rather than check boxes,
   when only one option is permissible?

Best,
-pbunyan

Comment 6 Hans de Goede 2013-09-09 20:34:51 UTC
(In reply to PaulB from comment #5)
> Hans,
> Thank you for the explanation.
> After reading your comment#4, I understand.
> 
> I think this should be improved, as it is confusing enough to require an
> explanation. As it seems to me when you "select the check box" the warning
> appears, making one feel they have created an issue.
> 
> Regarding possible improvement:
> [] Can we have multiple USB channels by default?

Yes, and this is what all the howto-s advise one to do.

> [] Could we use bullets rather than check boxes,
>    when only one option is permissible?

No.

I still consider this not a bug.