Description of problem: Trying to assign a vgpu for Intel i915 devices ( i915-GVTg_V5_4 and i915-GVTg_V5_8) appears to fail because regex does not allow "_" How reproducible: Always Steps to Reproduce: 1. Configure i915 vgpus. 2. Open Manage vGPU for the VM in question 3. See list of vgpus. Assign one to the VM. Actual results: No error message is displayed however the vgpu is not assigned Expected results: vgpu should be assigned to the VM. Additional info: Watching the developer console in Chrome we see: URL with submission as: https://<host>/ovirt-engine/api/vms/<guid> with a submission of: {custom_properties: {custom_property: [{name: "mdev_type", value: "i915-GVTg_V5_4"}]}} This all looks fine, however it responds with a 400 error and this payload: { "detail" : "[Cannot edit VM if some of the specified custom properties have illegal values. The keys are: mdev_type]", "reason" : "Operation Failed" } Taking it a step further, if we Edit the VM, select custom properties, from the drop down select mdev_type, enter i915-GVTg_V5_4, and press OK, the UI validation shows: the value for parameter <mdev_type> should be in the format of: <^[^,](,?[0-9A-za-z-]+)+$> It's pretty clear that _ needs to be added to that regex match. This prevents you from assigning i915 vgpus to vms.
It appears very similar to https://bugzilla.redhat.com/show_bug.cgi?id=1829830 /cc: @
@
mdev_type does not have _ as one of it's characters, as you can see in /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select option_value from vdc_options where option_name like 'PredefinedVMProperties' and version like '4.6' ;" option_value --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_-]*):(true|false))(,(([a-zA-Z0-9_-]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$; mdev_type=^[^,](,?[0-9A-Za-z-]+)+$; hugepages=^[0-9]+$;scsi_hostdev=^(scsi_generic|scsi_block|scsi_hd|virtio_blk_pci)$;nvram_template=^.*$;extra_cpu_flags=^([+-]?[a-zA-Z0-9_-]+)(,[+-]?[a-zA-Z0-9_-]+)*$ (1 row)
version 4.5 and 4.4 also do not have _ in their regex for mdev_type
If you follow the instructions from https://access.redhat.com/solutions/5050081 with a slight modification: /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select fn_db_update_config_value('PredefinedVMProperties', 'sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_-]*):(true|false))(,(([a-zA-Z0-9_-]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$;mdev_type=^[^,](,?[0-9A-Za-z_-]+)+$;hugepages=^[0-9]+$;scsi_hostdev=^(scsi_generic|scsi_block|scsi_hd|virtio_blk_pci)$;nvram_template=^.*$;extra_cpu_flags=^([+-]?[a-zA-Z0-9_-]+)(,[+-]?[a-zA-Z0-9_-]+)*$', '4.6'); (note, the versions 4.5 and 4.4 also have incorrect settings for mdev_type, so you'll need to adjust those as well, with slightly different text I believe) You can assign the vgpu in both the vgpu screen as well as the custom properties screen. Once mapped, in my VM I see 06:00.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04) Looks like it's working, just needs an update to the next db upgrade script.
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.
Verification builds: ovirt-engine-4.4.8.2-0.11.el8ev vdsm-4.40.80.3-1.el8ev.x86_64 libvirt-daemon-7.0.0-14.3.module+el8.4.0+11878+84e54169.x86_64 qemu-kvm-5.2.0-16.module+el8.4.0+11923+e8b883e4.4.x86_64 Verification scenario: Verified without GVTg hardware 1. Verify it is possible to add custom property -> mdev_type: i915-GVTg_V5_4 - custom properties textbox is not marked with red frame (as in previous build) - when clicking "ok" button in eit VM dialog, the new configuration is applied.
This bugzilla is included in oVirt 4.4.8 release, published on August 19th 2021. Since the problem described in this bug report should be resolved in oVirt 4.4.8 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.