Bug 1975076

Summary: Problems moving vm & templates between oVirt 4.4 & 4.3
Product: [oVirt] ovirt-engine Reporter: Guillaume Pavese <guillaume.pavese>
Component: GeneralAssignee: bugs <bugs>
Status: CLOSED NOTABUG QA Contact: Lukas Svaty <lsvaty>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.4.6.8CC: ahadas, bugs, sbonazzo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-23 07:23:52 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
ovirt-engine logs when ova import none

Description Guillaume Pavese 2021-06-23 05:24:55 UTC
Created attachment 1793318 [details]
ovirt-engine logs when ova import

On ovirt 4.4.6, I created a VM and made a template from it.
I would like to copy them to oVirt 4.3.10 DCs

I tried with Data Domain, Export domain, and OVA. All without success.


- Data Domain is not possible wetween 4.4 & 4.3 : If created on oVirt 4.4.6, I get a Format V5 DataDomain that my oVirt 4.3.10 refuses to import.
If created first on the oVirt 4.3 DC, I get a Format V4 Domain. But then importing it on the oVirt 4.4 DC, I get the message: "Approving this operation will upgrade the Storage Domain format from 'V4' to 'V5'. Note that you will not be able to attach it back to an older Data Center."

- Export Domain is deprecated. I tried exporting the VM & template to an Export Domain anyway but, after attaching the Export DOmain on my ovirt 4.3.7 DC, both VM and Template imports failed.

The Template import failed immediately without any errors visible in the UI, 
The VM import failed with the message "General command validation failure."

In engine.log, I see : 
2021-06-16 12:37:48,736+02 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmCommand] (default task-1939) [c865f249-d658-4e67-9813-bedd06e5d4d3] Error during ValidateFailure.: java.lang.IllegalArgumentExcepti
on: VM64BitMaxMemorySizeInMB has no value for version: 4.6


- OVA Imports of VM & Template fail too :

2021-06-16 16:06:39,449+02 ERROR [org.ovirt.engine.core.bll.CommandsFactory] (default task-7) [da051efc-4a1c-4146-b26e-a5419b69781b] An exception has occurred while trying to create a command object for command 'ImportVmTemplateFromOva' with parameters 'ImportVmTemplateFromOvaParameters:{commandId='a4e405b1-024b-4a42-a67c-986611fda292', user='null', commandType='Unknown'}': WELD-000049: Unable to invoke protected final void org.ovirt.engine.core.bll.CommandBase.postConstruct() on org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromOvaCommand@124e9537
2021-06-16 16:06:39,450+02 ERROR [org.ovirt.engine.core.bll.CommandsFactory] (default task-7) [da051efc-4a1c-4146-b26e-a5419b69781b] Exception: java.lang.IllegalArgumentException: VM64BitMaxMemorySizeInMB has no value for version: 4.6
...
2021-06-16 16:06:39,461+02 ERROR [org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner] (default task-7) [da051efc-4a1c-4146-b26e-a5419b69781b] Failed to execute multiple actions of type 'ImportVmTemplateFromOva': null
2021-06-16 16:06:39,461+02 ERROR [org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner] (default task-7) [da051efc-4a1c-4146-b26e-a5419b69781b] Exception: java.lang.NullPointerException
at org.ovirt.engine.core.bll.NestedCommandFactory.createWrappedCommand(NestedCommandFactory.java:24) [bll.jar:]
Expected results:


Additional info:

Comment 1 RHEL Program Management 2021-06-23 07:06:13 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 2 Arik 2021-06-23 07:23:52 UTC
Yeah, that makes sense as compatibility level 4.6 is not available in oVirt 4.3
Generally, you can import a VM that was exported from lower or same compatibility level.
In order to be able to import a VM that was exported from a latter version, you need to make sure the cluster compatibility level is not higher than the one you import the VM to.
Meaning that in oVirt 4.4, you can export a VM from a 4.2 or 4.3 cluster and should be able to import it to oVirt 4.2 or 4.3.
You can try to set custom compatibility level for that VM in oVirt 4.4 and export it - that might work.
Otherwise, you'll need to extract the OVA, and modify the OVF manually in order to adjust it to the compatibility level of the target cluster.

Comment 3 Guillaume Pavese 2021-06-23 07:33:21 UTC
From the UI, in VM settings, the only available "Custom Compatibility Version" I can set is 4.6
It's a real shame that there is no official way to export VM's between different Cluster versions.

The fact that oVirt is not supported either as a Provider (like KVM, XEN or vCenter are) is quite surprising too...
Should I open a RFE for that?

Comment 4 Arik 2021-06-23 07:45:14 UTC
(In reply to Guillaume Pavese from comment #3)
> From the UI, in VM settings, the only available "Custom Compatibility
> Version" I can set is 4.6

Ah yeah, if you've upgraded the storage pool to 4.6 (or created in with 4.6 compatibility level) then it's not possible to run the VM as if it were started in lower compatibility level.

> It's a real shame that there is no official way to export VM's between
> different Cluster versions.

There is, just not from a higher compatibility level to a lower one
 
> The fact that oVirt is not supported either as a Provider (like KVM, XEN or
> vCenter are) is quite surprising too...
> Should I open a RFE for that?

Providers were intended for interaction with external systems.
About RFE - it depends on what you expect this provider to do, even with a provider asking to export a VM from compatibility level X+Y to compatibility level X would be blocked..