Bug 720152

Summary: RHEVM Backend: Backend should clear the VM template field when removing the last disk from it.
Product: [Retired] oVirt Reporter: Oded Ramraz <oramraz>
Component: ovirt-engine-coreAssignee: lpeer <lpeer>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: abaron, acathrow, iheim, lpeer, ykaul
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-11 06:41:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Oded Ramraz 2011-07-10 11:24:05 UTC
Description of problem:

I created a VM from template X,  then i removed the disk from the VM and added a new one and reinstall it with new OS. 
When trying to remove the template X i got an error message which tells me that i can't remove the template because VM's are still attached to it. 
This restriction is not logical since the VM is not derived from that template anymore. 

IMO when removing the last disk from a VM BE should clear its template field and enable to remove it. 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Oded Ramraz 2011-11-30 08:43:04 UTC
Consider this scenario:
1.Create a VM X
2.Create template T from VM X 
3.Remove the disks from VM X and install new OS on it.
4.Try to remove template T 
You can't do that since the still Backend thinks that the VM is created from that template . 

This bug is quite annoying and i encounter it several times already .

Comment 2 Itamar Heim 2012-12-11 06:41:00 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.