Bug 1951483 - [RFE] Allow importing OVA to template
Summary: [RFE] Allow importing OVA to template
Keywords:
Status: CLOSED DUPLICATE of bug 1941581
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-20 09:00 UTC by Juan Orti
Modified: 2024-10-01 17:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-20 20:52:34 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) 5972341 0 None None None 2021-04-20 09:00:39 UTC

Description Juan Orti 2021-04-20 09:00:39 UTC
Description of problem:
It should be possible to import an OVA directly to a template using the REST API.

Now it is possible to export a template to OVA, but not the opposite.

Version-Release number of selected component (if applicable):
ovirt-engine-4.4.5.11-0.1.el8ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Export a template to OVA:

# curl -v -k --request POST \
    --header 'Version: 4' \
    --header 'Accept: application/xml' \
    --header 'Content-Type: application/xml' \
    -d '
<action>
  <host>
    <name>host01.example.com</name>
  </host>
  <directory>/var/tmp</directory>
  <filename>export-test.ova</filename>
</action>' \
    -u 'admin@internal:PASSWORD' \
    https://rhvm.example.com/ovirt-engine/api/templates/e0923990-cdbf-41d3-b73a-969c05060681/export


2. Try to import it using a POST call to /ovirt-engine/api/externalvmimports

# curl -v -k --request POST \
    --header 'Version: 4' \
    --header 'Accept: application/xml' \
    --header 'Content-Type: application/xml' \
    -d '
<external_vm_import>
  <vm>
    <name>import-test</name>
  </vm>
  <cluster id="00000002-0002-0002-0002-000000000246" />
  <storage_domain id="6814fac1-2e9a-4ab3-bbfe-02a14c2049fe" />
  <name>RHEL8_3</name>
  <sparse>true</sparse>
  <provider>kvm</provider>
  <host>
    <name>host01.example.com</name>
  </host>
  <url>ova:///var/tmp/export-test.ova</url>
</external_vm_import>' \
    -u 'admin@internal:PASSWORD' \
    https://rhvm.example.com/ovirt-engine/api/externalvmimports


Actual results:
externalvmimports only works for VMs and you cannot specify to import it as a template.

Expected results:
Be able to import templates directly.

Additional info:

Comment 2 Arik 2021-04-20 20:52:34 UTC

*** This bug has been marked as a duplicate of bug 1941581 ***


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