3
0
Fork 0
forked from mirrors/nixpkgs

vmTools: omit '-drive ...' entirely instead of using /dev/null

Fixes #33378.
This commit is contained in:
Will Dietz 2018-01-03 12:25:48 -06:00 committed by Tuomas Tynkkynen
parent 922bcd0e46
commit 21f7b2b3f2

View file

@ -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" \
@ -223,8 +223,6 @@ rec {
mkdir xchg
mv saved-env xchg/
diskImage=''${diskImage:-/dev/null}
eval "$preVM"
if [ "$enableParallelBuilding" = 1 ]; then
@ -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}