6.2 computing node Nova computing service component
More steps: OpenStack Victoria installation and deployment series tutorials
OpenStack deployment series
Openstack deployment tutorial series
OpenStack Ussuri offline installation and deployment series tutorial (full)
OpenStack Train offline installation and deployment series tutorial (full)
Welcome to leave messages for communication and common progress.
Nova related software installation and configuration
1. Install nova software
dnf install openstack-nova-compute -y
2. Modification of configuration file
Back up the configuration file / etc / Nova / nova. Before modifying the file conf
cd cp /etc/nova/nova.conf /etc/nova/nova.conf.bak egrep -v "^$|^#" /etc/nova/nova.conf.bak >/etc/nova/nova.conf
Edit VIM / etc / Nova / nova Conf file, about 5500 lines
When changing the content of the command and changing different nodes, be sure to pay attention to the changes of different host names and IP addresses. Before using the command, you need to determine the installation software package first.
dnf install crudini -y
- Calculation node 1
crudini --set /etc/nova/nova.conf DEFAULT enabled_apis osapi_compute,metadata crudini --set /etc/nova/nova.conf DEFAULT transport_url rabbit://openstack:111111@controller crudini --set /etc/nova/nova.conf DEFAULT my_ip 10.0.0.31 crudini --set /etc/nova/nova.conf api auth_strategy keystone crudini --set /etc/nova/nova.conf keystone_authtoken www_authenticate_uri http://controller:5000/ crudini --set /etc/nova/nova.conf keystone_authtoken auth_url http://controller:5000/ crudini --set /etc/nova/nova.conf keystone_authtoken memcached_servers controller:11211 crudini --set /etc/nova/nova.conf keystone_authtoken auth_type password crudini --set /etc/nova/nova.conf keystone_authtoken project_domain_name Default crudini --set /etc/nova/nova.conf keystone_authtoken user_domain_name Default crudini --set /etc/nova/nova.conf keystone_authtoken project_name service crudini --set /etc/nova/nova.conf keystone_authtoken username nova crudini --set /etc/nova/nova.conf keystone_authtoken password 111111 crudini --set /etc/nova/nova.conf vnc enabled true crudini --set /etc/nova/nova.conf vnc server_listen 0.0.0.0 crudini --set /etc/nova/nova.conf vnc server_proxyclient_address '$my_ip' crudini --set /etc/nova/nova.conf vnc novncproxy_base_url http://controller:6080/vnc_auto.html crudini --set /etc/nova/nova.conf glance api_servers http://controller:9292 crudini --set /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp crudini --set /etc/nova/nova.conf placement region_name RegionOne crudini --set /etc/nova/nova.conf placement project_domain_name Default crudini --set /etc/nova/nova.conf placement project_name service crudini --set /etc/nova/nova.conf placement auth_type password crudini --set /etc/nova/nova.conf placement user_domain_name Default crudini --set /etc/nova/nova.conf placement auth_url http://controller:5000/v3 crudini --set /etc/nova/nova.conf placement username placement crudini --set /etc/nova/nova.conf placement password 111111 echo "Result of Configuration" egrep -v "^#|^$" /etc/nova/nova.conf
- Calculation node 2
crudini --set /etc/nova/nova.conf DEFAULT enabled_apis osapi_compute,metadata crudini --set /etc/nova/nova.conf DEFAULT transport_url rabbit://openstack:111111@controller crudini --set /etc/nova/nova.conf DEFAULT my_ip 10.0.0.32 crudini --set /etc/nova/nova.conf api auth_strategy keystone crudini --set /etc/nova/nova.conf keystone_authtoken www_authenticate_uri http://controller:5000/ crudini --set /etc/nova/nova.conf keystone_authtoken auth_url http://controller:5000/ crudini --set /etc/nova/nova.conf keystone_authtoken memcached_servers controller:11211 crudini --set /etc/nova/nova.conf keystone_authtoken auth_type password crudini --set /etc/nova/nova.conf keystone_authtoken project_domain_name Default crudini --set /etc/nova/nova.conf keystone_authtoken user_domain_name Default crudini --set /etc/nova/nova.conf keystone_authtoken project_name service crudini --set /etc/nova/nova.conf keystone_authtoken username nova crudini --set /etc/nova/nova.conf keystone_authtoken password 111111 crudini --set /etc/nova/nova.conf vnc enabled true crudini --set /etc/nova/nova.conf vnc server_listen 0.0.0.0 crudini --set /etc/nova/nova.conf vnc server_proxyclient_address '$my_ip' crudini --set /etc/nova/nova.conf vnc novncproxy_base_url http://controller:6080/vnc_auto.html crudini --set /etc/nova/nova.conf glance api_servers http://controller:9292 crudini --set /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp crudini --set /etc/nova/nova.conf placement region_name RegionOne crudini --set /etc/nova/nova.conf placement project_domain_name Default crudini --set /etc/nova/nova.conf placement project_name service crudini --set /etc/nova/nova.conf placement auth_type password crudini --set /etc/nova/nova.conf placement user_domain_name Default crudini --set /etc/nova/nova.conf placement auth_url http://controller:5000/v3 crudini --set /etc/nova/nova.conf placement username placement crudini --set /etc/nova/nova.conf placement password 111111 echo "Result of Configuration" egrep -v "^#|^$" /etc/nova/nova.conf
Note: configure the [neutron] section of / etc / Nova / nova conf. Refer to the Networking service install guide for more details.
The server component listens to the IP addresses of all local network cards, while the agent component only listens to the IP addresses of the local management network interface as a computing node.
Pay attention to the modification after installation: novncproxy_ base_ The URL is the IP address and the IP address is the supplier address. When there are multiple IP addresses other than the management network, select the appropriate one as the external access address.
openstack-config --set /etc/nova/nova.conf vnc novncproxy_base_url http://192.168.2.11:6080/vnc_auto.html
3. Confirm whether the computing node supports hardware acceleration of the virtual machine
First, determine whether your computing node supports hardware acceleration of virtual machines,
egrep -c '(vmx|svm)' /proc/cpuinfo
- After executing the command, the returned result is a number indicating that hardware acceleration is supported without additional configuration.
If this command returns a value of one or greater, your compute node supports hardware acceleration which typically requires no additional configuration.
#crudini --set /etc/nova/nova.conf libvirt virt_type kvm #egrep -v "^#|^$" /etc/nova/nova.conf|grep 'virt_type'
- Otherwise, you need to edit VIM / etc / Nova / nova In the [libvirt] section of the conf file, modify the following
If this command returns a value of zero, your compute node does not support hardware acceleration and you must configure libvirt to use QEMU instead of KVM.
crudini --set /etc/nova/nova.conf libvirt virt_type qemu egrep -v "^#|^$" /etc/nova/nova.conf|grep 'virt_type'
4. Start the computing service and configure it to start automatically
Start nova service and libvirt service for managing virtual machines in the later stage, and set it to start automatically
systemctl start libvirtd openstack-nova-compute && systemctl enable libvirtd openstack-nova-compute systemctl status libvirtd.service openstack-nova-compute.service
be careful:
(1) If the Nova compute service cannot be started, please turn off the firewall and selinux first
systemctl stop firewalld netstat -lntp systemctl disable firewalld
And check / var / log / Nova / Nova compute log.
tail -f /var/log/nova/nova-compute.log
This error message may indicate that a firewall on the controller node is blocking access to port 5672. Configure the control node firewall to open port 5672 on the controller node and restart the service on the compute node.
(2) Control node, please close the firewall and selinux first
systemctl stop firewalld.service systemctl disable firewalld.service systemctl status firewalld.service systemctl restart rabbit_server.service systemctl restart rabbitmq-server.service systemctl status rabbitmq-server.service firewall-cmd --zone=public --add-port=5672/tcp --permanent systemctl restart firewalld firewall-cmd --zone=public --query-port=5672/tcp
Add calculation node to cell database
After the configuration is completed, wait until you return to the control node for confirmation, and then shut down and take a snapshot.