[2025-jun-17] The SlackDocs mailing lists at https://lists.alienbase.nl/mailman/listinfo have been retired. No one has been using these lists for years and it's time to say goodbye. The list archives remain available at https://scalzi.slackware.nl/mailman/listinfo/slackdocs
[2025-jun-17] The SlackDocs Wiki has moved to a new server, in order to make it more performant.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:emulators:libvirt_qemu_manage_install [2022/02/17 04:14 (UTC)] – [Appendage] zeebra | howtos:emulators:libvirt_qemu_manage_install [2023/12/19 08:57 (UTC)] (current) – [Packages, dependencies, order] zeebra | ||
---|---|---|---|
Line 11: | Line 11: | ||
===== Requirements ===== | ===== Requirements ===== | ||
- | Be sure to use Slackware 15.0 and **Kernel-generic** to accurately be able to reproduce this build and as a reference point. It should work on others, but use kernel-generic to be sure. | + | Be sure to use **Slackware 15.0** (full install) |
- | Your processor | + | Your processor |
< | < | ||
It should give an answer like: | It should give an answer like: | ||
Line 20: | Line 20: | ||
===== Preliminaries ===== | ===== Preliminaries ===== | ||
- | Before installation it is possible | + | If you try to just build QEMU or Libvirt on Slackware 15, you will find out this information: (not complete) \\ |
qemu says: | qemu says: | ||
* Run-time dependency libnfs found: NO / libnfs support: NO\\ | * Run-time dependency libnfs found: NO / libnfs support: NO\\ | ||
Line 28: | Line 28: | ||
* vde support: NO\\ | * vde support: NO\\ | ||
* usb net redir: NO\\ | * usb net redir: NO\\ | ||
+ | * slirp support: NO (since QEMU 7.2)\\ | ||
+ | |||
libvirt says: | libvirt says: | ||
Line 33: | Line 35: | ||
* Run-time dependency yajl found: NO (yajl: NO)\\ | * Run-time dependency yajl found: NO (yajl: NO)\\ | ||
- | <note warning> | + | Note. You can test this by going to the QEMU and libvirt directories and running ./configure and meson configure. |
- | **https://docs.slackware.com/ | + | |
- | ===== Methodology (read this carefully) | + | ===== Before getting started |
- | - You CAN use "make install" | + | <note warning> |
- | - This guide is using /opt/root/build for user (with user read/write access) - you could/ | + | **https://docs.slackware.com/howtos: |
- | - This guide is using / | + | |
- | - Whenever it says "(as ROOT)" you must continue in the same folder you were in (su) | + | |
- | - Whenever it says "(as USER)" or "(as ROOT)", | + | |
- | - As this guide moves on, it will repeat less and less assumed details (see stage1 for most details) | + | |
- | <note tip>It is possible to do the whole process (except installpkg, ps. not tested..) as user and install into a user " | + | |
- | < | + | |
===A few things to consider before proceeding: | ===A few things to consider before proceeding: | ||
* Audit support (general) - if you habitually use this and/or might need it, better to do it now before kvm/ | * Audit support (general) - if you habitually use this and/or might need it, better to do it now before kvm/ | ||
* Gstreamer codecs (spice) - libav and gst-plugins-ugly support, better to deal with general codec stuff before qemu/spice etc, in particular those 2 | * Gstreamer codecs (spice) - libav and gst-plugins-ugly support, better to deal with general codec stuff before qemu/spice etc, in particular those 2 | ||
- | * https:// | + | * https:// |
- | * https:// | + | * https:// |
* Compiling Qemu with only the machines you need (unless you need alot of exotic CPU emulation and/or cross-compilation) | * Compiling Qemu with only the machines you need (unless you need alot of exotic CPU emulation and/or cross-compilation) | ||
+ | |||
+ | ===== Methodology (read this carefully) ===== | ||
+ | |||
+ | - The norm for Slackware is to build packages as root on a disposable machine installation (for example a virtual machine, or a build computer) | ||
+ | - This guide uses / | ||
+ | - Double check this article to know what you are doing: [[howtos: | ||
+ | - This guide assumes you use the same methods | ||
+ | - This guide uses user for make and root for make install | ||
+ | - Whenever it says "(as ROOT)" you must continue in the same folder you were in (su) | ||
+ | - Whenever it says "(as USER)" or "(as ROOT)", | ||
+ | |||
+ | <note tip>It is possible to do the whole process (except installpkg, ps. not tested..) as user and install into a user " | ||
+ | |||
+ | < | ||
+ | |||
\\ | \\ | ||
+ | |||
+ | ===== Packages, dependencies, | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | ^ Stage 1 ^ Stage 2 ^ Stage 3 ^ Stage 4 ^ Stage 5 ^ Stage 6 ^ | ||
+ | | [[https:// | ||
+ | | [[https:// | ||
+ | | [[https:// | ||
+ | | | [[https:// | ||
+ | | | [[https:// | ||
+ | | | [[https:// | ||
+ | | | [[https:// | ||
+ | | | [[https:// | ||
+ | | | [[https:// | ||
===== Building, packaging, installing ===== | ===== Building, packaging, installing ===== | ||
Line 84: | Line 109: | ||
== Process 1 == | == Process 1 == | ||
- | Note. "meson configure" | + | **libosinfo-v1.11.0** |
- | **libosinfo-v1.9.0** | + | |
< | < | ||
(as USER) | (as USER) | ||
- | cd libosinfo-v1.9.0 | + | cd libosinfo-v1.11.0 |
- | meson configure | + | meson configure |
meson build | meson build | ||
ninja -C build | ninja -C build | ||
Line 258: | Line 282: | ||
You should NOT get an error like this: (Error when getting information for file “/ | You should NOT get an error like this: (Error when getting information for file “/ | ||
+ | < | ||
after installing this package, we can go to qemu testdir and test with ./ | after installing this package, we can go to qemu testdir and test with ./ | ||
libnfs support: Yes\\ | libnfs support: Yes\\ | ||
Line 398: | Line 423: | ||
python3 setup.py install --root=/ | python3 setup.py install --root=/ | ||
as ROOT | as ROOT | ||
+ | mkdir / | ||
cd / | cd / | ||
chown -R root fakeroot/ | chown -R root fakeroot/ | ||
Line 424: | Line 450: | ||
==== Appendage ==== | ==== Appendage ==== | ||
- | Other packages to consider: | + | **Other packages to consider:** |
*acpica (acpi tables for qemu) | *acpica (acpi tables for qemu) | ||
*ovmf (firmware UEFI stuff for qemu) | *ovmf (firmware UEFI stuff for qemu) | ||
*snappy (particular compression algo for qemu) | *snappy (particular compression algo for qemu) | ||
*gst-plugin-ugly (codec for spice) | *gst-plugin-ugly (codec for spice) | ||
- | *gst-libav (gstreamer codec for spice) | + | *gst-libav (gstreamer codec for spice)\\ |
- | If you want to test this on Slackware | + | < |
- | link here in the future..\\ | + | |
- | For now a summary | + | **If you want configure and set up libvirt/qemu/kvm and virt-manager on Slackware 15.0 use the info in this link:**\\ |
- | + | https://docs.slackware.com/howtos: | |
- | < | + | |
- | groupadd --system libvirt | + | |
- | groupadd --system kvm | + | |
- | usermod -aG libvirt,kvm username | + | |
- | </ | + | |
- | Note. you need to log out of X and tty and back in for group to take effect (you can do that later too)\\ | + | |
- | + | ||
- | The below step is for qemu: | + | |
- | <code> | + | |
- | chgrp kvm /dev/kvm | + | |
- | chmod g+rw /dev/kvm | + | |
- | </ | + | |
- | + | ||
- | go to the libvirt config file and uncomment | + | |
- | < | + | |
- | nano /usr/local/ | + | |
- | unix_sock_group = " | + | |
- | unix_sock_ro_perms = " | + | |
- | unix_sock_rw_perms = " | + | |
- | unix_sock_admin_perms = " | + | |
- | auth_unix_ro = " | + | |
- | auth_unix_rw = " | + | |
- | ctrl+x (save) | + | |
- | libvirtd -d | + | |
- | virtlogd -d | + | |
- | </code> | + | |
- | This is just an example you can use on a computer where you are the only user. | ||
=== Cleaning === | === Cleaning === |