srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/virt/vm.md
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2023-02-24 12:28:36 +0200
committersrdusr <[email protected]>2023-02-24 12:28:36 +0200
commitbecbde4e745dbb0e765349aadab446cc4504fe27 (patch)
tree7edf60ee2e6df56946cb02bf8b9bc4e34a838616 /virt/vm.md
parentb93eb397d24ff38bd0d1ca23929997fa198930b4 (diff)
downloadnotes-becbde4e745dbb0e765349aadab446cc4504fe27.tar.gz
notes-becbde4e745dbb0e765349aadab446cc4504fe27.zip
Enable normal user to use KVM info added
Diffstat (limited to 'virt/vm.md')
-rw-r--r--virt/vm.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/virt/vm.md b/virt/vm.md
index 8fc1e8f..4e9f3f2 100644
--- a/virt/vm.md
+++ b/virt/vm.md
@@ -51,3 +51,18 @@ vboxmanage modifyvm "win10" --accerlerate3d on
`$ sudo systemctl enable libvirtd.service`
`$ sudo systemctl start libvirtd.service`
- - -
+3. Enable normal user (non-root) to use KVM
+`$ sudo vim /etc/libvirt/libvirtd.conf`
+- Set the UNIX domain socket group ownership to libvirt, (around line 85)
+unix_sock_group = "libvirt"
+
+- Set the UNIX socket permissions for the R/W socket (around line 102)
+unix_sock_rw_perms = "0770"
+
+- Add your user account to libvirt group.
+`$ sudo usermod -a -G libvirt $(whoami)`
+`$ newgrp libvirt`
+
+- Restart libvirt daemon.
+`$ sudo systemctl restart libvirtd.service`
+- - -