Browse Source

Fix the installer tests

E.g. http://hydra.nixos.org/build/5561399
nsd-state-dir
Eelco Dolstra 10 years ago
parent
commit
6620a0f679
  1. 8
      doc/manual/man-nixos-rebuild.xml
  2. 2
      lib/test-driver/Machine.pm
  3. 3
      lib/testing.nix
  4. 2
      modules/virtualisation/qemu-vm.nix

8
doc/manual/man-nixos-rebuild.xml

@ -128,10 +128,10 @@ $ nixos-rebuild build-vm
$ ./result/bin/run-*-vm
</screen></para>
<para>The VM is implemented using the
<literal>qemu-kvm</literal> package. For best performance, you
should load the <literal>kvm-intel</literal> or
<literal>kvm-amd</literal> kernel modules.</para>
<para>The VM is implemented using the <literal>qemu</literal>
package. For best performance, you should load the
<literal>kvm-intel</literal> or <literal>kvm-amd</literal>
kernel modules to get hardware virtualisation.</para>
<para>The VM mounts the Nix store of the host through the CIFS
filesystem. (<literal>qemu-kvm</literal> automatically starts a

2
lib/test-driver/Machine.pm

@ -30,7 +30,7 @@ sub new {
if (!$startCommand) {
# !!! merge with qemu-vm.nix.
$startCommand =
"qemu-kvm -m 384 " .
"$ENV{'qemu'} -enable-kvm -m 384 " .
"-net nic,model=virtio \$QEMU_OPTS ";
my $iface = $args->{hdaInterface} || "virtio";
$startCommand .= "-drive file=" . Cwd::abs_path($args->{hda}) . ",if=$iface,boot=on,werror=report "

3
lib/testing.nix

@ -28,7 +28,8 @@ rec {
wrapProgram $out/bin/nixos-test-driver \
--prefix PATH : "${pkgs.qemu}/bin:${pkgs.vde2}/bin:${imagemagick}/bin:${coreutils}/bin" \
--prefix PERL5LIB : "${lib.makePerlPath [ perlPackages.TermReadLineGnu perlPackages.XMLWriter perlPackages.IOTty ]}:$out/lib/perl5/site_perl"
--prefix PERL5LIB : "${lib.makePerlPath [ perlPackages.TermReadLineGnu perlPackages.XMLWriter perlPackages.IOTty ]}:$out/lib/perl5/site_perl" \
--set qemu qemu-system-${if pkgs.stdenv.system == "x86_64-linux" then "x86_64" else "i386"}
'';
};

2
modules/virtualisation/qemu-vm.nix

@ -226,7 +226,7 @@ let
''
mkdir $out
diskImage=$out/disk.img
${pkgs.vmTools.kvm}/bin/qemu-img create -f qcow2 $diskImage "32M"
${pkgs.qemu}/bin/qemu-img create -f qcow2 $diskImage "32M"
'';
buildInputs = [ pkgs.utillinux ];
}

Loading…
Cancel
Save