Ask Your Question
0

Connection to libvirt failed

asked 2016-11-07 03:32:21 -0500

Praveen N gravatar image

Am installing Openstack mitaka (single Ubuntu 14 vm - all in one controller with neutron linuxbridge) deploying through the ansible playbooks. Once the deployment is completed am able to see the services (nova, neutron etc )are active. But when i try to launch an instance, vm is getting to ERROR state. The nova-compute logs shows error as follows:

2016-11-07 12:43:42.892 30047 INFO nova.service [-] Starting compute node (version 13.1.1)
2016-11-07 12:43:42.899 30047 INFO nova.virt.libvirt.driver [-] Connection event '0' reason 'Failed to connect to libvirt'
2016-11-07 12:43:42.923 30047 WARNING nova.virt.libvirt.driver [req-4678f654-469f-4085-a409-7a17b01d6674 - - - - -] Cannot update service status on host "controller" since it is not registered.
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host [req-4678f654-469f-4085-a409-7a17b01d6674 - - - - -] Connection to libvirt failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host Traceback (most recent call last):
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/host.py", line 528, in get_connection
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host     conn = self._get_connection()
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/host.py", line 515, in _get_connection
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host     wrapped_conn = self._get_new_connection()
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/host.py", line 467, in _get_new_connection
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host     wrapped_conn = self._connect(self._uri, self._read_only)
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/host.py", line 321, in _connect
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host     libvirt.openAuth, uri, auth, flags)
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 144, in proxy_call
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host     rv = execute(f, *args, **kwargs)
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 125, in execute
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host     six.reraise(c, e, tb)
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 83, in tworker
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host     rv = meth(*args, **kwargs)
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 105, in openAuth
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host     if ret is None:raise libvirtError('virConnectOpenAuth() failed')
2016-11-07 12:43:42.924 30047 ERROR nova.virt.libvirt.host libvirtError: Failed ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-11-07 10:01:44 -0500

Praveen N gravatar image

Phew, finally figured out my ansible playbook configured the nova-compute.conf with virt_type=kvm. I changed it to virt_type=qemu. The nova-compute.conf file was now as below.

[DEFAULT]
compute_driver=libvirt.LibvirtDriver
[libvirt]
virt_type = qemu

After restarting libvirt-bin and nova-compute services, the provisioned instances were active !!

edit flag offensive delete link more

Comments

Does your VIRTHOST && ubuntu guest allow nested KVM ? It's pretty much standard thing when both VIRTHOST and Guest are coming from RH. I mean nested KVM does improve performance on Guest. For instance on TripleO QuickStart heat deployment of "overcloud" stack will most likely fail on undercloud.

dbaxps gravatar imagedbaxps ( 2016-11-07 11:13:52 -0500 )edit

Hi dbaxps, Thanks for your response. In my case, I have Dell Server hardware with hypervisor as XenServer installed on it. And then i've my Ubuntu14 guest VM on which am deploying OpenStack mitaka via ansible playbooks.

Praveen N gravatar imagePraveen N ( 2016-11-07 19:12:44 -0500 )edit

So in the guest VM, for virt_type = kvm throws me an error during booting an openstack instance. When its modified to qemu, it supports next level for virtual machines.

Praveen N gravatar imagePraveen N ( 2016-11-07 19:14:55 -0500 )edit

How did you change the ansible playbook? Where was the playbook located? I am getting the smae error and I think I may be having the same problem. I deploy using kolla-ansible

jcorkey gravatar imagejcorkey ( 2017-11-02 08:45:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-11-07 03:32:21 -0500

Seen: 2,507 times

Last updated: Nov 07 '16