Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1358828 - Import of VM fails from export domain
Summary: Import of VM fails from export domain
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.0.0
Hardware: x86_64
OS: Linux
unspecified
high vote
Target Milestone: ---
: ---
Assignee: Shahar Havivi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-21 14:43 UTC by Cam Mac
Modified: 2016-08-24 10:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-24 10:28:57 UTC
oVirt Team: Virt
ykaul: ovirt-4.0.z?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)
ovirt engine log and ova files (minus disk image) (deleted)
2016-07-21 14:43 UTC, Cam Mac
no flags Details
vdsm log from node (deleted)
2016-07-25 10:46 UTC, Cam Mac
no flags Details
ovf file from virt-v2v conversion process (deleted)
2016-08-23 11:38 UTC, Cam Mac
no flags Details
Import VM screenshot (deleted)
2016-08-23 13:00 UTC, Shahar Havivi
no flags Details

Description Cam Mac 2016-07-21 14:43:01 UTC
Created attachment 1182546 [details]
ovirt engine log and ova files (minus disk image)

Description of problem:

A VMWare VM is exported via OVFTool, and then converted via virt-v2v and uploaded to the export domain. The VM is imported via the oVirt GUI under 'storage' -> 'Import VM'. It fails with the error:

"Error while executing action: General command validation failure."


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

4.0.0.6

How reproducible:

Can be reproduced at every attempt

Steps to Reproduce:
1. Use OVFTool (on a Linux workstation) as follows: 

ovftool vi://user@esxi-mgmt/Datacentre/vm/Systems/gaspode /mnt/scratch/gaspode.ova

2. Use virt-v2v on engine host as follows: 

virt-v2v -x -v -i ova /mnt/import-vm/gaspode.ova -o rhev -os ovirt-engine:/mnt/export-vm -of qcow2

This completes successfully

3. Go to the GUI, and under 'Storage' choose the 'VM Import' tab and select the VM, and choose 'Import'. It then fails with error:

Error while executing action: wvm2: General command validation failure.

Actual results:

VM fails to import.

Expected results:

VM is imported


Additional info:
I've tried this in both 3.6 and 4.0 versions of oVirt with the same result.

