Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1560553

Summary: VMs imported from OVAs miss properties compared to ones imported from an export domain
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.2CC: ahadas, bugs, lveyde, michal.skrivanek, nsimsolo
Target Milestone: ovirt-4.2.4Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.4.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-26 08:34:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log
none
vdsm.log
none
ovirt-export-ova-validate-ansible log
none
ovirt-export-ova-ansible log
none
ovirt-query-ova-ansible log
none
ovirt-import-ova-ansible log none

Description Nisim Simsolo 2018-03-26 12:37:04 UTC
Description of problem:
Importing VM from OVA file with a lot of VM configuration parameters succeed, but some configuration is missing (without covering the whole possible VM configuration):
- Pin to host
- Host devices attached
- Cloud-init/Sysprep
- IO threads
- Attached CD with ISO image
- CPU topology


Version-Release number of selected component (if applicable):
rhvm-4.2.2.5-0.1.el7
libvirt-client-3.9.0-14.el7_5.2.x86_64
qemu-kvm-rhev-2.10.0-21.el7_5.1.x86_64
vdsm-4.20.23-1.el7ev.x86_64
sanlock-3.6.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Export VM as OVA with the next configuration:
 2 different disks, iSCSI and NFS
 3 NICs
 instance type - large
 Total 4 virtual CPU with 2 threads per core
 Clout init enabled, set timezone authentication and custom script
 smart card enabled
 VirtIO serial enabled
 console USB support enabled
 host - pinned
 HA enabled
 VirtIO-SCSI enabled
 IO threads enabled
 Attach CD - with windows image
 boot menu - enabled
 RNG /dev/urandom enabled
 vGPU mdev_type - add Nvidia instance
 VFIO passthrough - attach device
2. Delete source VM and import this OVA.
3.

Actual results:
Not all configuration is set on the imported VM.

Expected results:
All content should be included in OVF.

Additional info:
engine.log, vdsm.log and ovirt-ova export import logs attached.

Comment 1 Nisim Simsolo 2018-03-26 13:13:34 UTC
Created attachment 1413151 [details]
engine.log

Comment 2 Nisim Simsolo 2018-03-26 13:14:02 UTC
Created attachment 1413152 [details]
vdsm.log

Comment 3 Nisim Simsolo 2018-03-26 13:14:32 UTC
Created attachment 1413153 [details]
ovirt-export-ova-validate-ansible log

Comment 4 Nisim Simsolo 2018-03-26 13:15:13 UTC
Created attachment 1413154 [details]
ovirt-export-ova-ansible log

Comment 5 Nisim Simsolo 2018-03-26 13:15:39 UTC
Created attachment 1413155 [details]
ovirt-query-ova-ansible log

Comment 6 Nisim Simsolo 2018-03-26 13:15:59 UTC
Created attachment 1413157 [details]
ovirt-import-ova-ansible log

Comment 7 Michal Skrivanek 2018-04-12 12:28:25 UTC
need a bit more time

Comment 8 Arik 2018-05-15 08:25:24 UTC
CPU topology should be fixed by bz 1558614

Comment 9 Arik 2018-05-22 06:42:00 UTC
Looking at the missing pieces that are mentioned above, they can be divided into two groups:
(1) Things were saved/restored when using an export domain and are not saved/restored properly when using an OVA. Those fields include: Pinned hosts, Could-init/Sysprep, threads per CPI (which is different than IO thread that seems to be handled fine), CPU topology.
(2) Things that were not saved/restored properly from an export domain as well. Those fields include: Host devices attached, Attached CD with ISO image.

The posted patches address the first group.
The second group is more complex to solve and there should be no rush in providing these fields as they are missing in export domains for quite a while.

Nisim, how about changing this bug to be specific for:
- Pin to host
- Cloud-init/Sysprep
- Threads per CPU
- CPU topology

And file new bugs for the additional fields?

Comment 10 Nisim Simsolo 2018-05-22 10:30:22 UTC
Done, please see https://bugzilla.redhat.com/show_bug.cgi?id=1581196

Comment 11 Arik 2018-05-27 08:53:15 UTC
Not all patches made it before the tagging.

Comment 12 Nisim Simsolo 2018-06-11 12:45:17 UTC
Reassigned:
1. Cloud-init custom script after OVA import is in raw and not the same as source VM format:

-  source VM custom script example:
yum_repos:
    # The name of the repository
    epel-testing:
        # Any repository configuration options
        # See: man yum.conf
        #
        # This one is required!
        baseurl: http://download.fedoraproject.org/pub/epel/testing/5/$basearch
        enabled: false
        failovermethod: priority
        gpgcheck: true

- Destination VM custom script example:
yum_repos:# The name of the repositoryepel-testing:# Any repository configuration options# See: man yum.conf## This one is required!baseurl: http://download.fedoraproject.org/pub/epel/testing/5/enabled: falsefailovermethod: prioritygpgcheck: true

2. Sysprep, organization name and system locale are missing on destination VM,

Verification version:
rhvm-4.2.4.2-0.1.el7_3
vdsm-4.20.30-1.el7ev.x86_64
libvirt-client-3.9.0-14.el7_5.6.x86_64
qemu-kvm-rhev-2.10.0-21.el7_5.3.x86_64

Comment 13 Arik 2018-06-14 13:04:21 UTC
(In reply to Nisim Simsolo from comment #12)
Nisim, let me suggest to change this bug so it will cover all the missing things in VMs imported from OVAs compared to VMs imported from an export domain. We really should provide the same functionality as with export domains (changed the title accordingly).

Other gaps that exist for export domains as well, like the ones you detailed in comment 12, are harder to fix and are probably not so important. Please file a separate bug(s) for those issues.

Comment 14 Nisim Simsolo 2018-06-14 13:54:21 UTC
Verified: 
rhvm-4.2.4.2-0.1.el7_3
vdsm-4.20.30-1.el7ev.x86_64
libvirt-client-3.9.0-14.el7_5.6.x86_64
qemu-kvm-rhev-2.10.0-21.el7_5.3.x86_64

Comment 15 Sandro Bonazzola 2018-06-26 08:34:59 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 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.