Bug 1176806 - [RFE] Clone VM: cloning a Thin/Dependent VM on a template creates Clone/Independent VM (storage-side)
Summary: [RFE] Clone VM: cloning a Thin/Dependent VM on a template creates Clone/Indep...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Tal Nisan
QA Contact: Raz Tamir
URL:
Whiteboard: virt
Depends On: 1058832
Blocks: 1128150
TreeView+ depends on / blocked
 
Reported: 2014-12-23 10:35 UTC by Allon Mureinik
Modified: 2019-04-24 21:01 UTC (History)
16 users (show)

Fixed In Version:
Clone Of: 1128150
Environment:
Last Closed: 2018-07-06 15:37:46 UTC
oVirt Team: Storage
Embargoed:
ylavi: ovirt-future?
sherold: Triaged+
rule-engine: planning_ack?
amureini: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 32112 0 master ABANDONED core: on clone vm the thin provisioned become clone provisioned Never

Description Allon Mureinik 2014-12-23 10:35:44 UTC
+++ This bug was initially created as a clone of Bug #1128150 +++

Description of problem:
Clone of a Thin/Dependent VM on a template is Clone/Independent, but it should be also thin-provisioned & dependent on the template as the original VM is.

Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140804172041.git23b558e.el6.noarch (rc1).

How reproducible:
100%

Steps to Reproduce:
1. Create new VM from a template as Thin/Dependent.
2. Clone this VM.
3.

Actual results:
The cloned VM is created as Clone/Independent, i.e., doesn't depend on the template any more.

Expected results:
Cloned VM should be created also as Thin/Dependent on the template.

Additional info:

--- Additional comment from Omer Frenkel on 2014-09-07 17:41:28 IDT ---

Clone vm means copy of the vm, the cloned cannot be dependent on the template anymore, the same when you select "clone" when you create vm from template, its a copy of the disks and collapse of the snapshots, and then the vm is not dependent on the template any more, this is how cloning works, the same is for clone from snapshot.

--- Additional comment from Omer Frenkel on 2014-09-15 10:44:37 IDT ---

Paval, please change the test case and close this bug according to Comment 1

--- Additional comment from Pavel Novotny on 2014-09-17 15:31:22 IDT ---

