Created attachment 1752100 [details] custom amount of RAM Description of problem: Trying to import a VM from RHC with the wizard, I'm not able to import a VM if the amount of ram on RHV doesn't match what is defined in a specific template. See the attached screenshot. Version-Release number of selected component (if applicable): 2.6.0 How reproducible: 100% Steps to Reproduce: 1. try to import a VM with a custom amount of ram from RHV 2. 3. Actual results: the import process starts only if the VM is configured on RHV matching a specific template, the only workaround I found is editing the VM in RHV before the import to match template. Expected results: i'm able to import a VM with an arbitrary amount of ram. Additional info:
Created attachment 1752101 [details] RAM as in the template
This has a very high impact while transitioning from an oVirt / RHV datacenter toward a OpenShift Virtualization solution, especially if you have a huge number of VMs to import.
By the "custom amount of RAM" attachment, the VM import failed because the source VM had memory size smaller than the minimum required memory enforced by the picked template. The source VM memory size must be equal or larger than the minimum required memory defined in the picked template. We have this very recent fix - Bug 1894824 - that will pick the smallest template for the imported VM OS, and not always the Medium. That should lower the VM minimum memory required. @Omer, Can we improve the current error message from: "Source VM memory <X> is lower than <Y> enforced by <Z> template." into: "Source VM memory <X> is lower than the minimum required memory <Y>, enforced by <Z> template." This way it would be more clear to users that the source VM should have at least the template's min required memory or above. and not interpret it wrongly, as reported in this bug, that VM memory need to be equal to the template's min required memory.
Hi Ilanit, The error message shown in the attachment is actually not from template-validator, it's probably vm-import-operator wrapping template-validator's error. The error that tempalte-validator provides for this case is: ".spec.domain.resources.requests.memory: This VM requires more memory.: value 1073741824 is lower than minimum [1610612736]"
@Omer, thanks. Apparently, Bug 1894824 (Moved to ON_QA on Jan 10 2021) also changed the behavior in such way that VM imports from RHV/VMware provider via vmio will no longer validate that the source VM minimum requirements (like memory) match the value mentioned in the picked template. and the error message on the minimum required memory will no longer appear too. Bug 1894824 actually fixes this bug. Marking this bug as duplicate of bug 1894824. *** This bug has been marked as a duplicate of bug 1894824 ***