diff options
-rwxr-xr-x | debvm-create | 10 | ||||
-rwxr-xr-x | debvm-run | 12 |
2 files changed, 3 insertions, 19 deletions
diff --git a/debvm-create b/debvm-create index d827e5c..f34328e 100755 --- a/debvm-create +++ b/debvm-create @@ -122,15 +122,7 @@ set -- \ "$@" # unless we set up a fstab, / will be read-only -case "$ARCHITECTURE" in - amd64|i386|ppc64el) - DISKDEV=sda - ;; - *) - DISKDEV=vda - ;; -esac -set -- "--customize-hook=echo '/dev/$DISKDEV / ext4 defaults 0 1' >"'"$1/etc/fstab"' "$@" +set -- "--customize-hook=echo '/dev/vda / ext4 defaults 0 1' >"'"$1/etc/fstab"' "$@" # set up a hostname set -- \ @@ -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" \ "$@" |