Bug 1873771 - Improve the VMCreationFailed error message caused by VM low memory
Summary: Improve the VMCreationFailed error message caused by VM low memory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: SSP
Version: 2.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 2.6.0
Assignee: Karel Šimon
QA Contact: Ilanit Stein
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-30 04:25 UTC by Ilanit Stein
Modified: 2021-03-10 11:19 UTC (History)
4 users (show)

Fixed In Version: kubevirt-template-validator-container-v2.6.0-4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-10 11:18:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt-template-validator pull 58 0 None closed update error message for integer rule 2021-01-19 09:47:26 UTC
Red Hat Product Errata RHSA-2021:0799 0 None None None 2021-03-10 11:19:14 UTC

Description Ilanit Stein 2020-08-30 04:25:58 UTC
Description of problem:

Import a VM from RHV to CNV, that has a lower memory than the minimum defined in the vm-template, results with this error message:

"The virtual machine could not be imported.
VMCreationFailed: Error while creating virtual machine default/v2v-cirros-vm-for-tests: admission webhook "virt-template-admission.kubevirt.io" denied the request: This VM requires more memory.: Some of values [1073741824] are not in interval [1610612736, N/A]"


Please change this error message, so that it won't include N/A, and would be more clear:
  
"The virtual machine could not be imported.
VMCreationFailed: Error while creating virtual machine default/v2v-cirros-vm-for-tests: admission webhook "virt-template-admission.kubevirt.io" denied the request: This VM requires more memory.: VM memory: [1073741824], while minimum required memory is [1610612736]"


In addition,
please fix the case of "[N/A, 1610612736]", which means memory between 0 and 1610612736, into: 
"value should be within this interval [0, 1610612736]" 

Version-Release number of selected component (if applicable):
OCP-4.5.5/CNV-2.4.1

Comment 1 Ilanit Stein 2020-08-30 04:28:27 UTC
This bug is originated from Bug 1871433

Comment 4 Ilanit Stein 2021-01-07 16:23:56 UTC
Verified on cnv-2.6.0 iib-34076 hco-v2.6.0-400

Now the error message is improved:

"Import error (RHV)
v2v-cirros-vm-for-tests could not be imported.
MappingRulesVerificationFailed: Source VM memory 1073741824 is lower than 1610612736 enforced by rhel8-desktop-medium-v0.11.3 template."

Comment 7 errata-xmlrpc 2021-03-10 11:18:00 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: OpenShift Virtualization 2.6.0 security and bug fix update), 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:0799


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