Bug 1347550
Summary: | Libvirt should forbid configuring usb virtual disk and smartcard when usb controller model is none | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Pei Zhang <pzhang> |
Component: | libvirt | Assignee: | Virtualization Maintenance <virt-maint> |
Status: | CLOSED DEFERRED | QA Contact: | lijuan men <lmen> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.0 | CC: | dyuan, jdenemar, jsuchane, jtomko, rbalakri, xuzhang |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-4.3.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-02-11 13:17:59 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
Pei Zhang
2016-06-17 08:34:01 UTC
Since the USB addresses allocation, libvirt already reports an error: error: internal error: No free USB ports However the error message could be friendlier. Pushed upstream as: commit 1cdc9ecebd0bf22ea658b84c2466e2ea237f1897 Author: Ján Tomko <jtomko> CommitDate: 2018-03-07 14:10:46 +0100 qemu: report a nicer error when USB is disabled If the user tries to define a domain that has <controller type='usb' model='none'/> and also some USB devices, we report an error: error: internal error: No free USB ports Which is technically still correct for a domain with no USB ports. Change it to: USB is disabled for this domain, but USB devices are present in the domain XML https://bugzilla.redhat.com/show_bug.cgi?id=1347550 Signed-off-by: Ján Tomko <jtomko> git describe: v4.1.0-49-g1cdc9eceb test in version libvirt-4.5.0-9.el7.x86_64 when I test hostdev scenario,the result is still the same as step 4.2 in this bug's Description detailed steps: 1. define a guest like following ...... <controller type='usb' index='0' model='none'/> ...... 2.add usb hostdev to guest xml. #cat usb-host.xml <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x15e1'/> <product id='0x2007'/> </source> </hostdev> [root@localhost ~]# virsh edit test error: unsupported configuration: Can't add host USB device: USB is disabled ****in this host**** Failed. Try again? [y,n,i,f,?]: Does this error message need to be fixed? the results of other test scenarios are as followed,all pass version: libvirt-4.5.0-9.el7.x86_64 qemu-kvm-rhev-2.12.0-14.el7.x86_64 scenario1:smartcard 1. define a guest like following ...... <controller type='usb' index='0' model='none'/> ...... 2. virsh edit guest, add following xml : <controller type='ccid' index='0'/> <smartcard mode='passthrough' type='spicevmc'> <address type='ccid' controller='0' slot='0'/> </smartcard> [root@localhost ~]# virsh edit test error: unsupported configuration: USB is disabled for this domain, but USB devices are present in the domain XML Failed. Try again? [y,n,i,f,?]: scenario2:virtual usb disk 1. virsh edit guest, add virtual usb disk, save configuration #cat usb-virtual-disk.xml <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/sdb'/> <target dev='sde' bus='usb'/> </disk> 2.[root@localhost ~]# virsh edit test error: unsupported configuration: USB is disabled for this domain, but USB devices are present in the domain XML Failed. Try again? [y,n,i,f,?]: scenario3:rediredev 1.add usb rediredev to the guest #cat usb-redir.xml <redirdev bus='usb' type='spicevmc'> </redirdev> 2. [root@localhost ~]# virsh edit test error: unsupported configuration: USB is disabled for this domain, but USB devices are present in the domain XML Failed. Try again? [y,n,i,f,?]: scenario4:hub 1.add usb hub to guest <hub type='usb'> </hub> 2. [root@localhost ~]# virsh edit test error: unsupported configuration: Can't add USB hub: USB is disabled for this domain Failed. Try again? [y,n,i,f,?]: FailQA and move to RHEL7.7 due to the issue in comment5, please correct me if you are not agree with this solution, thx. This bug was closed deferred as a result of bug triage. Please reopen if you disagree and provide justification why this bug should get enough priority. Most important would be information about impact on customer or layered product. Please indicate requested target release. |