Have you ever receive error message like below while working with Openstack and KVM?. If so, a fix is given here.

Command: env LC_ALL=C LANG=C qemu-img info /var/lib/libvirt/images/asterisk.qcow2
Exit code: 1
Stdout: u”
Stderr: u”qemu-img: Could not open ‘/var/lib/libvirt/images/asterisk.qcow2’: Could not open ‘/var/lib/libvirt/images/asterisk.qcow2’: Permission deniedn”

INFO nova.compute.resource_tracker [req-7f9e4964-52c0-4204-ae00-b74fb83acb9c – – – – -] Auditing locally available compute resources for node localhost.localdomain
 ERROR nova.compute.manager [req-7f9e4964-52c0-4204-ae00-b74fb83acb9c – – – – -] Error updating resources for node localhost.localdomain: Unexpected error while running command.
This is a qemu error,in the sense that nova does not have permissions to write/read to the specified qcow2 file.
Stop the libvirtd service

[[email protected] ~(keystone)]# systemctl stop libvirtd.service 

Then set user and group to nova service
Set the dynamic_ownership to zero

[[email protected] ~(keystone)]# vim  /etc/libvirt/qemu.conf
 user = "nova"

# The group for QEMU processes run by the system instance. It can be
# specified in a similar way to user.

group = "nova"

# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.

dynamic_ownership = 0

Save the file and restart libvirtd service

[[email protected] ~(keystone)]# systemctl start libvirtd.service

and you will be good


Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here