Bug 1404400 - virt-v2v fails to convert a vm from vmware to rhev if the disk name has a space.
Summary: virt-v2v fails to convert a vm from vmware to rhev if the disk name has a space.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.0.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.0-beta
: ---
Assignee: Shahar Havivi
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On: 1416112
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-13 18:23 UTC by Koutuk Shukla
Modified: 2020-04-15 14:59 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1409477 (view as bug list)
Environment:
Last Closed: 2017-04-25 00:55:16 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:0997 0 normal SHIPPED_LIVE Red Hat Virtualization Manager (ovirt-engine) 4.1 GA 2017-04-18 20:11:26 UTC
oVirt gerrit 69091 0 None MERGED core: import vm from external source cannot have space in disk alias 2021-02-12 17:48:08 UTC
oVirt gerrit 69125 0 None MERGED core: import vm from external source cannot have space in disk alias 2021-02-12 17:48:08 UTC
oVirt gerrit 69134 0 None MERGED core: import vm from external source cannot have space in disk alias 2021-02-12 17:48:08 UTC

Description Koutuk Shukla 2016-12-13 18:23:00 UTC
Description of problem:

virt-v2v fails to convert a vm from vmware to rhev if the disk name has a space.

Version-Release number of selected component (if applicable):
Red Hat Virtualization 4.0.5

How reproducible:
100 %

Steps to Reproduce:

1. Create a vm with a space in Disk name on VMware environment. 

2. Try to import this vm to the rhevm environment by connecting to a vmware environment OR by using already added vmware external environment.

Actual results:

Import of the vm fails with below error in the engine.log

"CanDoAction of action 'AddDisk' failed for user admin@internal. Reasons: VAR__ACTION__ADD,VAR__TYPE__VM_DISK,VALIDATION_DISK_ALIAS_INVALID"

Expected results:

Import of the vm should succeed regardless of the space in the disk name OR there should be a option to change the disk name while importing the vm.

Additional info:

Below workaround was used following which vm was imported sucessfully.
Removed the space in the disk name from Vmware environment.
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002491

Below are the engine.log when the import of the vm failed.

VMname: SERBVIDOR NOC-007
VM disk name: SERBVIDOR NOC-007.vmdk

2016-12-09 23:45:48,918 INFO  [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [1633ad28] Running command: ImportVmFromExternalProviderCommand internal: false. Entities affected :  ID: 178d4880-af35-48fa-88ff-e5a2b455d0bd Type: StorageAction group IMPORT_EXPORT_VM with role type ADMIN
2016-12-09 23:45:51,592 WARN  [org.ovirt.engine.core.bll.AddDiskCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] CanDoAction of action 'AddDisk' failed for user admin@internal. Reasons: VAR__ACTION__ADD,VAR__TYPE__VM_DISK,VALIDATION_DISK_ALIAS_INVALID
2016-12-09 23:45:51,595 ERROR [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Command 'org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand' failed: EngineException: Failed to create disk! (Failed with error ENGINE and code 5001)
2016-12-09 23:45:51,597 INFO  [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Command [id=fa425172-3cc0-4168-9a43-5205c2e11ba8]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics; snapshot: 5779ac50-a5a0-4fda-ace6-cb81b85f3d24.
2016-12-09 23:45:51,648 INFO  [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Command [id=fa425172-3cc0-4168-9a43-5205c2e11ba8]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; snapshot: 5779ac50-a5a0-4fda-ace6-cb81b85f3d24.
2016-12-09 23:45:51,662 INFO  [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Command [id=fa425172-3cc0-4168-9a43-5205c2e11ba8]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.VmStatistics; snapshot: 4213277a-1431-ae69-6eb2-a69c5b9c254b.
2016-12-09 23:45:51,666 INFO  [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Command [id=fa425172-3cc0-4168-9a43-5205c2e11ba8]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.VmDynamic; snapshot: 4213277a-1431-ae69-6eb2-a69c5b9c254b.
2016-12-09 23:45:51,668 INFO  [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Command [id=fa425172-3cc0-4168-9a43-5205c2e11ba8]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.Snapshot; snapshot: 3c904745-954d-480e-afe9-1d0eee4ee82e.
2016-12-09 23:45:51,670 INFO  [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Command [id=fa425172-3cc0-4168-9a43-5205c2e11ba8]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.VmStatic; snapshot: 4213277a-1431-ae69-6eb2-a69c5b9c254b.
2016-12-09 23:45:51,911 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Correlation ID: 1633ad28, Job ID: 675b98c5-4106-4be1-ae4e-134a743f934a, Call Stack: null, Custom Event ID: -1, Message: Failed to import Vm SERBVIDOR NOC-007 to Data Center Default, Cluster DefaultC
2016-12-09 23:45:51,916 INFO  [org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand] (org.ovirt.thread.pool-6-thread-39) [5fc9840d] Lock freed to object 'EngineLock:{exclusiveLocks='[4213277a-1431-ae69-6eb2-a69c5b9c254b=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName SERBVIDOR NOC-007>, SERBVIDOR NOC-007=<VM_NAME, ACTION_TYPE_FAILED_NAME_ALREADY_USED>]', sharedLocks='null'}'

Comment 6 Nisim Simsolo 2017-01-25 16:21:16 UTC
Verification builds:
ovirt-engine-4.1.0.2-0.1.el7
libvirt-client-2.0.0-10.el7_3.4.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64
sanlock-3.4.0-1.el7.x86_64
vdsm-4.19.1-1.el7ev.x86_64

Verification scenario (Polarion test case) added to external trackers.


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