(In reply to Omer Frenkel from comment #1)
> Clone vm means copy of the vm, the cloned cannot be dependent on the
> template anymore, the same when you select "clone" when you create vm from
> template, its a copy of the disks and collapse of the snapshots, and then
> the vm is not dependent on the template any more, this is how cloning works,
> the same is for clone from snapshot.

I think this deserves wider discussion, adding Scott...

From usability POV, I don't agree it should work like you say. Cloning VM and cloning VM disk(s) is not the same.
Cloning a VM should do copy of
- VM profile: RAM, vCPUs, boot options and also *template reference and resource allocation settings*
- VM devices: vNICs, *disks* (meaning VM disks, not template disks), ...

Reason for filing this bug came from following use case, which will be IMO common among customers:
- Have a Windows 7 (or other OS) template with 50 GB disk (actual size).
- Create new Thin/Dependent VM from the template.
- In the guest change some settings and install few programs that take, let's say, 2 GB.
- Clone the VM.

Result:
You have to wait until the whole 50 GB disk from template + 2 GB COW disk from VM are copied, which takes much more time, comparing to creating a Thin/Dependent VM.
The user is initially also not aware that the cloned VM takes 52 GB of storage instead of 2 GB, as one would expect.

The above example shows that in current state the "Clone VM" feature is quite useless for Thin/Dependent VMs, because it doesn't offer any advantages to Thin/Dependent VM provisioning, thus no body will use it in this case.

@Scott, what's your opinion on this?

--- Additional comment from Pavel Novotny on 2014-10-01 11:49:31 IST ---

Scott, any thoughts on this?

--- Additional comment from Pavel Novotny on 2014-10-13 18:16:02 IST ---

No response so far, adding also Michal.
Michal, can you please read comment 3 and tell what's your opinion? We need some resolution on this bug.

--- Additional comment from Michal Skrivanek on 2014-11-24 18:24:50 IST ---

the change makes sense. Omer, can you see if we can make it a default behavior? Seems to me it can't hurt ...

clone would just clone the VM the same way it was deployed from template. So we will have base disk(from template) + 'clone' of the changes disk(of the original VM)

--- Additional comment from Omer Frenkel on 2014-11-24 18:47:09 IST ---

afair, there is no way to do it currently, because we need some way to copy the chain of the disk (don't forget snapshots) and changing the volumes ids also.

today we can change disk id during copy only when doing collapse.
in order to allow this behavior, we probably need to ask storage to implemet this kind of ability, then on the engine side we need also to copy the vm snapshots and update the snapshots content (its OVF file saved in the db) because there are references to the disks ids inside.

bottom line, pretty complicated..

--- Additional comment from Michal Skrivanek on 2014-11-25 11:26:54 IST ---

IMHO the best would be to copy the chain of disks and update the IDs to point to the same base image. Then we can make it a choice:
copy VM - create a full independent copy (that's what current "clone VM" does today)
clone VM - create the "same" VM, thin provisioned off the same template disk (i.e. another dependent VM)

for that we need a new storage vdsm verb to copy only the disk chain, not the base image. It would be enough to ignore collapsing options for now, just copy the whole chain *after* the base image. Allon, is that feasible?

--- Additional comment from Allon Mureinik on 2014-11-30 18:33:32 IST ---

Basically, you'd want to create a NEW chain based off the same template, and then sync the contents, in a similar way that LSM does.

Generally speaking, this is feasible, but not sure about the timeline (although definitely not for oVirt 3.5.1!).

Scott/Sean, can you give some feedback about the priority of this RFE?

--- Additional comment from Sean Cohen on 2014-12-22 19:40:05 IST ---

I suggest to clone it to downstream to allow prioritization 
Sean
===============================================================================
Cloning to RHEV to have the PM discussion here.

Comment 1 Allon Mureinik 2014-12-23 10:37:28 UTC
Let's continue the discussion here, As per Sean's suggestion.

Comment 2 Michal Skrivanek 2015-01-15 10:47:23 UTC
well, it should be nice and small. any chance getting this in 3.6 timeframe?:)

Comment 3 Michal Skrivanek 2016-02-17 16:37:35 UTC
what was this closed with? I miss any patch reference

Comment 4 Yaniv Lavi 2016-02-17 18:04:43 UTC
(In reply to Michal Skrivanek from comment #3)
> what was this closed with? I miss any patch reference

We have a upstream clone and since this doesn't fit a rhev bug criteria, I closed it and only kept the upstream ticket.

Comment 5 Yaniv Lavi 2016-02-17 18:07:08 UTC
See bz #1128150

Comment 6 Michal Skrivanek 2016-02-17 20:11:25 UTC
Yeah, that's "my bug". Not fixed. And this is a dependency of that one. So I still don't understand whether this bug is fixed.

Comment 7 Yaniv Lavi 2016-02-18 07:32:12 UTC
(In reply to Michal Skrivanek from comment #6)
> Yeah, that's "my bug". Not fixed. And this is a dependency of that one. So I
> still don't understand whether this bug is fixed.

It's not fixed, it's closed upstream, since it will be resolved in the upstream ticket. Tracked in bz #1128150. If you need anything in storage please use that ticket or clone it.

Comment 8 Michal Skrivanek 2016-02-18 08:19:01 UTC
As per previous comments this bug was created to prioritize the work. It has not been done. And "closed upstream" is not helping it either. If you wanted to say "i don't care" then close as won'tfix

Comment 9 Yaniv Lavi 2016-02-18 10:07:26 UTC
(In reply to Michal Skrivanek from comment #8)
> As per previous comments this bug was created to prioritize the work. It has
> not been done. And "closed upstream" is not helping it either. If you wanted
> to say "i don't care" then close as won'tfix

But I do care, just don't want this to happen in RHEV, but in oVirt.

Comment 10 Michal Skrivanek 2016-02-18 10:14:19 UTC
(In reply to Yaniv Dary from comment #9)

> But I do care, just don't want this to happen in RHEV, but in oVirt.

ok, changing it is the best way how to do that. The reason I don't want that one single bug is that this is a mandatory dependency on storage team's effort

Comment 14 Michal Skrivanek 2016-02-19 10:56:13 UTC
Allon, any chances to get to this in 4.0?

let me quote the only relevant comment in this bug so far:
Basically, you'd want to create a NEW chain based off the same template, and then sync the contents, in a similar way that LSM does.

Comment 15 Michal Skrivanek 2016-09-07 11:28:53 UTC
same question for 4.1 then;-)

Comment 16 Allon Mureinik 2016-09-07 11:38:07 UTC
(In reply to Michal Skrivanek from comment #15)
> same question for 4.1 then;-)
It's not THAT hard to dom, but I doubt this will be a priority any time soon.

Comment 18 Martin Tessun 2018-07-06 15:37:46 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1128150#c15


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