Nova/Ghosts

Ghosts
In some hypervisors, once an instance is deleted, the resources used by that instance may not be available for a period of time, even though the hypervisor may report those resources as available. Xen in particular seems to have this issue; once an instance is deleted, it reports the memory as free, but it is actually scrubbing the memory and will reject instance creation attempts that would use that memory.

A workaround for this type of behavior is to allow the creation of a "ghost" of an instance being deleted. Ghosts have a lifetime—basically, an estimate of how long it will take for the hypervisor to actually release the instance's resources—and a dictionary describing the resources the hypervisor is holding. They are returned from the virt driver's destroy method, if one is required (None is also a valid—and the default—return value, indicating no ghost was created). They are tracked by the resource tracker, and are only a best-effort mechanism; they will vanish if the compute host is restarted.