Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

51 steps to create a virtual machine in openstack

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

I. Preface

This article is supplemented and modified on the basis of Mr. Lim Hai-Feng 's "29 steps required for openstack to create a VM". Only six core components are used in the article. For ease of understanding, the rabbit mq and db in different components of the architecture are the same (separate db and rabbit mq can be configured for each component). The openstack components are called through REST, the components communicate through the RPC protocol, and the RPC protocol is implemented based on the AMQP model. Rabbit mq is a software that uses this model.

II. Overview

Take the real-life PC as an example to illustrate the VM created by openstack. For a PC to work properly, it needs to have four basic elements: computing unit, system, network and storage unit. The corresponding components in openstack to achieve this function are: nova, glance, neutron and cinder. Here is a detailed description of the specific steps in the creation of a VM.

3. Detailed explanation of the process of creating VM

The figure above shows the whole process from the initiation of a VM request to the completion of VM creation on openstack. The above 51 steps are explained in detail below:

When a user initiates a request to create a VM through horizon or cli, he or she first goes to keystone for authentication; after the authentication is passed, keystone returns the result to the user, which contains the token token of the user's rights; the user initiates a request to create a virtual machine through token like nova-api; nova-api first goes to keystone to verify whether the user's token is valid; keystone returns the authenticated result to nova-api Nova-api stores the information that the user wants to create VM, such as CPU, memory, network and hard disk, into the database; after the storage is completed, the database returns the results to nova-api;nova-api and throws the information to be created by VM into the message queue; nova-scheduler receives this information from the message queue; nova-shceduler queries the physical server that can host VM from the database The database feeds back the available physical servers to nova-scheduler, which finally selects a physical machine to host VM;nova-scheduler and throws the physical machine information of the final hosting VM into the message queue; the nova-compute on the selected physical server receives the message; nova-compute throws the query request into the message queue to obtain the flavor type that the user needs to create VM; nova-conductor receives the request from the message queue. The function of this component is to prevent VM from being used as a springboard to directly * database after being breached. In a large-scale environment, this component may become a bottleneck; nova-conductor goes to the database to query the flavor type that the user wants to create; the database feedback the query result to nova-conductor;nova-conductor and throws the flavor type of VM that the user needs to create into the message queue. Nova-conpute obtains the flavor type, so nova-compute knows which resources the user needs to create VM; nova-compute initiates an image request to glance-api; glance-api authenticates to keystone; keystone returns the authenticated result to glance-api (communication between glance components does not go through rabbit mq); glance-api leaves the task to glance-registry, and glance-registry is responsible for storing system image metadata. Glance-registry queries db about the image and the location of the image needed to create VM; glance-registry returns the result to glance-api;glance-api to obtain the mirror on the object store where the image is stored (the glance mode here is V1, in which glance-registry,glance-api is directly connected to db and image store); glance-api feedback the image result to nova-compute, so that the system image has Nova-compute initiates a network creation request to neutron-server (neutron-server acts as api here, but the name is not api); neutron-server goes to keystone for authentication; neutron-server throws the request to create a network into the message queue; neutron-plugins receives the request from the message queue; neutron-plugins goes to db to obtain the plugin used by the network to be created and the network type and mechanism type to create the network. Neutron-plugins throws the obtained information into the message queue; neutron-agents receives the information from the message queue and performs network creation; neutron-agents saves the relevant information created to the database; after neutron-agents creation is completed, the message is thrown into the message queue; neutron-server receives the created information from the message queue; neutron-server feeds the information back to nova-compute, so that the network conditions are available Nova-compute initiates a request for persistent storage to cinder-api; cinder-api first goes to keystone for identity authentication; after authentication, it throws the information that needs to create persistent storage into the message queue; cinder-scheduler receives information from the message queue; cinder-scheduler goes to db to query which physical hosts can provide persistent storage, and selects one according to the right; cinder-scheduler throws the result into the message queue The cinder-volume on the selected host receives the message; cinder-volume calls the back-end storage driver to create a persistent storage device, such as LVM, etc.; cinder-volume stores the created persistent storage information in the database; cinder-volume throws the created result into the message queue; cinder-api receives the message from the message queue Cinder-api feeds back the message to nova-compute, so that the four basic conditions for computing, system image, network and storage required by a VM are met. Nova-compute calls hypervisor to create VM,hypervisor, which can be KVM, XEN, VMware, and so on.

These are the steps that a VM in openstack needs to go through from initiating a request to creating. If more than four components are used in the example, nova-compute still initiates a request to the api of the corresponding component. When all the conditions are met, call hypervisor to create the VM.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report