Open mocart2 opened 11 months ago
Same issue here. Issue persists even when using a root user on the qemu ssh connection string. The disk file on disk has the correct permissions and ownership, same as all of the others on the pool (pre-existing default pool at /var/lib/libvirt/images
).
I am seeing this as well. Has anyone found a workaround at least for now?
Maybe this thread would help, I experienced a similar issue and setfactl -m
helped me. See below:
https://www.linux.org/threads/kvm-machine-doesnt-start-due-to-permissions.44566/post-188884
Maybe this thread would help, I experienced a similar issue and
setfactl -m
helped me. See below: https://www.linux.org/threads/kvm-machine-doesnt-start-due-to-permissions.44566/post-188884
I've actually tried something similar by just granting libvirt-qemu full control of the path. But that didn't make a difference. The thing that is odd, I can use Virtual Machine Manager to connect to the remote host and it will create the VM without any issues. The file permissions are set correctly as well.
System Information
Linux distribution
Ubuntu 22.04 amd64
Terraform version
Provider and libvirt versions
Checklist
[ ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[x] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
Setup
I use alias to connect remote KVM server and use non-root ubuntu(with sudo no passwd all) user:
Steps to Reproduce Issue
connect to remote KVM is good, but when TF creates libvirt domain i have error: error on localhost:
tf debug on localhost:
after i get error, i checked dir based storage pool permissions on remote KVM:
so, i seen, TF creates VMs dir by root (but i connect to remove KVM with ubuntu user) and write permissions only root user, why?
p.s. when i use root user on connection string - i haven't problems.
Additional information:
Do you have SELinux or Apparmor/Firewall enabled? Some special configuration? First of all, i read README.md and:
/etc/libvirt/libvirtd.conf
/etc/libvirt/libvirtd.conf
systemctl restart libvirtd
Have you tried to reproduce the issue without them enabled? yes