From b5fcb5b67d104bbde4bf6a6ac565c6548ca91d11 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 31 Jul 2013 14:35:53 +0200 Subject: [PATCH] Use the qemu-kvm wrapper --- pkgs/build-support/vm/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index dbab401d9baa..2821fc0a099d 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -9,9 +9,9 @@ with pkgs; rec { - kvm = pkgs.qemu; + qemu = pkgs.qemu_kvm; - qemuProg = "${kvm}/bin/qemu-system-" + (if stdenv.system == "x86_64-linux" then "x86_64" else "i386"); + qemuProg = "${qemu}/bin/qemu-kvm"; modulesClosure = makeModulesClosure { @@ -188,7 +188,6 @@ rec { qemuCommandLinux = '' ${qemuProg} \ - -enable-kvm \ ${lib.optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \ -nographic -no-reboot \ -virtfs local,path=/nix/store,security_model=none,mount_tag=store \ @@ -242,7 +241,7 @@ rec { createEmptyImage = {size, fullName}: '' mkdir $out diskImage=$out/disk-image.qcow2 - ${kvm}/bin/qemu-img create -f qcow2 $diskImage "${toString size}M" + ${qemu}/bin/qemu-img create -f qcow2 $diskImage "${toString size}M" mkdir $out/nix-support echo "${fullName}" > $out/nix-support/full-name @@ -362,7 +361,7 @@ rec { diskImage=$(pwd)/disk-image.qcow2 origImage=${attrs.diskImage} if test -d "$origImage"; then origImage="$origImage/disk-image.qcow2"; fi - ${kvm}/bin/qemu-img create -b "$origImage" -f qcow2 $diskImage + ${qemu}/bin/qemu-img create -b "$origImage" -f qcow2 $diskImage ''; /* Inside the VM, run the stdenv setup script normally, but at the @@ -459,7 +458,7 @@ rec { fi diskImage="$1" if ! test -e "$diskImage"; then - ${kvm}/bin/qemu-img create -b ${image}/disk-image.qcow2 -f qcow2 "$diskImage" + ${qemu}/bin/qemu-img create -b ${image}/disk-image.qcow2 -f qcow2 "$diskImage" fi export TMPDIR=$(mktemp -d) export out=/dummy