Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1576382 - no VM name validation on import from OVF
Summary: no VM name validation on import from OVF
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.2.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.2.4
: ---
Assignee: Shmuel Melamud
QA Contact: Liran Rotenberg
Whiteboard: v2v
: 1581749 (view as bug list)
Depends On:
Blocks: 1574666 1581742
TreeView+ depends on / blocked
Reported: 2018-05-09 10:35 UTC by Michal Skrivanek
Modified: 2018-06-26 08:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-06-26 08:42:24 UTC
oVirt Team: Virt
rule-engine: ovirt-4.2+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
oVirt gerrit 91661 0 master MERGED core: Move validation groups to ImportVmCommandBase 2018-05-27 17:06:57 UTC
oVirt gerrit 91662 0 ovirt-engine-4.2 MERGED core: Move validation groups to ImportVmCommandBase 2018-05-28 07:35:11 UTC

Description Michal Skrivanek 2018-05-09 10:35:35 UTC
Seems we do not validate VM name when using ImportVmFromConfiguration, see bug 1574666

Comment 1 Michal Skrivanek 2018-05-28 15:51:21 UTC
*** Bug 1581749 has been marked as a duplicate of this bug. ***

Comment 2 Liran Rotenberg 2018-06-14 11:25:09 UTC
Verified on:

Steps of verification:
1. Create a VM with special chars in the name on VMWare(e.g vm_!@#$%_$_special_chars)
2. Import the VM via REST

Importing the VM failed as expected:
2018-06-13 16:34:25,264+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmsFullInfoFromExternalProviderVDSCommand] (default task-29) [externalvmimports_create_c55bc931-00] FINISH, GetVmsFullInfoFromExtern
alProviderVDSCommand, return: [VM [vm_!@#$%_$_special_chars]], log id: 17682cd6
2018-06-13 16:34:25,332+03 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmFromExternalProviderCommand] (default task-29) [3b1bb8f9] Validation of action 'ImportVmFromExternalProvider' failed for user admi
63e,$groups [Ljava.lang.Class;@532bad96,ACTION_TYPE_FAILED_ATTRIBUTE_PATH,$path vm.vmStatic.name,$validatedValue vm_!@#$%_$_special_chars
2018-06-13 16:34:25,351+03 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-29) [] Operation Failed: [Can not import VM. The given name contains special characters. Only lower-
case and upper-case letters, numbers, '_', '-', '.' are allowed., Attribute: vm.vmStatic.name]

Comment 3 Sandro Bonazzola 2018-06-26 08:42:24 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

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