I am using the terraform libvirt provider and I am failing to start a VM. I have a drive mounted at a folder within /home/dude/vmPool/
, and I have tried setting acl from looking at this issue which looks similar. I have also tried editing /etc/libvirt/qemu.conf
and setting user=root, group=root
which doesn't seem to help. I have noticed that the VM image gets created as root while the cloudinit iso is created as my user, I believe internally genisoimage is used by the provider but I have no idea how that affects the domain not being created. It fails with the following error:
error: Failed to start domain ubuntu-terraform
error: internal error: process exited while connecting to monitor: 2018-12-06T14:14:22.519784Z qemu-system-x86_64: -drive file=/home/dude/vmPool/kvm.kthw.test/ubuntu-qcow2,format=qcow2,if=none,id=drive-virtio-disk0: Could not open '/home/dude/vmPool/kvm.kthw.test/ubuntu-qcow2': Permission denied
I am using Ubuntu 18.04:
uname -a
Linux kvm-host 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic