This article is published by the public account [development pigeon]! Welcome to pay attention!!!
Old rules - sister town building:
1. Image type
One is the physical machine image format. ISO BIN IMAGE, etc. To create a virtual machine using this kind of image, you need to install the operating system from scratch.
One is the virtual machine image format. raw qcow2 vmdk et al. The system has been installed and basic settings have been made, which can be regarded as a template.
The image uploaded from OpenStack to grace can be either a physical machine image in ISO format or a virtual machine image in qcow2 format.
It has the following format
ISO Raw Machine (kernel/ramdisk outside of image, a.k.a. AMI) VHD (Hyper-V) VDI (VirtualBox) qcow2 (Qemu/KVM) VMDK (VMWare) OVF (VMWare, others)
2. Container format
Container format refers to whether the virtual machine image contains a file format, which also contains metadata about the actual virtual machine. It should be noted that the container format string will not be used by grace or other OpenStack components at present, so if you are not sure, it is safe to simply specify the container format to bare.
3.OpenStack image upload method
You can upload through dashboard or openstack. The image name can be repeated. Find the image according to the ID. For example, when uploading images of Windows Server 2008 (ISO and qcow2 formats), select the corresponding format when uploading images of different formats.
4. (not implemented) dashboard create image
In the image interface of dashboard, create images in ISO format and QCOW2 format by creating images, as shown below:
View the image image through the openstack command line:
View the physical file corresponding to the Image in the default images storage directory / var / lib / Grace / images:
ll /var/lib/glance/images
5. (not implemented) Grace create image command
glance image-create The command can use the following parameters: --id <IMAGE_ID> #ID of the mirror --name <NAME> #Name of the mirror --store <STORE> #Upload stored image to --disk-format <DISK_FORMAT> #The format of the image. Acceptable formats include: ami,ari, aki, vhd, vmdk, raw, qcow2, vdi, and iso --container-format <CONTAINER_FORMAT> #Format of the mirror container. Acceptable formats include: ami,ari, aki, bare, and ovf --owner <TENANT_ID> # Tenant owning the image --size <SIZE> #The size of the image (expressed in bytes). Generally, it is only related to '-- location' and '-- copy'_ Use with 'from'. --min-disk <DISK_GB> #The minimum hard disk space (in gigabytes) required to start the image --min-ram <DISK_RAM> #The minimum amount of memory (in megabytes) required to start mirroring --location <IMAGE_URL> #The URL of the location where the image is located. For example, if the image is stored in swift, --file <FILE> #Local files (including hard disk images) to be uploaded during creation. In addition, the image can also be passed to the client through stdin. --checksum <CHECKSUM> #The hash value of the image data used by grace for authentication. Please provide an md5 check value here. --copy-from <IMAGE_URL> #The usage is similar to the '-- location' parameter, but indicates that the grace server should be able to immediately copy and store data from where the image is stored. --is-public [True|False] #Indicates whether the image can be accessed by the public. --is-protected [True|False] #Used to prevent the image from being deleted. --property <key=value> #Any attributes related to mirroring. Can be used many times. --human-readable #Print the size of the image in a human friendly format. --progress #Show uploaded progress bar
Get admin permission first
source admin-openrc
Upload ISO format image:
glance image-create --name "win7_xshell_iso" --file /root/image/ cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso --disk-format iso --container-format bare --visibility public --progress
Upload qcow2 format image:
glance image-create --name "win7_xshell_qcow2" --file /root/image/ cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso --disk-format qcow2 --container-format bare --visibility public --progress
6. Deploy kvm basic environment
Install kvm core package - virtual operating system simulator acceleration module
yum -y install qemu-kvm qemu-kvm-tools
Install kvm management tools
yum -y install libvirt libvirt-python libguestfs-tools
Install the image installer virt install
yum install -y virt-install
Install vncserver. Use vnc viewer connection to complete the graphical installation of virtual machine.
yum -y install tigervnc-server
When installing the system, the virtual machine will use the graphical interface. The host will install vncserver. When installing the virtual machine, set the vnc client and other remote ports to connect the virtual machine, such as 59005902, and then connect the virtual machine through the vnc client for system installation.
vnc client is used to remotely connect to vnc server. It can be software under windows. Such as VNC viewer. When the viewer connects to the vnc server, it is necessary to ensure that the relevant ports of the server host firewall are open or closed temporarily.
systemctl stop firewalld or firewall-cmd --zone=public --add-port=5900/tcp --permanent firewall-cmd --reload
Start the libvirtd hypervisor:
systemctl enable libvirtd systemctl start libvirtd
7. Image production of CentOS system qcow2 format
(1) Create a network for the virtual machine
To manually create an image, you need to ensure that libvirt runs a default network, which can provide Internet services for virtual machines.
Check whether the default network is currently enabled
virsh net-list
Note: if not enabled, use the following command to enable default
virsh net-start default
(2) Create virtual machine
Upload the iso image file to the / image directory:
Create a 20G qcow2 format disk file for the virtual machine
qemu-img create -f qcow2 /vhost/centos7_x86_64.qcow2 20G
Installing centos7 virtual machine
virt-install --virt-type kvm --name centos7_x86_64 --ram 2048 --disk /vhost/centos7_x86_64.qcow2,format=qcow2 --network network=default --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type=linux --location=/image/CentOS-7-x86_64-DVD-2009.iso
View the virtual machine port just created through kvm:
netstat -lntup | grep kvm
Therefore, it can be deduced that the current virtual machine connection address is 192.168.112.146:5900. Connect to this address through vnc client:
Install the minimum version of minimal according to centos installation method.
Account: root password: wangdage980204
Create a test1 file in the / root directory to check whether the subsequent virtual machine creation through this qcow2 image is the original image.
Note: only when KVM virtual machine is configured, libvirt will generate an XML file corresponding to the operating system, which records the status of KVM virtual machine. The path is as follows: / etc/libvirt/qemu/CentOS-6.6-x86_64.xml
Note: this file can only be modified by the "virsh edit" command
(3) Start and test virtual machine
View the current virtual machine status:
Start virtual machine:
After closing the virtual machine, back up the image in qcow2 format:
(4) Create a mirror of the Controller node into the grace
Upload the centos7 image in qcow2 format just made to grace:
Get admin permission first
source /scripts/admin-openrc
Upload the image to grace:
openstack image create --file /vhost/centos7_x86_64.qcow2 --disk-format qcow2 --container-format bare --public centos7_x86_64
To view the current image image:
View the physical file corresponding to the Image in the default images storage directory / var / lib / Grace / images:
ll /var/lib/glance/images
(5) Create an instance through dashboard test
Create an instance through the image interface of the dashboard, but first you need to create an instance type
We set the instance type as 2-core, 2G memory and 20G disk.
Then create an instance through the previously uploaded centos7 image:
We can connect to the instance through the console to check whether the test1 file in the instance exists. If it exists, it indicates that it is an image in qcow2 format created earlier:
(6) Create a single instance with the command
openstack server create --image centos7_x86_64 --flavor centos7 centos7_2
The method of creating through the command line is more stable, and there will be multiple creation failures through the web interface.
(7) Create a new instance from the same mirror
openstack server create --image centos7_x86_64 --flavor centos7 centos7_2
Obviously, creating a new instance through the same image fails:
(8) Copy the new image and create a new instance
Submit a new qcow2 format image to grace from the original qcow2 format image
openstack image create --file /vhost/centos7_x86_64.qcow2 --disk-format qcow2 --container-format bare --public centos7_x86_64_2
openstack server create --image centos7_x86_64_2 --flavor centos7 centos7_2
The result is still creation failure:
Is this because images in the same qcow2 format cannot be uploaded to grace as two images? We submitted two images to grace through an image in the same qcow2 format. The first image was created successfully and the second image failed.
(9) Copy qcow2 format image and upload it to grace again
Submit the image in the new qcow2 format to grace:
openstack image create --file /vhost/centos7_x86_64_2.qcow2 --disk-format qcow2 --container-format bare --public centos7_x86_64_2
openstack server create --image centos7_x86_64_2 --flavor centos7 centos7_2
Still failed to create. These two qcow2 files are different. Why do you still make mistakes?
(10) Create a new qcow2 format image based on the qcow2 format basic image
To view the current qcow2 format image:
It can be seen that the virtual size of the image file in the current qcow2 format is 20G and the disk size is 1.6G.
Create a new image in qcow2 format based on this image:
qemu-img create -b centos7_x86_64.qcow2 -f qcow2 centos7_x86_64_2.qcow2
To view information about the new image:
You can see that the image is the CentOS of the reference base image_ x86_ 64.qcow2, and its disk size is only 196k. This is an incremental image, similar to incremental backup or copy on write. First, we create an image file a and install a new operating system on a. Then create an image B through image A. from this moment, only read operations will occur on image a and data will be written to image B.
Therefore, the basic image cannot be deleted. After deletion, other images based on the basic image will become invalid.
(11) Upload the new incremental image to grace
Upload the image to grace:
openstack image create --file /vhost/centos7_x86_64_2.qcow2 --disk-format qcow2 --container-format bare --public centos7_x86_64_2
(12) The test creates an instance through the new image
openstack server create --image centos7_x86_64_2 --flavor centos7 centos7_2
Also failed to create? Why?
After thinking about it, I found that the flavor of centos7 is used. The format of this flavor is 2G, 2-core CPU and 20G disk. My Compute node uses 4G memory. Therefore, the memory space is insufficient, so the creation will always fail.
(13) After creating a new flavor, continue to create the virtual machine
openstack flavor create --ram 1024 --disk 20 --vcpus 1 --id 3 centos72
To view the list of current flavor s:
Try to create the virtual machine again, but use the new flavor:
openstack server create --image centos7_x86_64_2 --flavor centos72 centos7_new
error status still appears;
(14) View nova logs
There are nova logs in both the Controller node and the Compute node. First view the nova logs in the Controller node:
We need to analyze the nova-api.log log:
The following command
openstack server list to query the instance list
It corresponds to the following two lines in nova-api.log. One line is to query server and the other line is to query flavor:
2021-09-17 19:24:30.891 2252 INFO nova.osapi_compute.wsgi.server [req-0c90b8ee-66eb-4ca9-9c4b-d3e465211ec6 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/servers/detail HTTP/1.1" status: 200 len: 4801 time: 0.6548059 2021-09-17 19:24:30.949 2252 INFO nova.osapi_compute.wsgi.server [req-9afe362e-35e6-451c-bb98-21ead6db2dd3 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/detail?is_public=None HTTP/1.1" status: 200 len: 1479 time: 0.0143611
Command to delete an instance:
openstack server delete centos7_new, corresponding to the following logs:
The log in the Nova API corresponding to deleting an instance is as follows. The first search is centos7_new instance, why not find it?
Then query / v2.1/servers/centos7 through the get method_ New, the status code is 404, indicating that it is not found;
Then query / v2.1/servers? Name = centos7 through the get method_ New, the status code is 200, indicating that it is found;
Then query / v2.1/servers/7ac8e2f0-0bb1-4e48-b0cf-00de7e050c1c through the get method. The following transmitted characters are the instance number and the status code is 200, indicating that it has been found;
Finally, delete / v2.1/servers/7ac8e2f0-0bb1-4e48-b0cf-00de7e050c1c through the delete method. The status code is 204, indicating that there is no returned content;
2021-09-17 19:33:35.449 2255 INFO nova.api.openstack.wsgi [req-feb51187-0712-4ebe-9861-0b060e135a56 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] HTTP exception thrown: example centos7_new Can't find. 2021-09-17 19:33:35.450 2255 INFO nova.osapi_compute.wsgi.server [req-feb51187-0712-4ebe-9861-0b060e135a56 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/servers/centos7_new HTTP/1.1" status: 404 len: 522 time: 0.2160928 2021-09-17 19:33:35.561 2255 INFO nova.osapi_compute.wsgi.server [req-65e9a8f7-0ee7-4ab3-968d-3a33653aa71b 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/servers?name=centos7_new HTTP/1.1" status: 200 len: 705 time: 0.1083212 2021-09-17 19:33:35.645 2255 INFO nova.osapi_compute.wsgi.server [req-3ab6a065-810a-4cbc-8a8b-09124c4da408 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/servers/7ac8e2f0-0bb1-4e48-b0cf-00de7e050c1c HTTP/1.1" status: 200 len: 4267 time: 0.0799270 2021-09-17 19:33:35.742 2255 WARNING nova.compute.api [req-55be22b0-898b-426f-b382-119f60c43d74 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] [instance: 7ac8e2f0-0bb1-4e48-b0cf-00de7e050c1c] instance's host None is down, deleting from database 2021-09-17 19:33:36.456 2255 INFO nova.osapi_compute.wsgi.server [req-55be22b0-898b-426f-b382-119f60c43d74 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "DELETE /v2.1/servers/7ac8e2f0-0bb1-4e48-b0cf-00de7e050c1c HTTP/1.1" status: 204 len: 405 time: 0.8070309
The commands to create the virtual machine are as follows:
openstack server create --image centos7_x86_64_2 --flavor centos72 centos7_new
Query the list of flavor, and the status code is 200;
Query the virtual machine type centos72, but it is not found;
Query / v2.1/flavors/centos72 through the get method. The status code is 404, indicating that it is not found;
Query / v2.1/flavors through the get method, and the status code is 200;
Upload the instance to / v2.1/servers through the post method. The status code is 202, indicating asynchronous processing;
Query the server status through the get method / v2.1/servers/a275a604-84f0-43f4-98d1-7cc3bb0903, and the status code is 200;
Query the flag with the specified id of 3 through the get method, / v2.1/flags/3, and the status code is 200;
2021-09-17 19:51:48.612 2254 INFO nova.osapi_compute.wsgi.server [req-196b6d50-aed7-4476-bc53-59ad2f6d96a9 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/detail HTTP/1.1" status: 200 len: 1479 time: 0.2345939 2021-09-17 20:01:58.911 2253 INFO nova.api.openstack.wsgi [req-ce277c0e-ac19-4358-bf26-c67ac8199a52 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] HTTP exception thrown: Virtual machine type centos72 Can't find. 2021-09-17 20:01:58.912 2253 INFO nova.osapi_compute.wsgi.server [req-ce277c0e-ac19-4358-bf26-c67ac8199a52 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/centos72 HTTP/1.1" status: 404 len: 537 time: 0.0172770 2021-09-17 20:01:58.928 2253 INFO nova.osapi_compute.wsgi.server [req-707e4e40-0561-48b4-896d-646d1cd7bd59 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors HTTP/1.1" status: 200 len: 965 time: 0.0131981 2021-09-17 20:01:58.942 2253 INFO nova.osapi_compute.wsgi.server [req-a1ec74e0-1377-4c77-ac4e-0ca6ff1be1b8 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/3 HTTP/1.1" status: 200 len: 766 time: 0.0103431 2021-09-17 20:01:59.407 2253 INFO nova.osapi_compute.wsgi.server [req-63b82c1f-1f5e-492e-9b66-dc761f45164c 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "POST /v2.1/servers HTTP/1.1" status: 202 len: 876 time: 0.4548001 2021-09-17 20:01:59.457 2253 INFO nova.osapi_compute.wsgi.server [req-5f961569-c5ff-4b0f-aefb-bc3e36d452fd 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/servers/a275a604-84f0-43f4-98d1-7cc3bbbb0903 HTTP/1.1" status: 200 len: 1691 time: 0.0470769 2021-09-17 20:01:59.484 2253 INFO nova.osapi_compute.wsgi.server [req-526091aa-08ee-4c28-9df1-c0d531ac94d5 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/3 HTTP/1.1" status: 200 len: 766 time: 0.0102990
(15) View image log
On the Controller node, view the / var / log / Grace / api.log, that is, the mirrored log, and get the following results:
Query / V2 / images / centos7 through the get method_ x86_ 64_ 2. What is the image image used;
2021-09-17 20:01:58.868 2200 INFO eventlet.wsgi.server [req-837eac44-cc2f-4f8e-9913-796cc0721877 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 - - [17/Sep/2021 20:01:58] "GET /v2/images/centos7_x86_64_2 HTTP/1.1" 404 450 0.238023 2021-09-17 20:01:58.885 2200 INFO eventlet.wsgi.server [req-9ff3b12d-d3b8-4443-b7ce-b2a8f21d3581 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 - - [17/Sep/2021 20:01:58] "GET /v2/images?limit=20 HTTP/1.1" 200 2637 0.015316 2021-09-17 20:01:58.890 2200 INFO eventlet.wsgi.server [req-2cb129aa-d608-4b6a-8508-2d4fa267ce69 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 - - [17/Sep/2021 20:01:58] "GET /v2/schemas/image HTTP/1.1" 200 6925 0.002258 2021-09-17 20:01:59.122 2200 INFO eventlet.wsgi.server [req-8fce43e8-3b25-41fe-88d7-8bec729187bd 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 - - [17/Sep/2021 20:01:59] "GET /v2/images/6e6047e0-7ecc-49d2-aa17-79cacff593af HTTP/1.1" 200 986 0.149315 2021-09-17 20:01:59.127 2200 INFO eventlet.wsgi.server [req-d15b7265-b4c4-409f-8c36-bdd11e8c6e68 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 - - [17/Sep/2021 20:01:59] "GET /v2/schemas/image HTTP/1.1" 200 6925 0.002797 2021-09-17 20:01:59.471 2200 INFO eventlet.wsgi.server [req-e1b2226b-62fa-42ba-90b8-1366f82d7356 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 - - [17/Sep/2021 20:01:59] "GET /v2/images/6e6047e0-7ecc-49d2-aa17-79cacff593af HTTP/1.1" 200 986 0.010701 2021-09-17 20:02:07.870 2200 INFO eventlet.wsgi.server [req-d23793ee-fafb-40fe-a13a-88347aaa1d6b 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 - - [17/Sep/2021 20:02:07] "GET /v2/images?limit=20 HTTP/1.1" 200 2637 0.015508 2021-09-17 20:02:07.874 2200 INFO eventlet.wsgi.server [req-47401128-8408-45a4-9a75-dd14d27088b1 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 - - [17/Sep/2021 20:02:07] "GET /v2/schemas/image HTTP/1.1" 200 6925 0.002249
(16) Troubleshooting the log process of creating a server instance according to nova
The client sends a request to Nova API to create a virtual machine;
After Nova API processes the request, it sends the message "let the scheduler create a virtual machine" to mq;
Nova scheduler obtains the message sent to it by API from mq, and then executes the scheduling algorithm to select node A from several computing nodes;
Noav scheduler sends the message "create virtual on node A" to mq;
Compute node A's Nova compute obtains the message sent to it by Nova scheduler from mq, and then starts the virtual machine on the Hypervisor of this node;
During the creation of the virtual machine, if the Nova compute of computing node A needs to query or update the database message, it will send A message to Nova conductor through mq. Nova conductor is responsible for database access.
Execute the command to create the server instance:
openstack server create --image centos7_x86_64_2 --flavor centos72 centos7_new
First view the nova-api.log log of the Controller node:
2021-09-17 23:48:46.780 2253 INFO nova.api.openstack.wsgi [req-32b257bf-2ff5-4b94-9213-1072fa557b8c 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] HTTP exception thrown: Virtual machine type centos72 Can't find. 2021-09-17 23:48:46.781 2253 INFO nova.osapi_compute.wsgi.server [req-32b257bf-2ff5-4b94-9213-1072fa557b8c 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/centos72 HTTP/1.1" status: 404 len: 537 time: 0.0147262 2021-09-17 23:48:46.799 2253 INFO nova.osapi_compute.wsgi.server [req-851da075-eb20-4924-a170-1f58753967ad 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors HTTP/1.1" status: 200 len: 965 time: 0.0149779 2021-09-17 23:48:46.812 2253 INFO nova.osapi_compute.wsgi.server [req-2a3944b4-a89d-4f6c-9cbe-234442da470d 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/3 HTTP/1.1" status: 200 len: 766 time: 0.0095580 2021-09-17 23:48:47.149 2253 INFO nova.osapi_compute.wsgi.server [req-ba7cca9e-6c0d-4a8e-b657-60673456a472 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "POST /v2.1/servers HTTP/1.1" status: 202 len: 876 time: 0.3276680 2021-09-17 23:48:47.374 2253 INFO nova.osapi_compute.wsgi.server [req-9989529b-317e-4998-9eff-14c4e69e6aa4 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/servers/4f75fd35-c53c-4feb-90bf-391996dee667 HTTP/1.1" status: 200 len: 1691 time: 0.2202811 2021-09-17 23:48:47.426 2253 INFO nova.osapi_compute.wsgi.server [req-e151852b-8b42-4f52-88e7-95369c3fc61a 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/3 HTTP/1.1" status: 200 len: 766 time: 0.0206590 2021-09-17 23:49:03.443 2255 INFO nova.osapi_compute.wsgi.server [req-a78a63b6-06a6-4238-ac77-1472c2d67d15 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/flavors/detail HTTP/1.1" status: 200 len: 1479 time: 0.8354931 2021-09-17 23:49:03.536 2255 INFO nova.osapi_compute.wsgi.server [req-19ee3aa7-264d-4bce-8efd-de09763f1b1c 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1 HTTP/1.1" status: 302 len: 317 time: 0.0038280 2021-09-17 23:49:03.543 2255 INFO nova.osapi_compute.wsgi.server [req-6ae78456-5d4a-42d9-af14-e1a30fb18521 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/ HTTP/1.1" status: 200 len: 788 time: 0.0038471 2021-09-17 23:49:05.096 2254 INFO nova.osapi_compute.wsgi.server [req-0a1dfa3a-d832-4c44-abf0-716803a29475 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/servers/detail?limit=21&project_id=a7d812868cb74f1a978035530f55f1d0&sort_dir=desc&sort_dir=desc&sort_dir=desc&sort_key=created_at&sort_key=display_name&sort_key=uuid HTTP/1.1" status: 200 len: 6270 time: 1.4020071 2021-09-17 23:49:05.596 2255 INFO nova.osapi_compute.wsgi.server [req-145b6db0-aaf5-4487-b2b9-ebcd7f17b8c4 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/extensions HTTP/1.1" status: 200 len: 23101 time: 0.0046902 2021-09-17 23:49:05.863 2255 INFO nova.osapi_compute.wsgi.server [req-f9863cf3-9641-432e-ac53-a5277a94c51d 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/limits?reserved=1 HTTP/1.1" status: 200 len: 913 time: 0.0407920 2021-09-17 23:49:06.368 2255 INFO nova.osapi_compute.wsgi.server [req-c16f1023-d3c7-4183-a7bd-3590b7fec868 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/limits?reserved=1 HTTP/1.1" status: 200 len: 913 time: 0.0380440 2021-09-17 23:49:44.228 2255 INFO nova.osapi_compute.wsgi.server [req-876229d8-50ff-4f1c-8596-c6f40bab9ab8 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/flavors/detail HTTP/1.1" status: 200 len: 1479 time: 0.2233560 2021-09-17 23:49:44.274 2255 INFO nova.osapi_compute.wsgi.server [req-73d47f3c-629e-4316-be5d-bfe65767581d 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1 HTTP/1.1" status: 302 len: 317 time: 0.0026519 2021-09-17 23:49:44.279 2255 INFO nova.osapi_compute.wsgi.server [req-9f7572d8-afbe-448a-a025-2feb5a0921f2 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/ HTTP/1.1" status: 200 len: 788 time: 0.0028460 2021-09-17 23:49:45.046 2255 INFO nova.osapi_compute.wsgi.server [req-a72117ca-daba-424f-84b7-3d15c94ae72c 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/servers/detail?limit=21&project_id=a7d812868cb74f1a978035530f55f1d0&sort_dir=desc&sort_dir=desc&sort_dir=desc&sort_key=created_at&sort_key=display_name&sort_key=uuid HTTP/1.1" status: 200 len: 6270 time: 0.6647730 2021-09-17 23:49:45.553 2255 INFO nova.osapi_compute.wsgi.server [req-077ed365-0a58-4981-9523-dad0fc98237c 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/extensions HTTP/1.1" status: 200 len: 23101 time: 0.0035529 2021-09-17 23:49:45.768 2255 INFO nova.osapi_compute.wsgi.server [req-bbadcf04-abca-47f0-b067-8d3a7ee7b64c 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/limits?reserved=1 HTTP/1.1" status: 200 len: 913 time: 0.0294020 2021-09-17 23:49:46.243 2255 INFO nova.osapi_compute.wsgi.server [req-4901aa95-fb27-4db4-924e-e7845a45268d 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.145 "GET /v2.1/limits?reserved=1 HTTP/1.1" status: 200 len: 913 time: 0.0318770
View the nova-scheduler.log log of the Controller node:
First, through compute_ The filter is filtered through ram memory. First, it is filtered through the localhost.localdomain node;
2021-09-17 23:48:48.256 2570 WARNING nova.scheduler.filters.compute_filter [req-ba7cca9e-6c0d-4a8e-b657-60673456a472 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] (localhost.localdomain, localhost.localdomain) ram: 3258MB disk: 32768MB io_ops: 0 instances: 0 has not been heard from in a while 2021-09-17 23:48:48.263 2570 INFO nova.filters [req-ba7cca9e-6c0d-4a8e-b657-60673456a472 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] Filter ComputeFilter returned 0 hosts 2021-09-17 23:48:48.263 2570 INFO nova.filters [req-ba7cca9e-6c0d-4a8e-b657-60673456a472 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] Filtering removed all hosts for the request with instance ID '4f75fd35-c53c-4feb-90bf-391996dee667'. Filter results: ['AvailabilityZoneFilter: (start: 1, end: 1)', 'ComputeFilter: (start: 1, end: 0)']
View the nova-conductor.log log of the Controller node:
The main problem is: no valid host can be found because there are not enough hosts available. It is speculated that there may be insufficient CPU, memory and hard disk;
2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager [req-ba7cca9e-6c0d-4a8e-b657-60673456a472 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] Failed to schedule instances: NoValidHost_Remote: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 235, in inner return func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 214, in select_destinations allocation_request_version, return_alternates) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 96, in select_destinations allocation_request_version, return_alternates) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 265, in _schedule claimed_instance_uuids) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 302, in _ensure_sufficient_hosts raise exception.NoValidHost(reason=reason) NoValidHost: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager Traceback (most recent call last): 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 1379, in schedule_and_build_instances 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager instance_uuids, return_alternates=True) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 839, in _schedule_instances 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager return_alternates=return_alternates) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/client/query.py", line 42, in select_destinations 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager instance_uuids, return_objects, return_alternates) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/rpcapi.py", line 160, in select_destinations 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager return cctxt.call(ctxt, 'select_destinations', **msg_args) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 181, in call 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager transport_options=self.transport_options) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 129, in _send 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager transport_options=transport_options) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 674, in send 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager transport_options=transport_options) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 664, in _send 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager raise result 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager NoValidHost_Remote: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager Traceback (most recent call last): 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 235, in inner 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager return func(*args, **kwargs) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 214, in select_destinations 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager allocation_request_version, return_alternates) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 96, in select_destinations 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager allocation_request_version, return_alternates) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 265, in _schedule 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager claimed_instance_uuids) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 302, in _ensure_sufficient_hosts 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager raise exception.NoValidHost(reason=reason) 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager NoValidHost: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager 2021-09-17 23:48:48.310 2369 ERROR nova.conductor.manager 2021-09-17 23:48:48.416 2369 WARNING nova.scheduler.utils [req-ba7cca9e-6c0d-4a8e-b657-60673456a472 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] Failed to compute_task_build_instances: No valid hosts were found because there are not enough hosts available. Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 235, in inner return func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 214, in select_destinations allocation_request_version, return_alternates) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 96, in select_destinations allocation_request_version, return_alternates) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 265, in _schedule claimed_instance_uuids) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 302, in _ensure_sufficient_hosts raise exception.NoValidHost(reason=reason) NoValidHost: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 : NoValidHost_Remote: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 2021-09-17 23:48:48.417 2369 WARNING nova.scheduler.utils [req-ba7cca9e-6c0d-4a8e-b657-60673456a472 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] [instance: 4f75fd35-c53c-4feb-90bf-391996dee667] Setting instance to ERROR state.: NoValidHost_Remote: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002
(17) Increase the memory and CPU capacity of the Compute node
Expand the CPU of Compute node to 6 cores and memory to 8G;
Failed to delete node:
openstack server delete centos7_new
Recreate the server:
openstack server create --image centos7_x86_64_2 --flavor centos72 centos7_new
Failed to create the instance;
Troubleshooting through logs:
First, check the nova-api.log log, as shown below. No special exceptions are found:
2021-09-18 11:01:03.995 2295 INFO nova.api.openstack.wsgi [req-35135749-7627-414f-a6d9-4ce248e3906f 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] HTTP exception thrown: Virtual machine type centos72 Can't find. 2021-09-18 11:01:03.997 2295 INFO nova.osapi_compute.wsgi.server [req-35135749-7627-414f-a6d9-4ce248e3906f 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/centos72 HTTP/1.1" status: 404 len: 537 time: 0.0310740 2021-09-18 11:01:04.048 2295 INFO nova.osapi_compute.wsgi.server [req-ff217a3e-5911-4bd1-98a0-a2c18c67f749 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors HTTP/1.1" status: 200 len: 965 time: 0.0419452 2021-09-18 11:01:04.085 2295 INFO nova.osapi_compute.wsgi.server [req-da335951-60ca-41bf-b1fc-b24fbd76b8c7 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/3 HTTP/1.1" status: 200 len: 766 time: 0.0295641 2021-09-18 11:01:05.811 2295 INFO nova.osapi_compute.wsgi.server [req-fbf96a04-09d5-4e3d-bf35-9b0935969296 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "POST /v2.1/servers HTTP/1.1" status: 202 len: 876 time: 1.6947610 2021-09-18 11:01:05.962 2295 INFO nova.osapi_compute.wsgi.server [req-b6cae590-65b7-4fc6-948c-acf3d7a1c23b 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/servers/2d43331b-bcff-43af-be11-5c3eefd8b7a5 HTTP/1.1" status: 200 len: 1691 time: 0.1441481 2021-09-18 11:01:06.046 2295 INFO nova.osapi_compute.wsgi.server [req-914736ca-0b90-4628-ac4b-f53c92653224 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] 192.168.112.146 "GET /v2.1/flavors/3 HTTP/1.1" status: 200 len: 766 time: 0.0342619
Continue to check nova-scheduler.log,
2021-09-18 11:01:09.117 2629 WARNING nova.scheduler.filters.compute_filter [req-fbf96a04-09d5-4e3d-bf35-9b0935969296 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] (localhost.localdomain, localhost.localdomain) ram: 3258MB disk: 32768MB io_ops: 0 instances: 0 has not been heard from in a while 2021-09-18 11:01:09.141 2629 INFO nova.filters [req-fbf96a04-09d5-4e3d-bf35-9b0935969296 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] Filter ComputeFilter returned 0 hosts 2021-09-18 11:01:09.142 2629 INFO nova.filters [req-fbf96a04-09d5-4e3d-bf35-9b0935969296 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] Filtering removed all hosts for the request with instance ID '2d43331b-bcff-43af-be11-5c3eefd8b7a5'. Filter results: ['AvailabilityZoneFilter: (start: 1, end: 1)', 'ComputeFilter: (start: 1, end: 0)']
View the nova-conductor.log log:
2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager [req-fbf96a04-09d5-4e3d-bf35-9b0935969296 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] Failed to schedule instances: NoValidHost_Remote: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 235, in inner return func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 214, in select_destinations allocation_request_version, return_alternates) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 96, in select_destinations allocation_request_version, return_alternates) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 265, in _schedule claimed_instance_uuids) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 302, in _ensure_sufficient_hosts raise exception.NoValidHost(reason=reason) NoValidHost: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager Traceback (most recent call last): 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 1379, in schedule_and_build_instances 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager instance_uuids, return_alternates=True) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 839, in _schedule_instances 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager return_alternates=return_alternates) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/client/query.py", line 42, in select_destinations 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager instance_uuids, return_objects, return_alternates) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/rpcapi.py", line 160, in select_destinations 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager return cctxt.call(ctxt, 'select_destinations', **msg_args) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 181, in call 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager transport_options=self.transport_options) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 129, in _send 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager transport_options=transport_options) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 674, in send 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager transport_options=transport_options) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 664, in _send 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager raise result 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager NoValidHost_Remote: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager Traceback (most recent call last): 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 235, in inner 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager return func(*args, **kwargs) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 214, in select_destinations 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager allocation_request_version, return_alternates) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 96, in select_destinations 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager allocation_request_version, return_alternates) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 265, in _schedule 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager claimed_instance_uuids) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 302, in _ensure_sufficient_hosts 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager raise exception.NoValidHost(reason=reason) 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager NoValidHost: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager 2021-09-18 11:01:09.216 2391 ERROR nova.conductor.manager 2021-09-18 11:01:09.638 2391 WARNING nova.scheduler.utils [req-fbf96a04-09d5-4e3d-bf35-9b0935969296 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] Failed to compute_task_build_instances: No valid hosts were found because there are not enough hosts available.. Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 235, in inner return func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 214, in select_destinations allocation_request_version, return_alternates) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 96, in select_destinations allocation_request_version, return_alternates) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 265, in _schedule claimed_instance_uuids) File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 302, in _ensure_sufficient_hosts raise exception.NoValidHost(reason=reason) NoValidHost: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 : NoValidHost_Remote: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002 2021-09-18 11:01:09.646 2391 WARNING nova.scheduler.utils [req-fbf96a04-09d5-4e3d-bf35-9b0935969296 9942eb4321644336a0c7383d9f1c2bed a7d812868cb74f1a978035530f55f1d0 - default default] [instance: 2d43331b-bcff-43af-be11-5c3eefd8b7a5] Setting instance to ERROR state.: NoValidHost_Remote: \u627e\u4e0d\u5230\u6709\u6548\u4e3b\u673a\uff0c\u539f\u56e0\u662f \u6ca1\u6709\u8db3\u591f\u7684\u4e3b\u673a\u53ef\u7528\u3002\u3002
Check the nova-compute.log log and see no exceptions:
2021-09-18 11:04:22.905 1556 INFO nova.virt.libvirt.imagecache [req-caca30f2-fddc-48ed-a0f9-d7250fb69311 - - - - -] image 853f71aa-07d5-49c4-beb5-81055ac6f722 at (/var/lib/nova/instances/_base/7e2bfe304c74a876f01642452d7930b251d7e3a8): checking 2021-09-18 11:04:22.914 1556 INFO nova.virt.libvirt.imagecache [req-caca30f2-fddc-48ed-a0f9-d7250fb69311 - - - - -] image f7cdcc6a-dbec-4d4a-82c4-4170a9cc1a19 at (/var/lib/nova/instances/_base/23a6b78eed18bc0b1ae4a43cde29aae49c9d666f): checking 2021-09-18 11:04:23.237 1556 INFO nova.virt.libvirt.imagecache [req-caca30f2-fddc-48ed-a0f9-d7250fb69311 - - - - -] Active base files: /var/lib/nova/instances/_base/7e2bfe304c74a876f01642452d7930b251d7e3a8 /var/lib/nova/instances/_base/23a6b78eed18bc0b1ae4a43cde29aae49c9d666f