Skip to content

Commit

Permalink
vmTools: omit '-drive ...' entirely instead of using /dev/null
Browse files Browse the repository at this point in the history
Fixes #33378.
  • Loading branch information
dtzWill authored and dezgeg committed Jan 7, 2018
1 parent 922bcd0 commit 21f7b2b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkgs/build-support/vm/default.nix
Expand Up @@ -208,7 +208,7 @@ rec {
-device virtio-rng-pci \
-virtfs local,path=${storeDir},security_model=none,mount_tag=store \
-virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
-drive file=$diskImage,if=virtio,cache=unsafe,werror=report \
''${diskImage:+-drive file=$diskImage,if=virtio,cache=unsafe,werror=report} \
-kernel ${kernel}/${img} \
-initrd ${initrd}/initrd \
-append "console=ttyS0 panic=1 command=${stage2Init} out=$out mountDisk=$mountDisk loglevel=4" \
Expand All @@ -223,8 +223,6 @@ rec {
mkdir xchg
mv saved-env xchg/
diskImage=''${diskImage:-/dev/null}
eval "$preVM"
if [ "$enableParallelBuilding" = 1 ]; then
Expand All @@ -240,7 +238,7 @@ rec {
# the -K option to preserve the temporary build directory).
cat > ./run-vm <<EOF
#! ${bash}/bin/sh
diskImage=$diskImage
''${diskImage:+diskImage=$diskImage}
TMPDIR=$TMPDIR
cd $TMPDIR
${qemuCommand}
Expand Down

0 comments on commit 21f7b2b

Please sign in to comment.