Unable to provision Ubuntu using image

Problem:
Failed to power up a compute main (Libvirt) instance joni-turnbow.com: Call to virDomainCreateWithFlags failed: internal error: process exited while connecting to monitor: 2018-05-29T22:09:42.396497Z qemu-system-x86_64: -drive file=/dev/D0BA04CCBA04B150/kvm-img/joni-turnbow.com-disk1,format=qcow2,if=none,id=drive-virtio-disk0: Could not open backing file: Could not open ‘/tmp/img-main/generic.qcow2’: Permission denied

Expected outcome:
virtual machine with cloned provided image.

Foreman and Proxy versions: 1.17

Foreman and Proxy plugin versions:

Other relevant data:
So I’ve manually created virtual machine on kvm and installed ubuntu there. Then i copied image (qcow2 file) to tmp file. Ive added image into compute resource and ssh infomation (root user and password). Also i even changed permission of that file to 777 and still getting permission denied. Been fighting with this problem for couple days. Any help, please.

It looks like libvirt is unable to access the image. Doublecheck the permissions, su as user “qemu” and try to read it. Check SELinux. This is not Foreman’s problem at all.

Thanks for the reply. You were right, It wasnt problem of Foreman. There’s some bug with ubuntu and libvirt, found solution here: https://github.com/dmacvicar/terraform-provider-libvirt/commit/22f096d9