Fix the EC2 test

We now generate a qcow2 image to prevent hitting Hydra's output size
limit. Also updated /root/user-data -> /etc/ec2-metadata/user-data.

http://hydra.nixos.org/build/33843133
This commit is contained in:
Eelco Dolstra
2016-03-30 21:48:12 +02:00
parent 184b7ba3c6
commit 0d3738cdcc
4 changed files with 13 additions and 11 deletions

View File

@@ -23,6 +23,8 @@
postVM ? ""
, name ? "nixos-disk-image"
, format ? "raw"
}:
with lib;
@@ -32,8 +34,8 @@ pkgs.vmTools.runInLinuxVM (
{ preVM =
''
mkdir $out
diskImage=$out/nixos.img
${pkgs.vmTools.qemu}/bin/qemu-img create -f raw $diskImage "${toString diskSize}M"
diskImage=$out/nixos.${if format == "qcow2" then "qcow2" else "img"}
${pkgs.vmTools.qemu}/bin/qemu-img create -f ${format} $diskImage "${toString diskSize}M"
mv closure xchg/
'';
buildInputs = [ pkgs.utillinux pkgs.perl pkgs.e2fsprogs pkgs.parted ];