How to reset instance id to 00000001

Asked by arturo lorenzo

Can you reset instance id to 00000001? without reinstalling nova?
thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
arturo lorenzo
Solved:
Last query:
Last reply:
Revision history for this message
Vish Ishaya (vishvananda) said :
#1

you could delete the database and recreate it with nova-manage db sync, but you would have to recreate your users and networks as well.

Alternatively you could drop all rows from the instances table and reset the auto-increment value on the table.

Revision history for this message
arturo lorenzo (arturo-lorenzo) said :
#2

Vish,
Thanks so much again, I used your suggested alternative method and it worked.
I have just deleted the content of the two tables: instances and security_group_instance_association and reset the counter with the following query: ALTER TABLE instances AUTO_INCREMENT = 0;
Thanks again!