Bug 1897422 - Virtual Machine imported from OVA has no small/large_icon_id set in vm_static
Summary: Virtual Machine imported from OVA has no small/large_icon_id set in vm_static
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.4.2
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ovirt-4.4.4
: 4.4.4
Assignee: Arik
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-13 03:41 UTC by Germano Veit Michel
Modified: 2024-03-25 17:03 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.4.4.1
Doc Type: Bug Fix
Doc Text:
Previously, virtual machines that were imported from OVA files were not set with small or large icons. In this release, small/large icons are set according to the operating system the Virtual Machine is configured with during import from OVA files. Consequently, virtual machines that are imported from OVA files are set with small and large icons.
Clone Of:
Environment:
Last Closed: 2021-02-02 13:58:29 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5551981 0 None None None 2020-11-13 03:55:30 UTC
Red Hat Product Errata RHBA-2021:0312 0 None None None 2021-02-02 13:58:35 UTC
oVirt gerrit 112241 0 master MERGED core: set icons for vm imported from ova 2021-02-15 08:49:43 UTC

Description Germano Veit Michel 2020-11-13 03:41:29 UTC
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

Comment 2 Tamir 2020-12-24 18:06:37 UTC
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.

Comment 6 errata-xmlrpc 2021-02-02 13:58:29 UTC
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


Note You need to log in before you can comment on or make changes to this bug.