----- Original Message -----
From: "Michael Pasternak" <mpastern(a)redhat.com>
To: "Itamar Heim" <iheim(a)redhat.com>
Cc: "Omer Frenkel" <ofrenkel(a)redhat.com>, "Gilad Chaplik"
<gchaplik(a)redhat.com>, "engine-devel"
<engine-devel(a)ovirt.org>, "Doron Fediuck" <dfediuck(a)redhat.com>,
"Ori Liel" <oliel(a)redhat.com>
Sent: Wednesday, May 16, 2012 6:06:15 PM
Subject: Re: restapi: New params for import VM/Template
On 05/16/2012 05:05 PM, Itamar Heim wrote:
> On 05/16/2012 05:08 PM, Michael Pasternak wrote:
>> On 05/16/2012 04:38 PM, Itamar Heim wrote:
>>>>>
>>>>> please note "vm exists" is based on vm uuid, not on vm
name
>>>>
>>>> i think it based on name, Omer?
>>>
>>> two different things:
>>> 1. vm name is unique.
>>> 2. import vm cannot import an existing vm based on it's uuid
>>> (which is what this feature is about).
>>>
>>> i.e., if i create a vm X, export it, rename X to Y, i will still
>>> fail importing X without 'cloning' it (the cloning process is
>>> about changing uuid's of vm, disks, nics)
>>
>> why import not changing ids by definition? this way only collision
>> that might happen
>> is a vm.name ..., i.e 'cannot import vm.x cause vm with same name
>> already exist' ...
>>
>
> 1. because we didn't have this behavior till now.
> 2. because for templates you may want to preserve the uuid to move
> over VMs/chains using it.
> 3. because import keeping uuid's allows to handle snapshot chains
> and re-use of template which does not require changing the actual
> images, still pointing to the low level
> actual file/chains (can also be fixed by separating internal uuid's
> and disks/snapshots uuids, but much more work)
ok, then implicit re-id can happen when importing already existent
entity and only complaint will be entity name (which has to stay
unique and user-defined).
this way you does not force user to supply /X=true/ arg as it's
obvious in this scenario.
ok, so we agree on: 'collapse_snapshots' under vm->snapshots
but I have doubt about the 'implicit clone by name': first of all I don't
think it's that obvious for the user.
Going FW it would be nice to override parameters in import vm/template
(e.g. open similar dialog to new vm dialog in import vm - GUI-wise),
and to limit the vm name uniqueness to DC/cluster level (not the entire system)
- and [for both of them] not cloning the vm/template - let say because of licensing
issues.
--
Michael Pasternak
RedHat, ENG-Virtualization R&D