Description of problem: After finding BZ1895217 I was trying to find out how VMs can exist without small/large_icon_id set in vm_static, while they do have an OS set. It happens with imported VMs. If it's created by the engine it always has the icons set, unless it comes from a template related to a previous import. Also, just by opening VM->Edit and clicking OK, without any change, the icon is set (seems like frontend code loads the OS default if no icon is set, and then this is written back). Restarting the engine also sets the icons on initialization. So the VM without icon in vm_static exists under the following conditions: * Imported * Never Edited * Engine not restarted But for example, when importing from OVA, which contains the OS info, the engine correctly sets the os field properly, but doesn't set the *_icon_id fields to the defaults for that OS. But it would do after a restart or "edit" the VM, which sounds a bit wrong. But I don't think this behaviour causes any problem except that it serves as a trigger for BZ1895217. Version-Release number of selected component (if applicable): rhvm-4.4.2.6-0.2.el8ev.noarch How reproducible: Always Steps to Reproduce: 1. Create VM with OS set to RHEL, confirm it has icon set in the DB engine=# select vm_name,small_icon_id from vms where vm_name = 'x'; vm_name | small_icon_id --------------+-------------------------------------- x | 032ee027-bf1c-4833-bef1-0da4b10cb60e 2. Export VM to OVA via Admin Portal Note, it contains the OS info: # tar -xvf x.ova vm.ovf # cat vm.ovf | xmllint -format - | grep "Guest Operating" -A1 <Info>Guest Operating System</Info> <Description>Red Hat Enterprise Linux 7.x x64</Description> 3. Delete the VM 4. Import the OVA, see the OS was filled, but not its default icons engine=# select vm_name,os,small_icon_id from vms where vm_name = 'x'; vm_name | os | small_icon_id --------------+----+-------------------------------------- x | 24 | 5. VM->Edit-> OK (No changes), and the icon is now set engine=# select vm_name,os,small_icon_id from vms where vm_name = 'x'; vm_name | os | small_icon_id --------------+----+-------------------------------------- x | 24 | 032ee027-bf1c-4833-bef1-0da4b10cb60e Actual results: * VM is without icon set in the DB if imported Expected results: * Since the VM has OS specified, default icon for the OS can be set when importing
Verified on RHV 4.4.4-6. All looks good to me. Env: - Engine instance with RHV 4.4.4-6 (ovirt-engine-4.4.4.5-0.10.el8ev) and RHEL 8.3 installed. - 2 hosts with RHV 4.4.4-6 and RHEL 8.3, 3 hosts with vdsm-4.40.40-1.el8ev Steps: In Admin Portal: 1. Create a 4.5 data center and a 4.5 cluster. 2. Install the host and create a new NFS storage domain. 3. Create a VM with a disk with RHEL 8.3 installed and OS set to RHEL 8 and wait for its creation. 4. Confirm it has icon set in the DB. 5. Export VM to OVA via Admin Portal. 6. Confirm the Exported OVA contains the OS info. 7. Delete the VM. 8. Import the OVA. 9. Verify the OS was filled and the icon were set in the DB. Results (As Expected): 1. The 4.5 data center and the 4.5 cluster were created. 2. The host was installed and the NFS storage domain was created. 3. The VM with the disk was created. 4. The icon was set in the DB. 5. The VM was exported to OVA via Admin Portal. 6. The Exported OVA contains the OS info. 7. The VM was deleted. 8. The OVA was imported. 9. The OS was filled and the icon were set in the DB.
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 (RHV Engine and Host Common Packages 4.4.z [ovirt-4.4.4]), 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-2021:0312