Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root permissions file under default storage pool #647

Closed
tmpm697 opened this issue Sep 22, 2019 · 5 comments
Closed

Root permissions file under default storage pool #647

tmpm697 opened this issue Sep 22, 2019 · 5 comments
Labels

Comments

@tmpm697
Copy link

tmpm697 commented Sep 22, 2019

System Information

Linux distribution

archlinux..

Terraform version

v12

Provider and libvirt versions

latest

I'm trying to provision kvm via libvirt using this plugin under normal user (I don't want to use root).

I have my normal user in group of /etc/group: wheel, libvirt (user in wheel can sudo without password)

I created default storage pool using this comment: simon3z/virt-deploy#8 (comment)

I sudo chmod 644 /var/libvirt/images and sudo chown -R myuser:myuser /var/lib/libvirt/images

Problem is that when I use example https://github.com/dmacvicar/terraform-provider-libvirt/tree/master/examples/v0.12/ubuntu.
terraform init and terraform apply to provison the vm, it create file under /var/lib/libvirt/images with root:root owner and give permission errror, then I have to re-do sudo chown -R myuser:myuser /var/lib/libvirt/images and re-run terraform apply to make it work.

How to avoid this kind of issue?

@MalloZup
Copy link
Collaborator

@tmpm697 you need to setup your user correctly, belonging to kvm/libvirt user. Search on the web should be enough doc on this issue.. You don't need root. Hope it helps

@tmpm697
Copy link
Author

tmpm697 commented Sep 22, 2019

@MalloZup : As I mentioned in #1 post, myser already in libvirt and I've just added it in kvm group too, nothing has changed. If you have corrected them, please share your configs.

@MalloZup
Copy link
Collaborator

@tmpm697 https://wiki.archlinux.org/index.php/Libvirt#Configuration. I don't have time to post my configuration. It is really the standard one. Please ask help on the question on the channel. Consider that this issue isn't not a terraform-provider-libvirt issue but on the libvirt itself. So you might just ask in any arch Linux forum or libvirt channels. I'm closing this as invalid

@MalloZup
Copy link
Collaborator

@MalloZup
Copy link
Collaborator

This is our channel feel free to ask there otherwise other medium can help 🐧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants