Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1096441

Summary: Error importing a VM
Product: Red Hat Enterprise Virtualization Manager Reporter: Allon Mureinik <amureini>
Component: vdsmAssignee: Maor <mlipchuk>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Aharon Canan <acanan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, amureini, bazulay, iheim, lpeer, Rhev-m-bugs, scohen, thirupathi_jittaboina, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-03 08:30:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log none

Description Allon Mureinik 2014-05-10 09:59:15 UTC
This issue was originally reported by thirupathi_jittaboina.sg on bug 885459:

Hi, I'm Using RHEV 3.3 angetting below error while importing VM image from export doamin.

2014-05-10 16:07:28,236 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] START, DoesImageExistVDSCommand( storagePoolId = 1e2a4217-e9c4-419b-ab1c-f8865b61c827, ignoreFailoverLimit = false, storageDomainId = 63a269c0-2fa6-4705-b617-2af2f174de34, imageGroupId = 53d3a77a-b765-487f-950a-21db75ec5048, imageId = eaf474ea-7c74-4a87-b9fa-48e483a100e2), log id: 33f02bca
2014-05-10 16:07:28,256 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] IrsBroker::getImageInfo::Failed getting image info imageId = eaf474ea-7c74-4a87-b9fa-48e483a100e2 does not exist on domainName = EXPORT_DOMAIN , domainId = 63a269c0-2fa6-4705-b617-2af2f174de34,  error code: ImagePathError, message: Image path does not exist or cannot be accessed/created: ('/rhev/data-center/mnt/nocrhevm01.nlb.gov.sg:_exports_migrate/63a269c0-2fa6-4705-b617-2af2f174de34/images/53d3a77a-b765-487f-950a-21db75ec5048',)
2014-05-10 16:07:28,257 WARN  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] executeIrsBrokerCommand: getImageInfo on eaf474ea-7c74-4a87-b9fa-48e483a100e2 threw an exception - assuming image doesnt exist.
2014-05-10 16:07:28,257 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] FINISH, DoesImageExistVDSCommand, return: false, log id: 33f02bca
2014-05-10 16:07:28,257 WARN  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] CanDoAction of action ImportVm failed. Reasons:VAR__ACTION__IMPORT,VAR__TYPE__VM,ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST
2014-05-10 16:07:28,258 INFO  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] Lock freed to object EngineLock [exclusiveLocks= key: noccmsapp32v value: VM_NAME
, sharedLocks= key: d19ebc88-9f5f-47be-8ee4-e3b4c0dc4695 value: REMOTE_VM
]
2014-05-10 16:07:28,419 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (ajp-/127.0.0.1:8702-4) START, GetVmsInfoVDSCommand( storagePoolId = 1e2a4217-e9c4-419b-ab1c-f8865b61c827, ignoreFailoverLimit = false, storageDomainId = 63a269c0-2fa6-4705-b617-2af2f174de34, vmIdList = null), log id: 7b948c31
2014-05-10 16:07:28,431 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (ajp-/127.0.0.1:8702-4) FINISH, GetVmsInfoVDSCommand, log id: 7b948c31

Comment 1 Allon Mureinik 2014-05-10 10:01:36 UTC
thirupathi, can you please attach engine and VDSM logs?

Comment 2 thirupathi 2014-05-10 10:11:17 UTC
Created attachment 894232 [details]
engine.log

Here I attached the logs from Rhev Manager.
Pls help to check. I was getting error while removing the VM in export domain and got the status VM removed from export domain but the VM still there.
You can see in logs.

Thanks,
Thirupathi

Comment 3 thirupathi 2014-05-10 10:20:10 UTC
I think the error is because of Permission at export domain path on manager.
[root@nocrhevm01 images]# pwd
/exports/migrate/63a269c0-2fa6-4705-b617-2af2f174de34/images

drwxr-xr-x. 2 vdsm kvm  4096 Apr  7 15:49 43182df3-97c3-4642-98fb-f372af8cbb04
drwxr-xr-x. 2 vdsm kvm  4096 May 10 14:50 53d3a77a-b765-487f-950a-21db75ec5048
drwxr-xr-x. 2 root root 4096 May  9 17:23 9b85767a-a7a7-4648-a6a6-3b6de20c1b67
drwxr-xr-x. 2 root root 4096 May  9 17:17 c8ceded2-3e28-4076-ae4a-f3fa8ca523c6

I'm able to import the VM's if images Permission vdsm:kvm only.
I'm not able to import the VM's if images Permission root:root.
Can I ask why its like that ?

2. I have done P2V, the server was on IBM hardware and It was using LVM but after conversion VM got all standard partitions instead of LVM. Why ? 
Is it normal or abnormal ? I want the converted VM should be in LVM.

Thanks,
Thiru

Comment 4 Maor 2014-05-10 21:29:28 UTC
files under /exports/migrate/63a269c0-2fa6-4705-b617-2af2f174de34/images should be all vdsm:kvm. The bug here is that the files  9b85767a-a7a7-4648-a6a6-3b6de20c1b67 and c8ceded2-3e28-4076-ae4a-f3fa8ca523c6 has been created with the root permissions.

Can you reproduce this (creating files with root permissions) on other VMs? Is it always happens when you do P2V? What is your P2V version?
Can u also attach the VDSM logs with the file creation logs?

Comment 5 Allon Mureinik 2014-09-03 08:30:50 UTC
After three months of inactivity, closing.
thirupathi, if you have a reproducer with the logs Maor requested, please reopen and attach them.