Bug 838514 (expiring_vms)

Summary: [RFE] allow setting duration / expiration of Vms
Product: [oVirt] ovirt-engine Reporter: Andrew Cathrow <acathrow>
Component: RFEsAssignee: Scott Herold <sherold>
Status: CLOSED WONTFIX QA Contact: Shai Revivo <srevivo>
Severity: low Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, howey.vernon, iheim, lpeer, mgoldboi, michal.skrivanek, rbalakri, sherold
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: ylavi: ovirt-future?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-29 11:26:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Cathrow 2012-07-09 10:14:48 UTC
(place holder more details to follow)

User case : 

In a self service use case we need the ability to set a lease time on a virtual machine.
For example when a user creates a VM and based on their (quota) they get a 10 day lease on the VM.

After (soft limit) time a warning is given to the user that their VM is set to expire

After (hard limit) time the VM is removed

Comment 1 Michal Skrivanek 2014-03-27 09:05:09 UTC
I believe this is an sla-related feature based on quota settings

Comment 2 Michal Skrivanek 2014-03-27 11:41:11 UTC
Scott, can you please clarify a bit more?
Do we want to implement this as a quota thing…or just a simple per-VM "expire in x days" field? Something else?
Should we remove the expired VMs right when the time comes or just on next run, or login?

Comment 3 Scott Herold 2014-04-01 11:43:41 UTC
This BZ is more than 18 months old.  I need to discuss with Andy a more collective vision around what self-service is and is not within RHEV, and if it's more applicable to CloudForms or possibly OpenStack depending on the use case.

Comment 4 Scott Herold 2014-04-02 08:14:18 UTC
If we were to implement this, I'd consider doing something simple with setting an expiration date.  Make that expiration date hard or soft.  Hard expiration gets auto-deleted.  Soft expiration gets shut down and an action taken (Email owner, notify admin, etc.)  If I wanted to be SLIGHTLY more advanced, I'd have a "notification" field that prompts users within X Days that the VM is about to expire if they don't take further action and do some form of renewal... But again, that would seem extremely cloudforms-y to me.

Would we be able to incorporate this logic into VM Pools?

Comment 5 Michal Skrivanek 2014-04-08 10:07:42 UTC
sounds more interesting for cloudforms indeed. However in some simple form it is doable in RHEV as well(hardauto-deletion for sure. Notification - not sure…shutdown with reason might work ok - bug 1065753)

Comment 6 Itamar Heim 2014-08-05 13:37:57 UTC
I can see a simple solution:
- allow to set an expiration date.
- add validation to not start expired VMs
- allow to search based on expired VMs, for manual deletion (not automatic)

Comment 9 Michal Skrivanek 2015-06-02 09:34:32 UTC
(In reply to Itamar Heim from comment #6)
> I can see a simple solution:
> - allow to set an expiration date.
> - add validation to not start expired VMs
> - allow to search based on expired VMs, for manual deletion (not automatic)

this would make sense together with bug 993646
set date, once expired disable the vm

Comment 11 Moran Goldboim 2016-11-29 11:26:36 UTC
Problem solved in using CloudForms, we currently don't plan to provide in product solution to this problem.