Lecture 21: The process of creating a virtual machine [Interview openstack engineers will basically test this question! ! ! 】

blog.51cto.com/egon09/1845226 Teacher Blog

Lecture 21: The process of creating a virtual machine [Interview openstack engineers will basically test this question!  !  !  】

The virtual machine startup process is as follows:

The interface or command line obtains authentication information from keystone through the RESTful API.

Keystone requests authentication information through users, and generates an auth-token to return to the corresponding authentication request.

The interface or command line sends a boot instance request (carrying auth-token) to nova-api through the RESTful API.

After receiving the request, nova-api sends an authentication request to Keystone to check whether the token is a valid user and token.

Keystone verifies whether the token is valid, and returns valid authentication and corresponding roles if valid (Note: Some operations require role permissions to operate).

After passing the authentication, nova-api communicates with the database.

Initialize the database record of the newly created virtual machine.

Nova-api requests nova-scheduler through rpc.call whether there is a resource (Host ID) for creating a virtual machine.

The nova-scheduler process listens to the message queue and obtains nova-api requests.

Nova-scheduler queries the status of computing resources in the nova database, and uses scheduling algorithms to calculate hosts that meet the needs of virtual machine creation.

For hosts that match the creation of a virtual machine, nova-scheduler updates the physical host information corresponding to the virtual machine in the database.

nova-scheduler sends the corresponding message of the virtual machine creation request to nova-compute through rpc.cast.

nova-compute will get the message of the virtual machine creation request from the corresponding message queue.

nova-compute requests nova-conductor for virtual machine information through rpc.call. (Flavor)

nova-conductor gets the nova-compute request message from the message queue.

Nova-conductor queries the information corresponding to the virtual machine according to the message.

nova-conductor obtains the corresponding information of the virtual machine from the database.

Nova-conductor sends the virtual machine information to the message queue in the form of messages.

nova-compute obtains virtual machine information messages from the corresponding message queue.

nova-compute obtains the authenticated token through keystone's RESTfull API, and requests the glance-api through HTTP to obtain the image needed to create the virtual machine.

glance-api verifies whether the token is valid to Keystone and returns the verification result.

After the token verification is passed, nova-compute obtains the virtual machine image information (URL).

nova-compute obtains the token for authentication k through keystone's RESTfull API, and requests the neutron-server through HTTP to obtain the network information needed to create the virtual machine.

The neutron-server verifies whether the token is valid to Keystone and returns the verification result.

The token verification is passed, and nova-compute obtains the virtual machine network information.

Nova-compute obtains the authenticated token through keystone's RESTfull API, and requests the cinder-api through HTTP to obtain the persistent storage information needed to create the virtual machine.

Cinder-api verifies whether the token is valid to Keystone and returns the verification result.

After the token verification is passed, nova-compute obtains the persistent storage information of the virtual machine.

Nova-compute calls the configured virtualization driver to create a virtual machine based on the instance information.

Lecture 21: The process of creating a virtual machine [Interview openstack engineers will basically test this question!  !  !  】

Lecture 21: The process of creating a virtual machine [Interview openstack engineers will basically test this question!  !  !  】

Guess you like

Origin blog.51cto.com/8189171/2546484