mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 02:44:30 +00:00
qemu, runInLinuxVM: fix KVM availability check
KVM should only be considered abailable if /dev/kvm exists and is read-writable by the user that is trying to launch it. The previous check for existance only had the consequence that on some Linux distributions running VMs with Nix's QEMU only worked if KVM was NOT installed. fixes #124371
This commit is contained in:
parent
f57e1a4dab
commit
5d06f6933d
@ -231,7 +231,7 @@ stdenv.mkDerivation rec {
|
||||
if [ -x $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} ]; then
|
||||
makeWrapper $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} \
|
||||
$out/bin/qemu-kvm \
|
||||
--add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"
|
||||
--add-flags "\$([ -r /dev/kvm -a -w /dev/kvm ] && echo -enable-kvm)"
|
||||
fi
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user