Prestart servers before users request them to speed up boot times

Registered by John Garbutt

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

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
John Garbutt
Direction:
Needs approval
Assignee:
John Garbutt
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
John Garbutt

Related branches

Sprints

Whiteboard

If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

This is a bad idea in its current form, killing this blueprint.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.