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:
@@ -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 ];
|
||||
|
||||
Reference in New Issue
Block a user