A shell script that checks whether your hardware is compatible with 100% free virtualization using the Linux-libre kernel on fully free GNU/Linux distributions such as Trisquel and GNU Guix System.
check_libre_vm.sh performs five hardware checks and writes a single-word
result (PASS or FAIL) to vm.txt.
| # | Check | Pass condition |
|---|---|---|
| 1 | CPU hardware virtualization | /proc/cpuinfo contains vmx (Intel VT-x) or svm (AMD-V) |
| 2 | KVM kernel modules | kvm_intel or kvm_amd is loaded via lsmod |
| 3 | /dev/kvm device | The device node /dev/kvm exists and is accessible |
| 4 | Proprietary firmware (blob) scan | dmesg shows no firmware: failed, failed to load, or missing firmware messages (excluding regulatory.db) |
| 5 | Nvidia GPU warning | Informational only — Nvidia GPUs work only with the free Nouveau driver under Linux-libre, which may reduce 3D performance on the host |
The overall result is PASS only when checks 1, 3, and 4 all pass. Check 2 issues a warning but does not change the result. Check 5 is informational and never changes the result.
- Bash 4 or later
- Standard GNU/Linux utilities:
grep,lsmod,lspci,dmesg,sed - Must be run as a user with read access to
dmesg(or as root)
chmod +x check_libre_vm.sh
./check_libre_vm.shAfter the script finishes, vm.txt contains either PASS or FAIL.
You can read it programmatically:
result=$(cat vm.txt)
if [ "$result" = "PASS" ]; then
echo "Hardware is compatible."
fivm.txt is overwritten on every run. It contains exactly one line:
PASS— hardware is fully compatible with free virtualization under Linux-libreFAIL— one or more critical incompatibilities were detected
Copyright (C) 2026 QB Networks
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
See CHANGELOG.md for the full commit history and release notes.