[blfs-book] r12374 - trunk/BOOK/postlfs/virtualization

igor at higgs.linuxfromscratch.org igor at higgs.linuxfromscratch.org
Wed Dec 11 05:00:40 PST 2013


Author: igor
Date: Wed Dec 11 05:00:40 2013
New Revision: 12374

Log:
allow users to use the kvm device

Modified:
   trunk/BOOK/postlfs/virtualization/qemu.xml

Modified: trunk/BOOK/postlfs/virtualization/qemu.xml
==============================================================================
--- trunk/BOOK/postlfs/virtualization/qemu.xml	Wed Dec 11 03:49:13 2013	(r12373)
+++ trunk/BOOK/postlfs/virtualization/qemu.xml	Wed Dec 11 05:00:40 2013	(r12374)
@@ -159,7 +159,30 @@
 
 <screen role="root"><userinput>make install &&
 [ -e  /usr/lib/libcacard.so ] && chmod -v 755 /usr/lib/libcacard.so</userinput></screen>
-    
+
+    <para>
+      You will need a dedicated group that will contain users (other than root)
+      allowed to access the KVM device. Add the group by running the following
+      command as the <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>groupadd -g 61 kvm</userinput></screen>
+
+    <para>
+      Add any users that might use the KVM device to that group:
+    </para>
+
+<screen role="root"><userinput>usermod -a -G kvm <replaceable><username></replaceable></userinput></screen>
+
+    <para>
+      You will also need to add an Udev rule so that the KVM device gets correct
+      permissions:
+    </para>
+
+<screen role="root"><userinput>cat > /lib/udev/rules.d/65-kvm.rules << "EOF"
+<literal>KERNEL=="kvm", NAME="%k", GROUP="kvm", MODE="0660"</literal>
+EOF</userinput></screen>
+
     <note><!--<para>The main program <command>qemu-system-x86_64</command> doesn't
     make a distinction between i386 and x86_64 so even on an i386 system you
     should use <emphasis>qemu-system-x86_64</emphasis></para>



More information about the blfs-book mailing list