0% found this document useful (0 votes)
44 views4 pages

VM Creation Process in OpenStack Nova - Simple and Elegant

Uploaded by

RAMPrabhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views4 pages

VM Creation Process in OpenStack Nova - Simple and Elegant

Uploaded by

RAMPrabhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

9/8/2017 VM creation process in OpenStack nova | Simple and elegant

Simple and elegant


"The simple things are also the most extraordinary things" – Paulo Coelho

Home
About me
Sharing

Type text to search here...


Home > openstack > VM creation process in OpenStack nova

VM creation process in OpenStack nova


January 7, 2014 Prosunjit Biswas Leave a comment Go to comments

VM creation process in Openstack nova – a step by step guide

1. **** Python Nova-Client **** :


nova boot –image cirros-0.3.1-x86_64-uec-kernel –flavor m1.tiny s2

2. **** Nova API **** :


a. /opt/stack/nova/nova/api/openstack/compute/servers.py M: create() Description: Gather
information about new vm (flavor, network and so on)
b. /opt/stack/nova/nova/compute/api.py M : create() Description: check vm create policies,
call rpc to send message to scheduler
c. /opt/stack/nova/nova/compute/rpcapi.py M: run_instance Description: cast the vm
createtion message to the scheulder
d. An entry is made in the dababase setting the vm status “BUILD” / “Swapning”

when Intercepted from rabbitmq VM creattion Message looks like:

https://prosuncsedu.wordpress.com/2014/01/07/vm-creation-process-in-openstack-nova/ 1/4
9/8/2017 VM creation process in OpenStack nova | Simple and elegant

"_context_request_id":"req-105fe9dd-9f34-4377-bc23-fa9bf6ffe71b",
"_context_quota_class":null,
"user_id":"aa59e71cc3a24abb86c9aefc1f72342e",
"display_description":"s2",
"project_id":"73640f0046794110936a345e2576601e",
"display_name":"s2",
"memo ry_mb":512,
"image_ref":"71b14bd0-7793-4b07-a8cf-db4b2c46e56d",
"_unique_id":"70b9c5f59a074578b2a578907a616f7d",
"_context_project_name":"demo",
"_context_project_id":"73640f0046794110936a345e2576601e",
"_context_user":"aa59e71cc3a24abb86c9aefc1f72342e",
"_context_user_ name":"demo",
"method":"run_instance",
"_context_remote_address":"10.245.122.50"
}

3. ****NOVA_SCHEDULDER****:

At the scheduler side:


a. RPC Dispatcher OpenStack/common/rpc/dispatcher.py dispatches the message to
the worker.
b. /opt/stack/nova/nova/scheduler/manager.py M: run_instance() is called to
create and run the VM
c. /opt/stack/nova/nova/scheduler/filter_scheduler.py M: schedule_run_instance()
is called to find eligible host where new vm can be created and run.
d. If possible VM is created & run and in the database the status of the machine
is changed to Active / Error or something else.
d. The status of the creation process is also send through notifier.notify()
method.
f. /opt/stack/nova/nova/openstack/common/notifier/api.py M: notify() is called
which put the message in the message queue.

A nofication (of type Info) message (truncated) stating VM creation error is


following:

"_context_request_id":"req-105fe9dd-9f34-4377-bc23-fa9bf6ffe71b",
"_unique_id":"70b9c5f59a074578b2a578907a616f7d",
"_context_timestamp":"2014-01-07T21:23:07.811452",
"_context_user_id":"aa59e71cc3a24abb86c9aefc1f72342e",
"_context_project_name":"demo",
"_context_read_deleted":"no",
"_contex t_auth_token":"b194a1b3275f407d9dfdaf5013b59267",
"_context_tenant":"73640f0046794110936a345e2576601e",
"_context_instance_lock_checked":false,
"_context_is_ admin":false,
"version":"2.0",
"_context_project_id":"73640f0046794110936a345e2576601e",
"_context_user":"aa59e71cc3a24abb86c9aefc1f72342e",
"_context_user_ name":"demo",
"method":"run_instance",
"_context_remote_address":"10.245.122.50"
}

Note that both message has the same request id which is shown by the field
_context_request_id and both message refer to the same VM which is dictated by
the field _unique_id. So, upon receiving the message, the notification system may
know the status of vm creation process.

https://prosuncsedu.wordpress.com/2014/01/07/vm-creation-process-in-openstack-nova/ 2/4
9/8/2017 VM creation process in OpenStack nova | Simple and elegant

Advertisements

₹ 849 ₹ 149 ₹ 5,41,799

₹ 695 ₹ 599 ₹ 849


Amazon India

 Like
Be the first to like this.
Categories: openstack Tags: nova, openstack
Comments (0) Trackbacks (0) Leave a comment Trackback

1. No comments yet.

1. No trackbacks yet.

Leave a Reply

Enter your comment here...

Intercepting internal messages from RabbitMQ in OpenStack Nova Dog Tour 2013
RSS feed

https://prosuncsedu.wordpress.com/2014/01/07/vm-creation-process-in-openstack-nova/ 3/4
9/8/2017 VM creation process in OpenStack nova | Simple and elegant

Recent Posts

Python: string.split() vs re.split()


Python ‘in’ operator with Iterator
Preserving states across function call
in Python
OpenStack Austin summit in pictures
Hard link vs soft link

Categories

About me (18)
Motivation (1)
Access control Concepts (6)
Admission (7)
algorithm (3)
কথপকখন (1)
code Igniter (1)
Diary (7)
Encryption (1)
general (3)
Information Security (2)
java hacks (4)
latex (5)
openstack (45)
keystone (7)
Access Control (2)
swift (3)
php (3)
python (3)
Secure Web Browsing (1)
self development (10)
Happy Living (1)
Story (1)
Technology (7)
javascript (2)
Uncategorized (89)
Unix (13)
utsa big data cloud lab (1)
zero-VM (5)

Archives

Select Month

Blogroll

Adam young's Blog


Chad Lung's blog
Gustavo Duarte

Follow Simple and elegant


Top
Create a free website or blog at WordPress.com.

https://prosuncsedu.wordpress.com/2014/01/07/vm-creation-process-in-openstack-nova/ 4/4

You might also like