创建nova实例 nova-compute报错:libvirtError: internal error: process exited while connecting to monitor
在vmware嵌套的虚拟化环境中,部署多节点,对接多套后端ceph存储的时候,发现创建nova实例总是error:
- 根据卷类型和镜像创建卷
cinder create --image-id 2bc3e25e-d6fc-4b61-96c9-d24075ec05fd --name test-bus-22 --volume-type ceph-bus 10
- 启动一个nova实例
nova boot --flavor 1C1G --boot-volume 4602fd51-ceba-4e11-9bf7-07ab59fbc4cb --availability-zone business --nic net-id=ef6e073d-be57-48d0-8a6d-c0aeb566f3c3 --nic net-id=56f13591-b4ba-4cd8-8ec6-1cebad6438dc bus-test122
2023-02-23 18:10:36.579 7 INFO os_vif [req-8a7516dd-217b-4e09-abd6-94261ae08d0d 905596397631479db0e5d5cfa3ceec90 7b651f4b9ecc4cd3bd400a2084084cb9 - default default] Successfully unplugged vif VIFBridge(active=False,address=fa:16:3e:6b:50:28,bridge_name='qbr78f1d0e3-6d',has_traffic_filtering=True,id=78f1d0e3-6d65-4bbb-ae90-1ab8654e521c,network=Network(56f13591-b4ba-4cd8-8ec6-1cebad6438dc),plugin='ovs',port_profile=VIFPortProfileOpenVSwitch,preserve_on_delete=False,vif_name='tap78f1d0e3-6d')
:
ting to monitor: 2023-02-23T10:10:26.924633Z qemu-kvm: -chardev pty,id=charserial0,logfile=/var/lib/nova/instances/b3a6bd51-4d91-42b7-a698-119fbda9c11c/console.log,logappend=off: Unable to open logfile /var/lib/nova/instances/b3a6bd51-4d91-42b7-a698-119fbda9c11c/console.log: Permission denied
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] Traceback (most recent call last):
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/manager.py", line 2357, in _build_resources
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] yield resources
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/manager.py", line 2121, in _build_and_run_instance
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] block_device_info=block_device_info)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3080, in spawn
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] destroy_disks_on_failure=True)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5647, in _create_domain_and_network
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] destroy_disks_on_failure)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] self.force_reraise()
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] six.reraise(self.type_, self.value, self.tb)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5616, in _create_domain_and_network
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] post_xml_callback=post_xml_callback)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5550, in _create_domain
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] guest.launch(pause=pause)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 144, in launch
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] self._encoded_xml, errors='ignore')
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] self.force_reraise()
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] six.reraise(self.type_, self.value, self.tb)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 139, in launch
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] return self._domain.createWithFlags(flags)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] result = proxy_call(self._autowrap, f, *args, **kwargs)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] rv = execute(f, *args, **kwargs)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] six.reraise(c, e, tb)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] rv = meth(*args, **kwargs)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1099, in createWithFlags
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] libvirtError: internal error: process exited while connecting to monitor: :
ting to monitor: 2023-02-23T10:10:26.924633Z qemu-kvm: -chardev pty,id=charserial0,logfile=/var/lib/nova/instances/b3a6bd51-4d91-42b7-a698-119fbda9c11c/console.log,logappend=off: Unable to open logfile /var/lib/nova/instances/b3a6bd51-4d91-42b7-a698-119fbda9c11c/console.log: Permission denied
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] Traceback (most recent call last):
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/manager.py", line 2357, in _build_resources
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] yield resources
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/manager.py", line 2121, in _build_and_run_instance
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] block_device_info=block_device_info)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3080, in spawn
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] destroy_disks_on_failure=True)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5647, in _create_domain_and_network
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] destroy_disks_on_failure)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] self.force_reraise()
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] six.reraise(self.type_, self.value, self.tb)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5616, in _create_domain_and_network
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] post_xml_callback=post_xml_callback)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5550, in _create_domain
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] guest.launch(pause=pause)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 144, in launch
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] self._encoded_xml, errors='ignore')
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] self.force_reraise()
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] six.reraise(self.type_, self.value, self.tb)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 139, in launch
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] return self._domain.createWithFlags(flags)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] result = proxy_call(self._autowrap, f, *args, **kwargs)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] rv = execute(f, *args, **kwargs)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] six.reraise(c, e, tb)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] rv = meth(*args, **kwargs)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1099, in createWithFlags
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c] libvirtError: internal error: process exited while connecting to monitor: 2023-02-23T10:10:26.924633Z qemu-kvm: -chardev pty,id=charserial0,logfile=/var/lib/nova/instances/b3a6bd51-4d91-42b7-a698-119fbda9c11c/console.log,logappend=off: Unable to open logfile /var/lib/nova/instances/b3a6bd51-4d91-42b7-a698-119fbda9c11c/console.log: Permission denied
2023-02-23 18:10:35.151 7 ERROR nova.compute.manager [instance: b3a6bd51-4d91-42b7-a698-119fbda9c11c]
在qemu.conf
配置文件中修改了user 和group后导致上面的报错,一开始写xml报错,还真以为是权限的问题,都改为root
,重启了nova_libvirt容器问题依旧。后来又将user和group改回到nova
stdio_handler = "file"
user = "nova"
group = "nova"
nova-compute报错:libvirtError: internal error: process exited while connecting to monitor
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [req-ea83bece-2dfc-4ad4-a79b-c9eff763f4ef 905596397631479db0e5d5cfa3ceec90 7b651f4b9ecc4cd3bd400a2084084cb9 - default default] [instance: df810251-9c80-4dbf-8255-bac437a012cc] Instance failed to spawn: libvirtError: internal error: process exited while connecting to monitor: 2023-02-23T08:10:10.312021Z qemu-kvm: -chardev pty,id=charserial0,logfile=/var/lib/nova/instances/df810251-9c80-4dbf-8255-bac437a012cc/console.log,logappend=off: Failed to create PTY: No such file or directory
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] Traceback (most recent call last):
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/manager.py", line 2357, in _build_resources
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] yield resources
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/manager.py", line 2121, in _build_and_run_instance
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] block_device_info=block_device_info)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3080, in spawn
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] destroy_disks_on_failure=True)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5646, in _create_domain_and_network
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] destroy_disks_on_failure)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] self.force_reraise()
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] six.reraise(self.type_, self.value, self.tb)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5615, in _create_domain_and_network
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] post_xml_callback=post_xml_callback)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5550, in _create_domain
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] guest.launch(pause=pause)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 144, in launch
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] self._encoded_xml, errors='ignore')
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] self.force_reraise()
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] six.reraise(self.type_, self.value, self.tb)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 139, in launch
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] return self._domain.createWithFlags(flags)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] result = proxy_call(self._autowrap, f, *args, **kwargs)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] rv = execute(f, *args, **kwargs)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] six.reraise(c, e, tb)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/var/lib/kolla/venv/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] rv = meth(*args, **kwargs)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1099, in createWithFlags
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)
2023-02-23 16:10:18.520 7 ERROR nova.compute.manager [instance: df810251-9c80-4dbf-8255-bac437a012cc] libvirtError: internal error: process exited while connecting to monitor: 2023-02-23T08:10:10.312021Z qemu-kvm: -chardev pty,id=charserial0,logfile=/var/lib/nova/instances/df810251-9c80-4dbf-8255-bac437a012cc/console.log,logappend=off: Failed to create PTY: No such file or directory
经过pdb调试代码,发现跟踪到了libvirt驱动去创建xml的 报错
代码位置:/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/drivert.py
def _create_domain(self, xml=None, domain=None,
power_on=True, pause=False, post_xml_callback=None):
"""Create a domain.
Either domain or xml must be passed in. If both are passed, then
the domain definition is overwritten from the xml.
:returns guest.Guest: Guest just created
"""
if xml:
guest = libvirt_guest.Guest.create(xml, self._host)
if post_xml_callback is not None:
post_xml_callback()
else:
guest = libvirt_guest.Guest(domain)
if power_on or pause:
guest.launch(pause=pause)
if not utils.is_neutron():
guest.enable_hairpin()
return guest
最终在guest.launch
的时候报Libvirt Error
解决:
在qemu.conf
配置文件中添加namespaces = []
后,重启libvirt服务正常工作。文章来源:https://www.toymoban.com/news/detail-762682.html
stdio_handler = "file"
namespaces = []
user = "nova"
group = "nova"
查到是一个bug导致,至于详细原因没有仔细继续往下追究,参考如下链接:
https://bugzilla.redhat.com/show_bug.cgi?id=1427804文章来源地址https://www.toymoban.com/news/detail-762682.html
到了这里,关于创建nova实例 nova-compute报错:`libvirtError: internal error: process exited while connecting to monitor`的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!