From eff0752dbc36f52fce9c27ff10b8db41a5f632f4 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 13 Feb 2017 08:54:10 +0000 Subject: [PATCH] Use default qemu for azure image generation, and use option to enforce sizing of image to be compliant with Azure/HyperV. (cherry picked from commit e16db5666af987f8a76be82ff219e138e92af442) --- nixos/modules/virtualisation/azure-image.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix index 9fac543b03d..91fae88fc98 100644 --- a/nixos/modules/virtualisation/azure-image.nix +++ b/nixos/modules/virtualisation/azure-image.nix @@ -16,14 +16,14 @@ in cyl=$(((${diskSize}*1024*1024)/(512*63*255))) size=$(($cyl*255*63*512)) roundedsize=$((($size/(1024*1024)+1)*(1024*1024))) - ${pkgs.vmTools.qemu-220}/bin/qemu-img create -f raw $diskImage $roundedsize + ${pkgs.vmTools.qemu}/bin/qemu-img create -f raw $diskImage $roundedsize mv closure xchg/ ''; postVM = '' mkdir -p $out - ${pkgs.vmTools.qemu-220}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd + ${pkgs.qemu}/bin/qemu-img convert -f raw -o force_size -O vpc $diskImage $out/disk.vhd rm $diskImage ''; diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw";