diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/debvm-run | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/debvm-run b/bin/debvm-run index 759ab27..03cde3b 100755 --- a/bin/debvm-run +++ b/bin/debvm-run @@ -246,12 +246,18 @@ esac KERNEL_CMDLINE="root=LABEL=$IMAGE_LABEL rw" NETDEV="user,id=net0" +exec 8<"$KERNELTMP" +exec 9<"$INITRDTMP" +rm -f "$KERNELTMP" "$INITRDTMP" +KERNELTMP= +INITRDTMP= + set -- \ -no-user-config \ -name "debvm-run $IMAGE" \ -m 1G \ - -kernel "$KERNELTMP" \ - -initrd "$INITRDTMP" \ + -kernel "/proc/self/fd/8" \ + -initrd "/proc/self/fd/9" \ -drive "media=disk,format=raw,discard=unmap,file=$IMAGE,if=virtio,cache=unsafe" \ -object rng-random,filename=/dev/urandom,id=rng0 \ "$@" @@ -390,4 +396,5 @@ set -- \ -device "$NIC_DEV" \ "$@" -with_set_ex "$QEMU" "$@" +echo + "$QEMU" "$@" +exec "$QEMU" "$@" |