Ask Your Question
1

vm information from nova db tables

asked 2019-06-25 08:51:51 -0500

sanjay khuntia gravatar image

updated 2019-06-25 08:57:56 -0500

Hi, Is there any database tables in nova which maintains instance information like - vm name, vm uuid, vm Owner name, IP address allocated, VM state after the VM is created successfully. I need to use these information in some script I am writing.

whether all these information can be available in one or multiple db tables inside nova database provided I have the compute host name. Basically I want to find out all the above vm information for a specific compute host provided.

Please provide any pointers if you have.

thanks for your replies.

best regards,

edit retag flag offensive close merge delete

Comments

Why do you want to get the data from the DB? The DB schema is prone to changes from release to release. There is a database table named instances, which contains some of the information you require, but some data is in databases outside of Nova. For example, Nova stores the owner ID, not the name.

Bernd Bausch gravatar imageBernd Bausch ( 2019-06-25 11:40:33 -0500 )edit

The name is in the Keystone database. IP addresses are not allocated to instances, but to Neutron ports. So, it's not that easy. Why not use the API to acquire instance information?

Bernd Bausch gravatar imageBernd Bausch ( 2019-06-25 11:41:48 -0500 )edit

you could also use the command

openstack server list --long

gives you infos like id,name,statusNetworks,AZ and addtional properties

traskat gravatar imagetraskat ( 2019-06-26 04:57:41 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-07-01 23:58:01 -0500

Vinoth gravatar image

I would suggest not to dig directly into the database when you have the option to get that info from Openstack CLI. Use may use below command to fetch same details you are looking for,

openstack server list --long

Alternatively, the info you are looking for will reside on instance table on the Nova database.

MariaDB [nova]> use nova;
Database changed
MariaDB [nova]> select * from instances;
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-06-25 08:51:51 -0500

Seen: 52 times

Last updated: Jul 01