When I tried to create a VM from a qcow image with directive "image:", in the step "Ensure the VM is running and started at boot", I had this error :
2019-03-31T09:39:26.332744Z qemu-system-x86_64: -drive file=/way_of_the_qcow/Test,format=qcow2,if=none,id=drive-virtio-disk0: Could not open '/way_of_the_qcow/Test': Permission denied
I solved it with adding this section in the task file vm.yml :
Hi,
When I tried to create a VM from a qcow image with directive "image:", in the step "Ensure the VM is running and started at boot", I had this error :
2019-03-31T09:39:26.332744Z qemu-system-x86_64: -drive file=/way_of_the_qcow/Test,format=qcow2,if=none,id=drive-virtio-disk0: Could not open '/way_of_the_qcow/Test': Permission denied
I solved it with adding this section in the task file vm.yml :
name: Permissions VM
file: path: /PATH_TO_THE_VM/{{ volumes | selectattr('name', 'defined') | map(attribute='name') | list | join('\n') }} owner: libvirt-qemu group: libvirt-qemu mode: 0644
Regards,