Ask Your Question
0

How can i "see" VM insantiation time.

asked 2019-10-08 04:02:52 -0600

p4pe gravatar image

Hello everyone,

Im new to Openstack's world, i would like to measure the instantiation time of a VM(i.e the time from "launch" until a vm to be active).

Does openstack provide this somehow?

Thank you in advance.

edit retag flag offensive close merge delete

Comments

1

As far as I know, this is not measured. You could, however, use the nova-api log file. Find out the request ID for the launch request and look at the time stamps of relevant log entries.

It might be easier to just add time measurement to the code.

Bernd Bausch gravatar imageBernd Bausch ( 2019-10-08 04:48:39 -0600 )edit

Thank you for your answer. Do you know which script in nova module should i change? because the git is a little bit chaotic.

p4pe gravatar imagep4pe ( 2019-10-08 07:28:54 -0600 )edit

Sorry, no. I would have to search for it, probably by finding where the route for the server-create API is defined, then by grepping for code lines that set the status to ACTIVE.

Bernd Bausch gravatar imageBernd Bausch ( 2019-10-08 07:44:51 -0600 )edit

Searching at the nova-compute logs in the compute node.. I realize that logs provide information about the spawning time in the hypervisor(6.6 sec) and after this the time to build the instance (7.34sec for my instance). Do you think that this is the value that i want?

p4pe gravatar imagep4pe ( 2019-10-08 12:18:58 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-10-08 07:51:11 -0600

There are several ways to do this. Let me explain this in detail

  • Supply meta-data at the time of the creation of the VM and then you can calculate the uptime by taking the time difference.
  • Use solutions like Ceilometer or stacktach
  • You can also use os-simple-tenant-usage API call to get the results and then filter them out according to your own need.

Also, keep in mind that there is a difference between the uptime and time since the server was created. The original uptime cannot be found using the os-simple-tenant-usage API. It will only return the time since the server was created in the field named uptime

I hope this helps !!

edit flag offensive delete link more

Comments

I don't think that Ceilometer measures the time between launch and activation. os-simple-tenant just summarizes resource usage, but not the data the OP wants. I am not aware of any metadata that triggers calculation of the time between launch and becoming active.

Stacktach looks interesting.

Bernd Bausch gravatar imageBernd Bausch ( 2019-10-08 09:18:24 -0600 )edit

@Bernd Bausch, do you think that stacktach can help?

p4pe gravatar imagep4pe ( 2019-10-08 10:19:24 -0600 )edit

I learned about it an hour ago. All I can do is read its documentation.

Bernd Bausch gravatar imageBernd Bausch ( 2019-10-08 10:35:03 -0600 )edit

So to wrap-up I shoudl try the two "ways" that you said me above, and the stacktach

p4pe gravatar imagep4pe ( 2019-10-08 10:56:24 -0600 )edit

@p4pe I am sorry. I misread your question. I thought you needed to get the uptime for a VM. I answered this keeping the uptime in mind. I agree with @Bernd Bausch and I went through your question again. You can try stacktach OR you can hook into rabbitmq to see and extract VM related events

Syed Awais Ali gravatar imageSyed Awais Ali ( 2019-10-10 04:03:06 -0600 )edit

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-10-08 04:02:52 -0600

Seen: 70 times

Last updated: Oct 08