Bug 2020241
| Summary: | [nodedev-list] mdev naming changed breaking virt-install hostdev support | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | smitterl | |
| Component: | virt-manager | Assignee: | Jonathon Jongsma <jjongsma> | |
| Status: | CLOSED ERRATA | QA Contact: | smitterl | |
| Severity: | urgent | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 8.6 | CC: | bugproxy, fjin, hongzliu, jjongsma, juzhou, thuth, tstaudt, tzheng, virt-maint, virt-qe-z, xiaodwan, yafu, yalzhang | |
| Target Milestone: | rc | Keywords: | Regression, Triaged | |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | virt-manager-3.2.0-1.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2023650 (view as bug list) | Environment: | ||
| Last Closed: | 2022-05-10 13:54:55 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: | ||||
| Bug Blocks: | 1954569, 1995125 | |||
|
Description
smitterl
2021-11-04 12:32:49 UTC
The manpage doesn't explicitly say the name must be "mdev_(uuid.replace(-, _))" but IMO it the naming should not change and it's address for the host dev is really just the uuid, not the additional piece from the css (0.0.26ac): "A node device key is generally specified by the bus name followed by its address, using underscores between all components." (In reply to smitterl from comment #1) > The manpage doesn't explicitly say the name must be "mdev_(uuid.replace(-, > _))" but IMO it the naming should not change and it's address for the host > dev is really just the uuid, not the additional piece from the css > (0.0.26ac): ... the additional piece, seemingly the parent device Related upstream patch - https://github.com/virt-manager/virt-manager/pull/319 ------- Comment From tstaudt.com 2021-11-10 08:33 EDT------- The fix for this bug is sent to upstream mailing list for approval. https://listman.redhat.com/archives/virt-tools-list/2021-November/msg00001.html Test on X86_64 platform: Failed
Package version:
virt-install-3.2.0-1.el8.noarch
virt-manager-3.2.0-1.el8.noarch
libvirt-7.9.0-1.module+el8.6.0+13150+28339563.x86_64
qemu-kvm-6.1.0-5.module+el8.6.0+13430+8fdd5f85.x86_64
Steps:
1. List node devices with capability mdev:
➜ ~ virsh nodedev-list --cap mdev
mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0
mdev_341c76dc_ef0e_4d23_8a9d_a223d935ae40_0000_21_00_0
2. Dumpxml for the mdev device:
➜ ~ virsh nodedev-dumpxml mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0
<device>
<name>mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0</name>
<path>/sys/devices/pci0000:20/0000:20:01.1/0000:21:00.0/25069f48-ceee-4c6a-a6f8-156fd7cf3e11</path>
<parent>pci_0000_21_00_0</parent>
<driver>
<name>vfio_mdev</name>
</driver>
<capability type='mdev'>
<type id='nvidia-231'/>
<uuid>25069f48-ceee-4c6a-a6f8-156fd7cf3e11</uuid>
<iommuGroup number='122'/>
</capability>
</device>
3. Install a VM via virt-install cmdline with the hostdev:mdev
➜ ~ virt-install --memory 4096 --location http://download.devel.redhat.com/rhel-8/composes/RHEL-8/RHEL-8.6.0-20211128.3/compose/BaseOS/x86_64/os/ --disk /home/virt-install.img,size=10 --hostdev mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0 --extra-args "inst.ks=http://fileshare.englab.nay.redhat.com/pub/section3/run/http-ks/ks-rhel8u4-x86_64.cfg console=ttyS0" --initrd-inject /home/ks-rhel8u4-x86_64.cfg
Using default --name rhel8
Starting install...
Retrieving file vmlinuz... | 9.9 MB 00:00:00
Retrieving file initrd.img... | 77 MB 00:00:01
Allocating 'virt-install.img' | 10 GB 00:00:00
Removing disk 'virt-install.img' | 0 B 00:00:00
ERROR internal error: qemu unexpectedly closed the monitor: 2021-12-01T06:38:47.819213Z qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.nrip-save [bit 3]
2021-12-01T06:38:47.819220Z qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-12-01T06:38:47.820043Z qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.npt [bit 0]
2021-12-01T06:38:47.820061Z qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.nrip-save [bit 3]
2021-12-01T06:38:47.820069Z qemu-kvm: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-12-01T06:38:47.846929Z qemu-kvm: -device vfio-pci,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/25069f48-ceee-4c6a-a6f8-156fd7cf3e11,display=off,ramfb=off,bus=pci.5,addr=0x0: Property 'vfio-pci.ramfb' not found
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start rhel8
otherwise, please restart your installation.
Test result:
As above, failed to install the VM with mdev device.
And I confirmed with the feature owner, we won't clone the Bug 2024435 from RHEL-9.0.0 to RHEL-8.6.0.
My plan is to verify this bug again with the next rebase of libvirt package and reset the ITM to 16, thanks.
So Sebastian, what's your opinion about resetting to ITM16, and feel free to reset it based on your plan.
Try to verify this bug with following packages:
libvirt-7.10.0-1.module+el8.6.0+13502+4f24a11d.x86_64
virt-install-3.2.0-1.el8.noarch
virt-manager-3.2.0-1.el8.noarch
libvirt-7.10.0-1.module+el8.6.0+13502+4f24a11d.x86_64
qemu-kvm-6.1.0-5.module+el8.6.0+13430+8fdd5f85.x86_64
Steps:
1. List node devices with capability mdev:
➜ ~ virsh nodedev-list --cap mdev --inactive
mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0
mdev_341c76dc_ef0e_4d23_8a9d_a223d935ae40_0000_21_00_0
mdev_39be1f71_9b55_462a_a3d0_3db3d0f6c215_0000_41_00_0
➜ ~ virsh nodedev-start mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0
Device mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0 started
➜ ~ virsh nodedev-list --cap mdev
mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0
2. Dumpxml for the mdev device:
➜ ~ virsh nodedev-dumpxml mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0
<device>
<name>mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0</name>
<path>/sys/devices/pci0000:20/0000:20:01.1/0000:21:00.0/25069f48-ceee-4c6a-a6f8-156fd7cf3e11</path>
<parent>pci_0000_21_00_0</parent>
<driver>
<name>vfio_mdev</name>
</driver>
<capability type='mdev'>
<type id='nvidia-231'/>
<uuid>25069f48-ceee-4c6a-a6f8-156fd7cf3e11</uuid>
<iommuGroup number='122'/>
</capability>
</device>
3. Install a VM via virt-install cmdline with the hostdev:mdev
➜ ~ virt-install --memory 4096 --location http://download.devel.redhat.com/rhel-8/composes/RHEL-8/RHEL-8.6.0-20211128.3/compose/BaseOS/x86_64/os/ --disk /home/virt-install.img,size=10 --hostdev mdev_25069f48_ceee_4c6a_a6f8_156fd7cf3e11_0000_21_00_0 --extra-args "inst.ks=http://fileshare.englab.nay.redhat.com/pub/section3/run/http-ks/ks-rhel8u4-x86_64.cfg console=ttyS0" --initrd-inject /home/ks-rhel8u4-x86_64.cfg
Test result - VM can be installed and reboot successfully.
4. Check the mdev related XML file of the VM.
➜ virsh dumpxml rhel8
...
<hostdev mode='subsystem' type='mdev' managed='yes' model='vfio-pci' display='off' ramfb='off'>
<source>
<address uuid='25069f48-ceee-4c6a-a6f8-156fd7cf3e11'/>
</source>
<alias name='hostdev0'/>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</hostdev>
...
Test result - The format of the UUID dumps from the VM keeps consistent with the output of step2.
Summary - It works as expected on the X86_64 platform, thanks.
Hi Sebastian, Could you help double-check it on the s390x platform, if it works well then I'll move this bug to VERIFIED status, thanks? BR, juzhou. Verified with:
virt-manager-3.2.0-1.el8.noarch
# virt-install --memory 2049 --vcpus 2 --disk none --print-xml --hostdev mdev_cf7b0443_545b_4971_8c84_dbf7a8fbfd7b_0_0_26aa
<domain type="kvm">
<name>vm1</name>
<uuid>2cbda1e9-fb69-4f61-953e-22bd8cb2efe0</uuid>
<memory>2098176</memory>
<currentMemory>2098176</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch="s390x" machine="s390-ccw-virtio">hvm</type>
<boot dev="hd"/>
</os>
<clock offset="utc"/>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<interface type="network">
<source network="default"/>
<mac address="52:54:00:3d:63:ad"/>
<model type="virtio"/>
</interface>
<console type="pty">
<target type="sclp"/>
</console>
<channel type="unix">
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
<hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
<source>
<address uuid="cf7b0443-545b-4971-8c84-dbf7a8fbfd7b"/>
</source>
</hostdev>
</devices>
</domain>
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-manager 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-2022:1862 |