Openstack

Openstack Error Qemu-img: Could not open ‘/var/lib/libvirt/images/’ Permission Denied

Have you ever received an error message like below while working with Openstack and KVM?. If so, a fix is given in this brief article.

Original content from computingforgeeks.com - post 39
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

sudo systemctl stop libvirtd.service 

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

sudo vim  /etc/libvirt/qemu.conf

Set user to nova

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

sudo systemctl start libvirtd.service

And you will be good to start your Virtual Machine.

Keep reading

How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Fedora How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Things to Do After Installing Fedora 45 Workstation Fedora Things to Do After Installing Fedora 45 Workstation Enable RPM Fusion and Multimedia Codecs on Fedora 45 / 44 / 43 Fedora Enable RPM Fusion and Multimedia Codecs on Fedora 45 / 44 / 43 NVIDIA Kernel Module Missing, Falling Back to Nouveau on Fedora Fedora NVIDIA Kernel Module Missing, Falling Back to Nouveau on Fedora Build FFmpeg 9.1 from Source on Rocky Linux 10 and Fedora 45 Fedora Build FFmpeg 9.1 from Source on Rocky Linux 10 and Fedora 45 Stratis Storage Cheat Sheet – reference guide Cheat Sheets Stratis Storage Cheat Sheet – reference guide

Leave a Comment

Press ESC to close