Bug 1570486

Summary: Creating VM template from snapshot is available only via the UI
Product: [oVirt] ovirt-engine Reporter: Eyal Shenitzky <eshenitz>
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Shir Fishbain <sfishbai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bugs, ebenahar, eshenitz, tnisan
Target Milestone: ovirt-4.3.0Flags: rule-engine: ovirt-4.3+
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.0_alpha Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-13 07:48:09 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
screenshots eshenitz: review-

Description Eyal Shenitzky 2018-04-23 04:31:46 UTC
Description of problem:

VM template can be created from one of the VM snapshots.
The only way to create VM template from a snapshot is via the UI only.
The option to create VM template from snapshot through REST-API is missing. 

Version-Release number of selected component (if applicable):
master-4.3.0 - from commit 2b8602fca13f12840dfee15b12cf88e5a45f633b

How reproducible:
100%

Steps to Reproduce:
1. Create a VM with disk
2. Create a snapshot of the VM
3. Try to create a template from the VM

Actual results:
The only way to create a VM template is via the UI

Expected results:
There should be an option to create a template from a VM snapshot via REST-API

Additional info:

Comment 1 Shir Fishbain 2018-08-19 14:36:15 UTC
Created attachment 1476906 [details]
screenshots

Hi Eyal,

Please see attached screenshots, the REST guide does not contain the create template from snapshot operation and also in the response body of GET for a specific snapshot, this option doesn't exist.

Comment 2 Eyal Shenitzky 2018-08-20 06:09:20 UTC
I have to admit that I am not familiar with the ovirt-engine/apidoc documentation but you can find the information under - 
../ovirt-engine/api/model#services/templates

Comment 3 Tal Nisan 2018-08-21 11:15:31 UTC
Under api/templates you send a request with this body (taken from the API documentation):

<template>
  <name>mytemplate</name>
  <vm id="123">
    <snapshots>
      <snapshot id="456"/>
    </snapshots>
  </vm>
</template>

Comment 4 Shir Fishbain 2018-08-21 12:49:52 UTC
Created a template from a snapshot by rest-API.

ovirt-engine-4.3.0-0.0.master.20180815091554.gitd5455ea.el7.noarch
vdsm-4.30.0-527.gitcec1054.el7.x86_64

Comment 5 Sandro Bonazzola 2018-11-02 14:33:09 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Comment 6 Sandro Bonazzola 2018-11-02 14:59:31 UTC
Closed by mistake, moving back to qa -> verified

Comment 7 Sandro Bonazzola 2019-02-13 07:48:09 UTC
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.