qemu: /dev/kvm mode is now set in LFS, and logind-based access is allowed

This commit is contained in:
Xi Ruoyao 2023-04-10 16:51:19 +08:00
parent c1ad464df4
commit 0fea8320f7
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
2 changed files with 17 additions and 2 deletions

View File

@ -196,3 +196,7 @@ export -f as_root</userinput></screen>
<!ENTITY test-use-internet
"<note><para>An Internet connection is needed for some tests of
this package.</para></note>">
<!ENTITY logind
"<phrase revision='sysv'><xref linkend='elogind'/></phrase>
<phrase revision='systemd'><xref linkend='systemd'/></phrase>">

View File

@ -104,6 +104,11 @@
<ulink url="https://gitlab.freedesktop.org/spice/libcacard">libcacard</ulink>
</para>
<bridgehead renderas="sect4">Optional (Runtime)</bridgehead>
<para role="runtime">
&logind;
</para>
<bridgehead renderas="sect4">Optional (for building the documentation)</bridgehead>
<para role="optional">
<xref linkend="sphinx_rtd_theme"/>
@ -190,8 +195,14 @@ Device Drivers ---&gt;
<screen role="root" revision="sysv"><userinput>groupadd -g 61 kvm</userinput></screen>
-->
<para>
As the &root; user, add any users that might use the KVM device to that
group:
The udev rule of LFS only allows the &root; user, the users owning
a local login session supported by the optional runtime dependency
&logind;, or the users in the
<systemitem class="groupname">kvm</systemitem> group to use the KVM
device. As the &root; user, add any non-&root; users that might use
the KVM device either without &logind; installed or remotely (via a
SSH connection) to the
<systemitem class="groupname">kvm</systemitem> group:
</para>
<screen role="root"><userinput>usermod -a -G kvm <replaceable>&lt;username&gt;</replaceable></userinput></screen>