summaryrefslogtreecommitdiff
path: root/debvm-run
diff options
context:
space:
mode:
authorJohannes Schauer Marin Rodrigues <josch@mister-muffin.de>2022-12-21 20:24:30 +0100
committerJohannes Schauer Marin Rodrigues <josch@mister-muffin.de>2022-12-21 20:24:30 +0100
commit7bf0476dc5e8a09e524b3116627d57aa5edbfd2b (patch)
treea7a1185c97a197b7b680dfc6908fa3013f0b74f7 /debvm-run
parent6f422d6b4ea1fa9424f086297ad4166a3ddd4822 (diff)
downloaddebvm-7bf0476dc5e8a09e524b3116627d57aa5edbfd2b.tar.gz
attach the disk via virtio interface for some speed gain and to unify the device node to be vda always
Diffstat (limited to 'debvm-run')
-rwxr-xr-xdebvm-run12
1 files changed, 2 insertions, 10 deletions
diff --git a/debvm-run b/debvm-run
index bc206ac..7e81b79 100755
--- a/debvm-run
+++ b/debvm-run
@@ -64,14 +64,6 @@ if command -v elf-arch >/dev/null 2>&1; then
VMARCH=$(elf-arch "$KERNELTMP")
fi
case "$VMARCH" in
- amd64|i386|ppc64el)
- DISKDEV=sda
- ;;
- *)
- DISKDEV=vda
- ;;
-esac
-case "$VMARCH" in
mips*|ppc64el)
KERNELLINK=vmlinux
;;
@@ -86,7 +78,7 @@ INITRDNAME=$(/sbin/debugfs "$IMAGE" -R "stat initrd.img" | sed 's/Fast link dest
test -n "$KERNELNAME" || die "failed to discover kernel image"
test -n "$INITRDNAME" || die "failed to discover initrd image"
-KERNEL_CMDLINE=root=/dev/$DISKDEV
+KERNEL_CMDLINE=root=/dev/vda
NETDEV="user,id=net0"
set -- \
@@ -95,7 +87,7 @@ set -- \
-smp "$(nproc)" \
-kernel "$KERNELTMP" \
-initrd "$INITRDTMP" \
- -drive "media=disk,format=raw,discard=unmap,file=$IMAGE" \
+ -drive "media=disk,format=raw,discard=unmap,file=$IMAGE,if=virtio" \
-device "virtio-net-pci,netdev=net0" \
"$@"