Merge pull request #143237 from ck3d/fix-runInLinuxImage

vmTools: Fix missing backing format in runInLinuxImage
This commit is contained in:
markuskowa 2021-11-11 20:39:17 +01:00 committed by GitHub
commit 26f5e6dd5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -390,7 +390,7 @@ rec {
diskImage=$(pwd)/disk-image.qcow2
origImage=${attrs.diskImage}
if test -d "$origImage"; then origImage="$origImage/disk-image.qcow2"; fi
${qemu}/bin/qemu-img create -b "$origImage" -f qcow2 $diskImage
${qemu}/bin/qemu-img create -F ${attrs.diskImageFormat} -b "$origImage" -f qcow2 $diskImage
'';
/* Inside the VM, run the stdenv setup script normally, but at the

View file

@ -28,10 +28,10 @@ with vmTools;
buildInDebian = runInLinuxImage (stdenv.mkDerivation {
name = "deb-compile";
src = patchelf.src;
diskImage = diskImages.ubuntu1204i386;
diskImage = diskImages.ubuntu1804i386;
diskImageFormat = "qcow2";
memSize = 512;
prePhases = [ sysInfoPhase ];
sysInfoPhase = ''
postHook = ''
dpkg-query --list
'';
});