Using OpenStack Nova w/ libvirt on Fedora 18:
When I boot an instance and inject files (with libguestfs) I get the following stack trace in Nova's compute.log file:
2013-02-20 21:14:55.706 ERROR nova.virt.libvirt.driver [req-0834ec7c-d875-469f-9277-00e4fbfd20e8 696e681d17df4f8eb3f20c26dec5f093 3efc0abe163f44b9a890f66242dfcf73] [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] Error injecting data into image 93e67150-0f43-43d1-9ac6-6ff1777fdc69 (Error mounting /var/lib/nova/instances/2e8e19f1-137d-496b-b206-abc8919f5856/disk with libguestfs (could not connect to libvirt (URI = NULL): Failed to connect socket to '/home/nova/.cache/libvirt/libvirt-sock': No such file or directory [code=38 domain=7]))
2013-02-20 21:14:55.711 ERROR nova.compute.manager [req-0834ec7c-d875-469f-9277-00e4fbfd20e8 696e681d17df4f8eb3f20c26dec5f093 3efc0abe163f44b9a890f66242dfcf73] [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] Instance failed to spawn
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] Traceback (most recent call last):
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1028, in _spawn
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] block_device_info)
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1438, in spawn
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] admin_pass=admin_password)
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1815, in _create_image
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] mandatory=('files',))
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] File "/usr/lib/python2.7/site-packages/nova/virt/disk/api.py", line 304, in inject_data
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] fs.setup()
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] File "/usr/lib/python2.7/site-packages/nova/virt/disk/vfs/guestfs.py", line 108, in setup
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] {'imgfile': self.imgfile, 'e': e})
2013-02-20 21:14:55.711 18959 TRACE nova.compute.manager [instance: 2e8e19f1-137d-496b-b206-abc8919f5856] NovaException: Error mounting /var/lib/nova/instances/2e8e19f1-137d-496b-b206-abc8919f5856/disk with libguestfs (could not connect to libvirt (URI = NULL): Failed to connect socket to '/home/nova/.cache/libvirt/libvirt-sock': No such file or directory [code=38 domain=7])
-----
This issue seems to be that because libguestfs doesn't use the same libvirt URI as Nova and thus fails.
Full thread on the issue here:
https://bugzilla.redhat.com/show_bug.cgi?id=913345
https:/ /review. openstack. org/#/c/ 22597/