Bug 1406304 - V2V import fails on vm entity validation because vm.vmStatic.maxMemorySizeMb is None
Summary: V2V import fails on vm entity validation because vm.vmStatic.maxMemorySizeMb ...
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: ovirt-4.1.0-rc
Assignee: Shahar Havivi
QA Contact: sefi litmanovich
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs 1371843
TreeView+ depends on / blocked
Reported: 2016-12-20 08:55 UTC by sefi litmanovich
Modified: 2017-02-01 14:43 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-02-01 14:43:42 UTC
oVirt Team: Virt
rule-engine: ovirt-4.1+
rule-engine: blocker+
rule-engine: planning_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)
engine log (88.54 KB, text/plain)
2016-12-20 08:55 UTC, sefi litmanovich
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1408577 'unspecified' 'CLOSED' 'Update vm pool via REST API fails because vm.vmStatic.maxMemorySizeMb is None' 2019-12-04 00:08:44 UTC
oVirt gerrit 68871 'None' 'MERGED' 'core: vm.vmStatic.maxMemorySizeMb is None' 2019-12-04 00:08:44 UTC
oVirt gerrit 68890 'None' 'MERGED' 'core: vm.vmStatic.maxMemorySizeMb is None' 2019-12-04 00:08:44 UTC

Internal Links: 1408577

Description sefi litmanovich 2016-12-20 08:55:21 UTC
Created attachment 1233751 [details]
engine log

Description of problem:

importing a vm from an external provider (tried with KVM and VmWare) fails because the guaranteed memory or vm.vmStatic.maxMemorySizeMb value is not populated and so vm validation fails with the following error:

Error while executing action:


    must be greater than or equal to 1
    Attribute: vm.vmStatic.maxMemorySizeMb

In engine log:

2016-12-20 10:34:53,320+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmsFullInfoFromExternalProviderVDSCommand] (default task-13) [1beb6368-6759-4c98-96b5-9b26181a0b95] START, GetVmsFullInfoFromExternalProviderVDSCommand(HostName = host_mixed_2, GetVmsFromExternalProviderParameters:{runAsync='true', hostId='0109aaf3-e2e4-4dbe-b155-41b7950bb0a9', url='vpx://administrator@', username='administrator', originType='VMWARE', namesOfVms='[win7_auto]'}), log id: 352709b
2016-12-20 10:34:55,203+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmsFullInfoFromExternalProviderVDSCommand] (default task-13) [1beb6368-6759-4c98-96b5-9b26181a0b95] FINISH, GetVmsFullInfoFromExternalProviderVDSCommand, return: [VM [win7_auto]], log id: 352709b
2016-12-20 10:35:18,280+02 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmFromExternalProviderCommand] (default task-2) [941c5232-bab1-436c-b401-0e71268c413a] Validation of action 'ImportVmFromExternalProvider' failed for user admin@internal-authz. Reasons: VAR__ACTION__IMPORT,VAR__TYPE__VM,must be greater than or equal to 1,$groups [Ljava.lang.Class;@4a08d46b,$message {javax.validation.constraints.Min.message},$payload [Ljava.lang.Class;@729cab2e,$value 1,ACTION_TYPE_FAILED_ATTRIBUTE_PATH,$path vm.vmStatic.maxMemorySizeMb

This is happening with any vm from the two providers I tried to import with.
On 4.0 I can import vms from these providers with no trouble at all.

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

How reproducible:

Steps to Reproduce:
1. Add an external vm provider (either in external providers or on the fly in import vm menu)
2. Load the list of vms from the provider and choose one vm.
3. Click ok on the final menu of import dialog

Actual results:
import fails with the following msg:

Error while executing action:


    must be greater than or equal to 1
    Attribute: vm.vmStatic.maxMemorySizeMb

Expected results:
Import succeeds

Additional info:

Comment 1 Shahar Havivi 2016-12-21 07:31:47 UTC
its looks like regression from this patch https://gerrit.ovirt.org/#/c/67747/

Comment 2 Red Hat Bugzilla Rules Engine 2016-12-26 08:51:35 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Richard W.M. Jones 2017-01-02 22:11:18 UTC
We could (also) add this field to the virt-v2v output, but what
value should be set here?

Comment 4 kuwei@redhat.com 2017-01-04 02:04:21 UTC
The problem about import vm fails also exist in rhv4.0.6.

Comment 5 kuwei@redhat.com 2017-01-04 12:06:54 UTC
Hi,when i using virt-v2v convert  a regular ova file to rhv4.0.6. After successful convention,when i import the guest but it was failed.

And it's error log not the same as above engine-log.
I want to know if the two issue  are the same.

2017-01-04 16:55:29,420 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-4) [48c46eff] Correlation ID: 48c46eff, Job ID: 615aa25c-3aca-4392-b666-efbdb826aca8, Call Stack: null, Custom Event ID: -1, Message: Failed to import Vm rhel6u8-export to Data Center mig, Cluster mig
2017-01-04 16:55:29,428 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmCommand] (org.ovirt.thread.pool-6-thread-4) [48c46eff] Lock freed to object 'EngineLock:{exclusiveLocks='[rhel6u8-export=<VM_NAME, ACTION_TYPE_FAILED_NAME_ALREADY_USED>, 33944bad-cfc9-429d-8bb7-76b6dd673263=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName rhel6u8-export>]', sharedLocks='[33944bad-cfc9-429d-8bb7-76b6dd673263=<REMOTE_VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName rhel6u8-export>]'}'

Comment 6 Shahar Havivi 2017-01-04 12:29:27 UTC
This is a different issue,
The bug reported on wrong validation validation message due to regression caused by bz 388245 fix, (and on 4.1 only).

You can send a question to users@ovirt.org with vdsm and engine logs and the particular scenario (you can cc me).

Comment 7 sefi litmanovich 2017-01-16 16:47:58 UTC
Verified on ovirt-engine-4.1.0-0.4.master.20170116141310.gita30debd.el7.centos according to steps in description.

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