Nova-compute service fails to start: libvirt error

Asked by Patrick Vinas

Running Ubuntu 12.04 with Grizzly from the Ubuntu Cloud archive. I can't seem to get the nova-compute service to start.

From /var/log/nova/nova-compute.log:
2013-05-06 10:33:58.677 1989 ERROR nova.virt.driver [-] Unable to load the virtualization driver: Class LibvirtDriver cannot be found (['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/dist-packages/nova/openstack/common/importutils.py", line 31, in import_class\n return getattr(sys.modules[mod_str], class_str)\n', "AttributeError: 'module' object has no attribute 'LibvirtDriver'\n"])

From /etc/nova/nova.conf:
# COMPUTE
libvirt_type=kvm
compute_driver=libvirt.LibvirtDriver
instance_name_template=instance-%08x
api_paste_config=/etc/nova/api-paste.ini

I've checked in the nova/virt/libvirt/driver.py and verified that the LibvirtDriver class exists. Any other troubleshooting tips or suggestions?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Patrick Vinas
Solved:
Last query:
Last reply:
Revision history for this message
Patrick Vinas (patrickvinas) said :
#1

If I change
compute_driver=libvirt.LibvirtDriver
to
compute_driver=nova.virt.libvirt.LibvirtDriver,
the log contains the following instead:
2013-05-06 11:29:28.649 15082 INFO nova.virt.driver [-] Loading compute driver 'nova.virt.libvirt.LibvirtDriver'
2013-05-06 11:29:28.701 15082 ERROR nova.virt.driver [-] Unable to load the virtualization driver: No module named libvirt

Revision history for this message
Patrick Vinas (patrickvinas) said :
#2

Problem solved. Adding the nova.virt namespace to the compute_driver option seems to have fixed that problem. The other error appears to have been caused by an incorrect entry in my firewall_driver config option (I had firewall.libvirt, instead of libvirt.firewall).

Also, filing a documentation bug to update the configuration options doc - nova.virt namespace seems to be required (if not for everyone, at least for some) and the documentation should reflect that.