Bug 1013675 - [RFE] In-place transformation of a VM to a Template
Summary: [RFE] In-place transformation of a VM to a Template
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RFEs
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rob Young
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-30 15:03 UTC by Federico Simoncelli
Modified: 2018-01-29 12:32 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-16 15:37:51 UTC
oVirt Team: Virt
Embargoed:
ylavi: ovirt-future?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)

Description Federico Simoncelli 2013-09-30 15:03:21 UTC
Description of problem:
It should be possible to transform in place a VM to a Template (Make Template).
At the moment the flow for the creation of a new template is:

1. create a new VM
2. install the VM (OS and additional SW), relevant configurations
3. create a Template (Make Template)

During step 3 the disks are copied to different images but in some cases it could be preferable and faster to directly transform the vm in a template (skipping the copy), for example when the orginal vm is not needed anymore as it was created only to generate the template for thin provisioning purpose.
This would be useful for imported disks as well (e.g. from glance) in order to transform them in templates as soon as they're assigned to a new or existing vm.

Comment 1 Itamar Heim 2014-06-22 09:40:42 UTC
oved - how was this resolved in the end for import template from glance to flag as readonly?

Comment 2 Oved Ourfali 2014-06-24 05:05:13 UTC
(In reply to Itamar Heim from comment #1)
> oved - how was this resolved in the end for import template from glance to
> flag as readonly?

Up until now, the only way to create a 'template' disk was by using the
copyImage command.  This has 2 limitations:
1. It forces the user to copy all the data instead of doing an in-place
convert of an image to a template image
2. Resulting image cannot be qcow which is wasteful in some cases

I've sent a patch to address that, and allows using an existing disk as a
template disk, by allowing to "share" a disk that isn't marked as
"shared", but can be shared as it doesn't have snapshots. This disk will
be marked as "shared" upon first use.

So, as far as I understand the only thing that needs to be done is setting it properly on the engine side (marking this VM as a template).
Now, the first time a VM is created from this template the disks will be marked as shared.

However, it will only work in cluster level which is 3.4 or higher, as this code doesn't exist in older versions of VDSM.

Federico - if I wasn't accurate enough in the description above then please correct me.

Comment 6 Yaniv Kaul 2017-11-16 12:57:51 UTC
Michal - still relevant?

Comment 7 Michal Skrivanek 2017-11-16 15:37:51 UTC
no one seem to request that anymore. After 4 years it seems to be the time to close wontfix

We have virt-sysprep integrated to clean up the (linux) template, but not really without the first step of creating the template


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