Bug 1941581

Summary: [RFE] Add to API external template import
Product: Red Hat Enterprise Virtualization Manager Reporter: Martin Necas <mnecas>
Component: ovirt-engineAssignee: Liran Rotenberg <lrotenbe>
Status: CLOSED ERRATA QA Contact: Qin Yuan <qiyuan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.5CC: ahadas, bugs, dfodor, jortialc, michal.skrivanek, mperina
Target Milestone: ovirt-4.4.7Keywords: FutureFeature, ZStream
Target Release: 4.4.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.7.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-22 15:12:33 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:
Bug Depends On:    
Bug Blocks: 1937408    

Description Martin Necas 2021-03-22 12:19:47 UTC
Description of problem:

Currently, we don't have a way to import a template directly from the OVA image.
We can only import VM from OVA with ExternalVmImportsService and then create a template.
It is possible to import the template directly in UI.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Try to import template directly from OVA 
2.
3.

Actual results:
There is no possibility to import the template

Expected results:
Be able to import template as in UI.

Additional info:

Comment 2 Arik 2021-04-20 20:52:31 UTC
*** Bug 1951483 has been marked as a duplicate of this bug. ***

Comment 6 Qin Yuan 2021-06-22 14:17:07 UTC
Verified with:
ovirt-engine-4.4.7.4-0.9.el8ev.noarch

Steps:
1. Create a VM with disk and nic(used template latest-rhel-guest-image-8.3-infra)
2. Export the VM as OVA
3. Remove the VM
4. Import the OVA as template via API:
<external_template_import>
  <template>
    <name>test_template</name>
  </template>
  <cluster id="ebe46dfb-b465-48a5-b12e-a4282c0ec8c8" />
  <storage_domain id="91ada0e9-c34d-4e06-9f1d-d91ec5ada62d" />
  <url>ova:///root/test.ova</url>
  <host id="192294f9-a1ed-44f4-bcad-8bbc88c71d1f" />
</external_template_import>
5. Create a VM from the imported template
6. Start, stop, migrate the VM

Results:
1. Importing OVA as template succeeds.
2. Creating VM from the imported template succeeds.
3. Starting, stopping, migrating VM created from the imported template succeed.

Comment 12 errata-xmlrpc 2021-07-22 15:12:33 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 (Moderate: RHV Manager (ovirt-engine) security update [ovirt-4.4.7]), 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/RHSA-2021:2865