Bug 928864

Summary: Cannot import VM. The following disks already exist: . Please import as a clone.
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engineAssignee: Allon Mureinik <amureini>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acanan, acathrow, amureini, iheim, jbelka, jkt, lpeer, Rhev-m-bugs, scohen, tnisan, yeylon
Target Milestone: ---Flags: abaron: Triaged+
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-12 14:04:19 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:
Bug Depends On:    
Bug Blocks: 1078909, 1142926    
Attachments:
Description Flags
engine.log and vdsm.log
none
ovf file for problematic VM none

Description Jiri Belka 2013-03-28 16:02:22 UTC
Created attachment 717721 [details]
engine.log and vdsm.log

Description of problem:

While importing a VM from export domain I got this error, see there is _NO_ name of the disk! No idea what's going on...

w7-x64-vio53011:

    Cannot import VM. The following disks already exist: . Please import as a clone.

Version-Release number of selected component (if applicable):
sf11
vdsm-4.10.2-12.0.el6ev.x86_64

How reproducible:
??

Steps to Reproduce:
1.
2.
3.
  
Actual results:
cannot import vm and error message is missing disk name which is complaining about

Expected results:


Additional info:

Comment 1 Jiri Belka 2013-05-30 08:14:15 UTC
It seems this is related to missing disk name. When I clicked 'Import' (sf17.2) on problematic VM and checked Disks in 'Import Virtual Machine' dialog, the name for a disk is null/empty. So maybe somewhere there's a condition and if diskname if empty it returns error... I'm including ovf file for problematic VM.

Comment 2 Jiri Belka 2013-05-30 08:16:19 UTC
Created attachment 754707 [details]
ovf file for problematic VM

Including ovf file for following problematic VM.

--

w7-x64-vio53011:

    Cannot import VM. The following disks already exist: . Please import as a clone.

--

$ curl -sk -u "admin@internal:xxxxxxx" -H "Content-type: application/xml" -X GET https://10.34.63.76/api/storagedomains/cc4d884d-15d9-4e35-b869-4330245c1b94/disks/ | grep 'name>w7' | sort
        <name>w7-vio-53011_Disk1</name>
        <name>w7-x64-chained_Disk1</name>

Comment 3 Aharon Canan 2013-07-09 12:02:07 UTC
Do we know for sure how to reproduce?
Comment #1 feels like an assumption, 

Ayal - can you confirm?

Comment 4 Ayal Baron 2013-07-09 15:50:41 UTC
(In reply to Aharon Canan from comment #3)
> Do we know for sure how to reproduce?
> Comment #1 feels like an assumption, 
> 
> Ayal - can you confirm?

Reproducing the scenario where we have the same disks already in the system is easy - just export a VM, detach one of its disks, delete the vm import it back (i.e. you have the same disk in the system but the VM is no longer there).

Whether the bug reproduces where we don't get the names of the disks, I do not know, needs to be tested.  If you could run this flow that would be great.

Comment 5 Ayal Baron 2013-09-04 13:17:59 UTC
Aharon, note that you can use the ovf attached here (you'd need to recreate the disk on the export domain).

Comment 6 Ayal Baron 2013-09-04 13:19:04 UTC
Allon, the disk missing a name sounds like a bug we've fixed (automatically assigning names to disks when importing, which should result in having a name in this scenario).  Do you recall the issue?

Comment 8 Tal Nisan 2014-02-04 16:34:16 UTC
I've tried to reproduce and it worked fine for me with the disk aliases being shown correctly for disks that already exists on the setup.
Upon reviewing the attached OVF it seems that it's lacking the disk aliases that are marked with "ovf:disk-alias", could it be that this OVF file was of a VM that was exported in a version pre 3.1?

Comment 9 Jiri Belka 2014-02-07 14:11:28 UTC
The VM seems to be from 2.2.11 as 53011 is 2.2.11 WGT version.

Comment 12 Leonid Natapov 2014-02-23 10:13:20 UTC
works on 3.4.0-0.11.beta3.el6. Exported VM, detached one of its disks, deleted the vm  and imported it back. Disk name shown correctly ,no error message appear.

Comment 14 Itamar Heim 2014-06-12 14:04:19 UTC
Closing as part of 3.4.0