I have tried importing the ovf directly from the GUI without using virt-v2v and it also fails. I will file a 2nd bug report for this. I have also tried directly importing VMs from VMWare using both the oVirt GUI and virt-v2v command line and it fails for various other reasons (command line method via virt-v2v can't find the VM)

Comment 1 Michal Skrivanek 2016-07-22 06:43:58 UTC
would you please attach corresponding vdsm.log?

Comment 2 Shahar Havivi 2016-07-24 07:21:21 UTC
Please share the ovf and ova as well (no need for the disk in the ova to make the ova file small in size).

may be duplicate to bz 1345864

Comment 3 Cam Mac 2016-07-25 10:46:51 UTC
Created attachment 1183721 [details]
vdsm log from node

vdsm log attached

Comment 4 Cam Mac 2016-07-25 10:50:48 UTC
(In reply to Shahar Havivi from comment #2)
> Please share the ovf and ova as well (no need for the disk in the ova to
> make the ova file small in size).
> 
> may be duplicate to bz 1345864

Hi Shahar,

The ova file has the following contents:

gaspode.ovf
gaspode.mf
gaspode-disk1.vmdk

The first two should be in the first file attachment I submitted with the bug report.

Please let me know if you need any additional information.

Thanks,

Cam

Comment 5 Shahar Havivi 2016-08-23 08:01:56 UTC
(In reply to Cam Mac from comment #4)
Hi,
I need the ovf that virt-v2v created in the export domain,
the ovf that you provided is the one from vmware - once you use virt-v2v the output directory (the export domain) have an ovf of the converted VM.
Can you please share that file.

Comment 6 Cam Mac 2016-08-23 11:27:25 UTC
Will upload shortly

Comment 7 Cam Mac 2016-08-23 11:38:26 UTC
Created attachment 1193303 [details]
ovf file from virt-v2v conversion process

Attached is the ovf file created by virt-v2v conversion in the export domain

Comment 8 Shahar Havivi 2016-08-23 13:00:08 UTC
Created attachment 1193311 [details]
Import VM screenshot

The ovf looks good and works on my environment with no errors,
Where you able to see this details?

Comment 9 Cam Mac 2016-08-23 16:50:29 UTC
Hi Shahar,

I tested it again twice and it fails each time. I can send you the log if you like, but here's the excerpt showing the failure:

2016-08-23 14:01:58,519 INFO  [org.ovirt.engine.core.bll.exportimport.ConvertVmCallback] (DefaultQuartzScheduler6) [1321f5c8] Conversion of VM from exteral enironment failed: copy-disk stream closed unexpectedly
2016-08-23 14:01:59,570 ERROR [org.ovirt.engine.core.bll.exportimport.ConvertOvaCommand] (DefaultQuartzScheduler1) [72e4e715] Ending command 'org.ovirt.engine.core.bll.exportimport.ConvertOvaCommand' with failure.
2016-08-23 14:01:59,662 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (DefaultQuartzScheduler1) [72e4e715] Correlation ID: 72e4e715, Call Stack: null, Custom Event ID: -1, Message: Failed to convert Vm gaspode
2016-08-23 14:01:59,756 INFO  [org.ovirt.engine.core.bll.RemoveVmCommand] (DefaultQuartzScheduler1) [6a4a8575] Running command: RemoveVmCommand internal: true. Entities affected :  ID: 0ac3de07-4712-442f-b5d1-eddb36db8f7e Type: VMAction group DELETE_VM with role type USER
2016-08-23 14:01:59,758 INFO  [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (DefaultQuartzScheduler1) [6a4a8575] START, SetVmStatusVDSCommand( SetVmStatusVDSCommandParameters:{runAsync='true', vmId='0ac3de07-4712-442f-b5d1-eddb36db8f7e', status='ImageLocked', exitStatus='Normal'}), log id: 2c5353fb
2016-08-23 14:01:59,762 INFO  [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (DefaultQuartzScheduler1) [6a4a8575] FINISH, SetVmStatusVDSCommand, log id: 2c5353fb
2016-08-23 14:01:59,811 INFO  [org.ovirt.engine.core.bll.RemoveVmCommand] (DefaultQuartzScheduler1) [6a4a8575] Lock freed to object 'EngineLock:{exclusiveLocks='[0ac3de07-4712-442f-b5d1-eddb36db8f7e=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName gaspode>]', sharedLocks='null'}'

Thanks,

Campbell

Comment 10 Cam Mac 2016-08-23 17:20:45 UTC
I see the screenshot. I am running oVirt Engine Version 4.0.0.6-1.el7.centos. Is that the same version as you?

Comment 11 Shahar Havivi 2016-08-24 07:01:42 UTC
Acording to the NPE you get its looks like the vm is based on a template (which is missing) but in the ovf (and the screenshot) that I uploaded its looks like blank.
What do you see in storage->(select the export-domain)->gaspode under the template column? (or you don't see the vm at all?)

also do you have a way for me to download the ova and test it in my environment,
you can send the link to me by private email.

Comment 12 Cam Mac 2016-08-24 10:25:37 UTC
Hi Shahar, 

The vm gaspode has a template of 'blank'. Yesterday, I created a new VM on VMWare and then tried a test migration of it. It failed, but gave me a clear message in the engine.log of what the issue was:

Permission denied: u'/mnt/import-vm/horton.ova'

So I had a look inside the horton.ova via a tar -tvf, and the ownership of the files was not vdsm:kvm (it was some other uid/gid, as I created it on another machine via ovftool and copied it to the import directory). So I repackaged it with the correct permissions on the file, and it worked. So I had a look at the ova for the 'gaspode' vm, same incorrect ownership. I repacked it, and, lo and behold, the migration worked. The error in the engine log was less explicit, as it just reported:

"copy-disk stream closed unexpectedly"

which is consistent with a permissions error, but somewhat ambiguous and so perhaps not obvious.

Anyway, we can mark this as closed. Thanks very much for your help, and sorry for the wild goose chase.

Many thanks,

Cam

(In reply to Shahar Havivi from comment #11)
> Acording to the NPE you get its looks like the vm is based on a template
> (which is missing) but in the ovf (and the screenshot) that I uploaded its
> looks like blank.
> What do you see in storage->(select the export-domain)->gaspode under the
> template column? (or you don't see the vm at all?)
> 
> also do you have a way for me to download the ova and test it in my
> environment,
> you can send the link to me by private email.

Comment 13 Shahar Havivi 2016-08-24 10:28:57 UTC
Thanks you for sharing
I will close this bug.


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