Bug 1438682
| Summary: | [RFE] add support for qemu-xhci | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Gerd Hoffmann <kraxel> |
| Component: | libvirt | Assignee: | Pavel Hrdina <phrdina> |
| Status: | CLOSED ERRATA | QA Contact: | Han Han <hhan> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.4 | CC: | chhu, drjones, dyuan, dzheng, gsun, jiyan, jsuchane, kraxel, lmen, mrezanin, mtessun, phrdina, rbalakri, xuzhang |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.2.0-4.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-02 00:05:54 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: | |||
| Bug Depends On: | 1446570, 1451189 | ||
| Bug Blocks: | 1173757 | ||
|
Description
Gerd Hoffmann
2017-04-04 08:06:54 UTC
v1 posted upstream: https://www.redhat.com/archives/libvir-list/2017-April/msg00958.html Upstream commits:
commit 278e70f8f8bac9e6482099d7f3f1a7a8f2109b5f
Author: Pavel Hrdina <phrdina>
Date: Thu Apr 13 12:25:25 2017 +0200
qemu: add support for qemu-xhci USB controller
commit 568887a32f9985b95d998dd0d675255ea985013f
Author: Pavel Hrdina <phrdina>
Date: Thu Apr 27 17:56:41 2017 +0200
qemu: use qemu-xhci USB controller by default for ppc64 and aarch64
Verify it on libvirt-3.2.0-6.virtcov.el7.x86_64 qemu-kvm-rhev-2.9.0-7.el7.x86_64
1. Test the max ports of qemu-xhci
Edit a VM, set qemu-xhci ports as 16 and save it:
<controller type='usb' index='0' model='qemu-xhci' ports='16'/>
error: unsupported configuration: 'qemu-xhci' controller only supports up to '15' ports
Failed. Try again? [y,n,i,f,?]:
Then set ports as 15, attach 15 disks to the usb controller:
+ sudo virsh attach-disk pc /exports/sda.img sda --targetbus usb
Disk attached successfully
+ sudo virsh attach-disk pc /exports/sdb.img sdb --targetbus usb
Disk attached successfully
....
+ sudo virsh attach-disk pc /exports/sdp.img sdp --targetbus usb
Disk attached successfully
Check all disks are in guest. Then detech them:
+ sudo virsh detach-disk pc sda
Disk detached successfully
+ sudo virsh detach-disk pc sdb
Disk detached successfully
...
+ sudo virsh detach-disk pc sdp
Disk detached successfully
2. Start a guest with following devices(disk, hostdev, mouse, keyboard, tablet, hub, redirdev) attach to qemu-xhci controller:
...
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/exports/raw'/>
<target dev='sda' bus='usb'/>
<address type='usb' bus='0' port='2'/>
</disk>
<hostdev mode='subsystem' type='usb' managed='no'>
<source>
<vendor id='0x0930'/>
<product id='0x6545'/>
</source>
<address type='usb' bus='0' port='6'/>
</hostdev>
<input type='mouse' bus='usb'>
<address type='usb' bus='0' port='3'/>
</input>
<input type='keyboard' bus='usb'>
<address type='usb' bus='0' port='4'/>
</input>
<input type='tablet' bus='usb'>
<address type='usb' bus='0' port='5'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</rng>
<hub type='usb'>
<address type='usb' bus='0' port='7'/>
</hub>
...
Check all devices works well.
Migrate the guest to RHEL7.3 host:
# virsh migrate pc qemu+ssh://xxxxx/system --verbose --unsafe
root.eng.pek2.redhat.com's password:
error: unsupported configuration: Unknown model type 'qemu-xhci'
Migrate the guest to RHEL7.4 host:
# virsh migrate pc qemu+ssh://xxx/system --verbose --unsafe
Migration: [100 %]
gsun, please check if the controller works well on ppc. Thks. Test with
libvirt-libs-3.2.0-7.el7.ppc64le
qemu-kvm-rhev-2.9.0-7.el7.ppc64le
1. Test the max ports of qemu-xhci
Edit a VM, set qemu-xhci ports as 16 and save it:
<controller type='usb' index='0' model='qemu-xhci' ports='16'/>
error: unsupported configuration: 'qemu-xhci' controller only supports up to '15' ports
Failed. Try again? [y,n,i,f,?]:
2. set ports as 15, attach 13 disks to the usb controller (2 left for usb mouse and usb keyboard)
# virsh attach-disk vm1 /home/test/sda.img sda --targetbus usb --sub-driver qcow2
Disk attached successfully
...
Check all disks are working well in guest. Then detech them ok.
3. Start a guest with following devices(disk, hostdev, mouse, keyboard, tablet, hub, redirdev) attach to qemu-xhci controller
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/home/dzheng/sd2'/>
<backingStore/>
<target dev='sda' bus='usb'/>
<alias name='usb-disk0'/>
<address type='usb' bus='0' port='3'/>
</disk>
<input type='tablet' bus='usb'>
<alias name='input0'/>
<address type='usb' bus='0' port='5'/>
</input>
<input type='keyboard' bus='usb'>
<alias name='input1'/>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='usb'>
<alias name='input2'/>
<address type='usb' bus='0' port='2'/>
</input>
<hostdev mode='subsystem' type='usb' managed='no'>
<source>
<vendor id='0x1d6b'/>
<product id='0x0003'/>
<address bus='2' device='1'/>
</source>
<alias name='hostdev0'/>
<address type='usb' bus='0' port='6'/>
</hostdev>
<hub type='usb'>
<alias name='hub0'/>
<address type='usb' bus='0' port='7'/>
</hub>
Check all devices works well.
4. Migrate
Migrate the guest to RHEL7.3 host:
# virsh migrate vm1 qemu+ssh://xxxxx/system --verbose --unsafe
...
error: unsupported configuration: Unknown model type 'qemu-xhci'
Migrate the guest to RHEL7.4 host:
# virsh migrate vm1 qemu+ssh://xxx/system --verbose --unsafe
Migration: [100 %]
PASS.
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, 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/RHEA-2017:1846 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, 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/RHEA-2017:1846 |