Reputation: 33
I am trying to run kvm, but this error occurs:
$ virsh -c qemu:///system list
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
error: failed to connect to the hypervisor
So I enter to:
cd /var/run/libvirt/
and changed privilages by:
sudo chmod -R +777 libvirt
Everything is working now, but I have concerns about security issues, as privileges for all users and groups is not the safest way to do it? What could you recommend instead?
Upvotes: 3
Views: 20623
Reputation: 144
Same error i was getting
Solution this helps:-
#yum groupinstall "Virtualization Host"
#yum install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install
#systemctl enable libvirtd.service
exit the use and re-login
Post above command executed, staring minkube i starting
Upvotes: 0
Reputation: 672
Add your user to the kvm
and libvirtd
groups:
sudo usermod -aG kvm $USER
sudo usermod -aG libvirt $USER
After these group changes you have to logout/login the terminal you are using to have the changes taken into account. The groups you belongs to, can be check with the groups
command.
Upvotes: 7