While instance information is stored in a number of database tables, the table you most likely need to look at in relation to user instances is the instances table.
The instances table carries most of the information related to both running and deleted instances. It has a bewildering array of fields; for an exhaustive list, look at the database. These are the most useful fields for operators looking to form queries:
The
deletedfield is set to1if the instance has been deleted andNULLif it has not been deleted. This field is important for excluding deleted instances from your queries.The
uuidfield is the UUID of the instance and is used throughout other tables in the database as a foreign key. This ID is also reported in logs, the dashboard, and command-line tools to uniquely identify an instance.A collection of foreign keys are available to find relations to the instance. The most useful of these—
user_idandproject_id—are the UUIDs of the user who launched the instance and the project it was launched in.The
hostfield tells which compute node is hosting the instance.The
hostnamefield holds the name of the instance when it is launched. The display-name is initially the same as hostname but can be reset using the nova rename command.
A number of time-related fields are useful for tracking when state changes happened on an instance:
created_atupdated_atdeleted_atscheduled_atlaunched_atterminated_at

