I'm fairly new to Openstack and currently trying to install a single-node setup on Ubuntu 24.04. During the nova-compute setup step, I managed to installed nova-compute and kvm libvirted which show both service start successfully, but fail to add compute to Openstack cluster using the following command:
su -s /bin/bash nova -c "nova-manage cell_v2 discover_hosts"
Here are some of the output which i found could relate to this issue:
nova-compute service status:
root@openstack ~(keystone)# systemctl status nova-compute
nova-compute.service - OpenStack Compute
Loaded: loaded (/usr/lib/systemd/system/nova-compute.service; enabled; preset: enabled)
Active: inactive (dead) since Mon 2025-09-15 10:47:41 +07; 11min ago
Duration: 5.015s
Process: 23709 ExecStart=/etc/init.d/nova-compute systemd-start (code=exited, status=0/SUCCESS)
Main PID: 23709 (code=exited, status=0/SUCCESS)
CPU: 2.493s
Sep 15 10:47:36 openstack.vdigital.vn systemd[1]: Started nova-compute.service - OpenStack Compute.
Sep 15 10:47:38 openstack.vdigital.vn nova-compute[23709]: /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host 'openstack.vdigital.vn'. A>
Sep 15 10:47:38 openstack.vdigital.vn nova-compute[23709]: warnings.warn(
Sep 15 10:47:38 openstack.vdigital.vn nova-compute[23709]: /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host 'openstack.vdigital.vn'. A>
Sep 15 10:47:38 openstack.vdigital.vn nova-compute[23709]: warnings.warn(
Sep 15 10:47:38 openstack.vdigital.vn nova-compute[23709]: /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host 'openstack.vdigital.vn'. A>
Sep 15 10:47:38 openstack.vdigital.vn nova-compute[23709]: warnings.warn(
Sep 15 10:47:40 openstack.vdigital.vn nova-compute[23709]: libvirt: error : internal error: could not initialize domain event timer
Sep 15 10:47:41 openstack.vdigital.vn systemd[1]: nova-compute.service: Deactivated successfully.
Sep 15 10:47:41 openstack.vdigital.vn systemd[1]: nova-compute.service: Consumed 2.493s CPU time, 1.6M memory peak, 0B memory swap peak.
lines 1-18/18 (END)
libvirtd service-status
root@openstack ~(keystone)# systemctl status libvirtd
○ libvirtd.service - libvirt legacy monolithic daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: enabled)
Active: inactive (dead) since Mon 2025-09-15 10:49:41 +07; 17min ago
Duration: 2min 1.051s
TriggeredBy: ● libvirtd-admin.socket
● libvirtd.socket
● libvirtd-ro.socket
Docs: man:libvirtd(8)
https://libvirt.org/
Process: 23743 ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 23743 (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 32768)
Memory: 36.0M (peak: 79.9M)
CPU: 751ms
CGroup: /system.slice/libvirtd.service
├─3170 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
└─3171 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
Sep 15 10:47:40 openstack.vdigital.vn systemd[1]: Started libvirtd.service - libvirt legacy monolithic daemon.
Sep 15 10:47:40 openstack.vdigital.vn dnsmasq[3170]: read /etc/hosts - 9 names
Sep 15 10:47:40 openstack.vdigital.vn dnsmasq[3170]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 names
Sep 15 10:47:40 openstack.vdigital.vn dnsmasq-dhcp[3170]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Sep 15 10:47:41 openstack.vdigital.vn libvirtd[23743]: 23743: info : libvirt version: 10.0.0, package: 10.0.0-2ubuntu8.8 (Ubuntu)
Sep 15 10:47:41 openstack.vdigital.vn libvirtd[23743]: 23743: info : hostname: openstack.vdigital.vn
Sep 15 10:47:41 openstack.vdigital.vn libvirtd[23743]: 23743: error : virNetSocketReadWire:1781 : End of file while reading data: Input/output error
Sep 15 10:49:41 openstack.vdigital.vn systemd[1]: libvirtd.service: Deactivated successfully.
Sep 15 10:49:41 openstack.vdigital.vn systemd[1]: libvirtd.service: Unit process 3170 (dnsmasq) remains running after unit stopped.
Sep 15 10:49:41 openstack.vdigital.vn systemd[1]: libvirtd.service: Unit process 3171 (dnsmasq) remains running after unit stopped.
Error log when restart nova-compute.service
root@openstack ~(keystone)# tail -f /var/log/nova/nova-compute.log
...
2025-09-15 10:47:40.750 23709 DEBUG nova.virt.libvirt.host [None req-d946e32f-5623-4b0a-b1ed-862557994c42 - - - - - -] Registering for connection events: <nova.virt.libvirt.host.Host object at 0x74edd4ce0680> _get_new_connection /usr/lib/python3/dist-packages/nova/virt/libvirt/host.py:522
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service [None req-d946e32f-5623-4b0a-b1ed-862557994c42 - - - - - -] Error starting thread.: nova.exception.InvalidConfiguration: My hypervisor has existing instances, but I appear to be a new service in this database. Possible database configuration error, refusing to start!
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service Traceback (most recent call last):
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service File "/usr/lib/python3/dist-packages/oslo_service/backend/eventlet/service.py", line 804, in run_service
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service service.start()
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service File "/usr/lib/python3/dist-packages/nova/service.py", line 166, in start
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service self.manager.init_host(self.service_ref)
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service File "/usr/lib/python3/dist-packages/nova/compute/manager.py", line 1612, in init_host
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service self._sanity_check_new_host()
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service File "/usr/lib/python3/dist-packages/nova/compute/manager.py", line 1596, in _sanity_check_new_host
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service raise exception.InvalidConfiguration(
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service nova.exception.InvalidConfiguration: My hypervisor has existing instances, but I appear to be a new service in this database. Possible database configuration error, refusing to start!
2025-09-15 10:47:40.752 23709 ERROR oslo_service.backend.eventlet.service
...
root@openstack ~(keystone)# journalctl -fu libvirtd
...
Sep 15 10:47:40 openstack.vdigital.vn dnsmasq-dhcp[3170]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Sep 15 10:47:41 openstack.vdigital.vn libvirtd[23743]: 23743: info : libvirt version: 10.0.0, package: 10.0.0-2ubuntu8.8 (Ubuntu)
Sep 15 10:47:41 openstack.vdigital.vn libvirtd[23743]: 23743: info : hostname: openstack.vdigital.vn
Sep 15 10:47:41 openstack.vdigital.vn libvirtd[23743]: 23743: error : virNetSocketReadWire:1781 : End of file while reading data: Input/output error
Sep 15 10:49:41 openstack.vdigital.vn systemd[1]: libvirtd.service: Deactivated successfully.
Sep 15 10:49:41 openstack.vdigital.vn systemd[1]: libvirtd.service: Unit process 3170 (dnsmasq) remains running after unit stopped.
...