Bug 1724928
Summary: | Guest with 'passthrough' input device fails to start with '' is not a valid device model name | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Meina Li <meili> |
Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
Status: | CLOSED ERRATA | QA Contact: | Lili Zhu <lizhu> |
Severity: | unspecified | Docs Contact: | |
Priority: | low | ||
Version: | 8.0 | CC: | chhu, dyuan, fjin, jdenemar, jsuchane, jtomko, lizhu, xuzhang, yalzhang |
Target Milestone: | rc | ||
Target Release: | 8.3 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-6.2.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-11-17 17:44:46 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
Meina Li
2019-06-28 06:27:47 UTC
commit 59bc34a1d1dc317d84da81a19f4992856ac0fa8c Author: Ján Tomko <jtomko> CommitDate: 2020-03-04 12:14:39 +0100 conf: default to virtio bus for input passthrough Other buses are not supported. Signed-off-by: Ján Tomko <jtomko> Reviewed-by: Daniel Henrique Barboza <danielhb413> commit 33bc3ffe545cb04b7f48cc3354c37d7ac5cc3ee0 Author: Ján Tomko <jtomko> CommitDate: 2020-03-04 12:14:38 +0100 conf: only allow virtio bus for input passthrough Other buses are not supported. Signed-off-by: Ján Tomko <jtomko> https://bugzilla.redhat.com/show_bug.cgi?id=1724928 Reviewed-by: Daniel Henrique Barboza <danielhb413> git describe: v6.1.0-22-g59bc34a1d1 Verify this bug with: libvirt-daemon-6.5.0-1.module+el8.3.0+7323+d54bb644.x86_64 1. prepare a guest and edit the xml # virsh edit avocado-vt-vm1 .... <input type='passthrough' bus='ps2' > <source evdev='/dev/input/event1'/> </input> .... or .... <input type='passthrough' bus='usb' > <source evdev='/dev/input/event1'/> </input> error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Extra element devices in interleave Element domain failed to validate content Failed. Try again? [y,n,i,f,?]: 2. prepare a xml snippet with bus type usb or ps2 # cat pass.xml <input type='passthrough' bus='usb'> <source evdev='/dev/input/event1'/> </input> # virsh attach-device avocado-vt-vm1 pass.xml error: Failed to attach device from pass.xml error: XML error: only bus 'virtio' is supported for 'passthrough' input devices # cat pass.xml <input type='passthrough' bus='ps2'> <source evdev='/dev/input/event1'/> </input> # virsh attach-device avocado-vt-vm1 pass.xml error: Failed to attach device from pass.xml error: internal error: ps2 bus does not support passthrough input device 3. edit the xml, and set the bus type as virtio # virsh edit avocado-vt-vm1 .... <input type='passthrough' bus='virtio' > <source evdev='/dev/input/event1'/> </input> .... Domain avocado-vt-vm1 XML configuration edited. # virsh dumpxml avocado-vt-vm1 | grep "<input type='passthrough'" -A3 <input type='passthrough' bus='virtio'> <source evdev='/dev/input/event1'/> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </input> # virsh start avocado-vt-vm1 Domain avocado-vt-vm1 started 4. prepare a xml snippet with no bus type ]# cat pass.xml <input type='passthrough'> <source evdev='/dev/input/event1'/> </input> 5. attach the input device to guest # virsh attach-device avocado-vt-vm1 pass.xml Device attached successfully 6. check the guest xml # virsh dumpxml avocado-vt-vm1 |grep "<input type='passthrough'" -A4 <input type='passthrough' bus='virtio'> <source evdev='/dev/input/event1'/> <alias name='input3'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </input> The default bus type for input device is "virtio" As the testing result matches with the expected ones, mark the bug as verified Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:8.3 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:5137 |