From 97093b3e2ec77355431d2a21419dd9db40f01cc7 Mon Sep 17 00:00:00 2001 From: Shawn A Hensley Date: Fri, 15 Nov 2024 16:28:35 -0600 Subject: [PATCH] libvirtd/libvirtd-desktop: Add libvirtdbus docs --- libvirtd-desktop/README.md | 26 +++++++++++++++++++++++++- libvirtd/README.md | 26 +++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/libvirtd-desktop/README.md b/libvirtd-desktop/README.md index 0e80195..55041b7 100644 --- a/libvirtd-desktop/README.md +++ b/libvirtd-desktop/README.md @@ -7,13 +7,33 @@ ``` $ sudo systemd-sysusers /usr/lib/sysusers.d/libvirt-qemu.conf ``` +- Create the `libvirtdbus` user and group: + ``` + $ sudo bash -c 'getent group libvirtdbus >/dev/null || groupadd -r libvirtdbus' + $ sudo bash -c 'getent passwd libvirtdbus >/dev/null || \ + useradd -r -g libvirtdbus -d / -s /sbin/nologin \ + -c "Libvirt D-Bus bridge" libvirtdbus' + ``` +- Create the `libvirt` group to allow password-less polkit access to libvirt deamons: + ``` + $ sudo bash -c 'getent group libvirt >/dev/null || groupadd -r libvirt' + ``` +- Optional: Add your UID to the libvirt group + ``` + $ sudo usermod -G -a libvirt $YOUR-UID-HERE + ``` +- Copy the default libvirt dbus config and fix the selinux label + ``` + $ sudo cp -a /usr/share/dbus-1/system.d/org.libvirt.conf /etc/dbus-1/system.d/ + $ sudo restorecon -Fv /etc/dbus-1/system.d/org.libvirt.conf + ``` - Copy the some default config: ``` $ sudo cp -a /usr/etc/mdevctl.d /etc/ ``` - Optional: Copy the default libvirtd config (note that it won't be updated automatically): ``` - $ sudo cp -a /usr/etc/libvirtd /etc/ + $ sudo cp -a /usr/etc/libvirt /etc/ ``` - Optional: Setup auth via polkit (example): ``` @@ -29,3 +49,7 @@ ``` $ sudo systemctl enable --now libvirtd ``` +- Enable virtqemud: + ``` + $ sudo systemctl enable --now virtqemud + ``` diff --git a/libvirtd/README.md b/libvirtd/README.md index 0e80195..55041b7 100644 --- a/libvirtd/README.md +++ b/libvirtd/README.md @@ -7,13 +7,33 @@ ``` $ sudo systemd-sysusers /usr/lib/sysusers.d/libvirt-qemu.conf ``` +- Create the `libvirtdbus` user and group: + ``` + $ sudo bash -c 'getent group libvirtdbus >/dev/null || groupadd -r libvirtdbus' + $ sudo bash -c 'getent passwd libvirtdbus >/dev/null || \ + useradd -r -g libvirtdbus -d / -s /sbin/nologin \ + -c "Libvirt D-Bus bridge" libvirtdbus' + ``` +- Create the `libvirt` group to allow password-less polkit access to libvirt deamons: + ``` + $ sudo bash -c 'getent group libvirt >/dev/null || groupadd -r libvirt' + ``` +- Optional: Add your UID to the libvirt group + ``` + $ sudo usermod -G -a libvirt $YOUR-UID-HERE + ``` +- Copy the default libvirt dbus config and fix the selinux label + ``` + $ sudo cp -a /usr/share/dbus-1/system.d/org.libvirt.conf /etc/dbus-1/system.d/ + $ sudo restorecon -Fv /etc/dbus-1/system.d/org.libvirt.conf + ``` - Copy the some default config: ``` $ sudo cp -a /usr/etc/mdevctl.d /etc/ ``` - Optional: Copy the default libvirtd config (note that it won't be updated automatically): ``` - $ sudo cp -a /usr/etc/libvirtd /etc/ + $ sudo cp -a /usr/etc/libvirt /etc/ ``` - Optional: Setup auth via polkit (example): ``` @@ -29,3 +49,7 @@ ``` $ sudo systemctl enable --now libvirtd ``` +- Enable virtqemud: + ``` + $ sudo systemctl enable --now virtqemud + ```