Skip to content

Commit

Permalink
libvirtd/libvirtd-desktop: Add libvirtdbus docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sahensley committed Nov 19, 2024
1 parent 1333b4c commit 600a17a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 2 deletions.
36 changes: 35 additions & 1 deletion libvirtd-desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,43 @@
```
$ 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
```
- Create the /etc/dbus-1/system.d/org.libvirt.conf file
```
$ sudo cat /etc/dbus-1/system.d/org.libvirt.conf
<?xml version="1.0"?>
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="libvirtdbus">
<allow send_destination="org.libvirt"/>
</policy>
</busconfig>
```
- 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):
```
Expand All @@ -29,3 +59,7 @@
```
$ sudo systemctl enable --now libvirtd
```
- Enable virtqemud:
```
$ sudo systemctl enable --now virtqemud
```
36 changes: 35 additions & 1 deletion libvirtd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,43 @@
```
$ 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
```
- Create the /etc/dbus-1/system.d/org.libvirt.conf file
```
$ sudo cat /etc/dbus-1/system.d/org.libvirt.conf
<?xml version="1.0"?>
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="libvirtdbus">
<allow send_destination="org.libvirt"/>
</policy>
</busconfig>
```
- 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):
```
Expand All @@ -29,3 +59,7 @@
```
$ sudo systemctl enable --now libvirtd
```
- Enable virtqemud:
```
$ sudo systemctl enable --now virtqemud
```

0 comments on commit 600a17a

Please sign in to comment.