Azure: switch back to qemu 2.2.0 for generating image. Seems to work best.
(cherry picked from commit 2da8a5dac8674501ba9ed10e44650088b466688a)
This commit is contained in:
parent
eff0752dbc
commit
af3732b6c6
|
@ -16,14 +16,14 @@ in
|
||||||
cyl=$(((${diskSize}*1024*1024)/(512*63*255)))
|
cyl=$(((${diskSize}*1024*1024)/(512*63*255)))
|
||||||
size=$(($cyl*255*63*512))
|
size=$(($cyl*255*63*512))
|
||||||
roundedsize=$((($size/(1024*1024)+1)*(1024*1024)))
|
roundedsize=$((($size/(1024*1024)+1)*(1024*1024)))
|
||||||
${pkgs.vmTools.qemu}/bin/qemu-img create -f raw $diskImage $roundedsize
|
${pkgs.vmTools.qemu-220}/bin/qemu-img create -f raw $diskImage $roundedsize
|
||||||
mv closure xchg/
|
mv closure xchg/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postVM =
|
postVM =
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
${pkgs.qemu}/bin/qemu-img convert -f raw -o force_size -O vpc $diskImage $out/disk.vhd
|
${pkgs.vmTools.qemu-220}/bin/qemu-img convert -f raw -o subformat=fixed -O vpc $diskImage $out/disk.vhd
|
||||||
rm $diskImage
|
rm $diskImage
|
||||||
'';
|
'';
|
||||||
diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw";
|
diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw";
|
||||||
|
|
Loading…
Reference in New Issue