Bug 1041379

Summary: [RFE][nova]: Prestart servers before users request them to speed up boot times
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/nova/+spec/prestart-servers
Whiteboard: upstream_milestone_none upstream_status_unknown upstream_definition_obsolete
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 17:05:02 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 RHOS Integration 2013-12-12 15:39:17 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/prestart-servers.

Description:

Problem: Windows servers need sysprep to run, and similar long running per-vm personalisation tasks, so take ages to boot, even if you use boot from volume

Idea is to split the boot process into two steps (initial-boot and transfer+reboot):
* initial boot (pull down image, start up, run sys prep, etc, then shutdown, like a shelved instance)
* it is booted to a particular size, but it could be resized up at a later stage, reserves that space on the host
* make scheduler pick a host that has a matching shelved image, plus required overhead for resize
* resize shelved server to requested size, if not possible reschedule to new host
* start shelved pre-booted server, similar as if it were a snapshot, re-run any "personalisation", like file injection via agent
* we could delete the old VM, and its db record, and just reuse the disks for the new VM
* the above means we re-configure all the networking
* delete server can be called to delete any pre-booted servers that are no longer needed, or when they become "stale"

Notes:
* maintain level of pre-started VMs with external orchestration, like qonos
* server will belong to tenant of admin who started it, and their quota will limit how many can be pre-started
* once booted, they can stop the instance (for example, once you can ssh in)
* we then need an API to make these instances available to the scheduler for "transfer and reboot" for new tenant
* before resize, delete the only instance record, and make instance into new uuid instance

Future things:
* re-using networking resources, rather than re-fetching new IP address
* consider leaving prebooted VMs running, if no personalisation is added
* in boot from volume, we could delete the VM and only refernce the cinder boot disk

More info:
https://etherpad.openstack.org/IcehouseNovaPrestartServers

Specification URL (additional information):

None