Skip to content

Commit

Permalink
build-vm-kvm: pass root fstype and flags to qemu cmdline
Browse files Browse the repository at this point in the history
  • Loading branch information
bugfinder committed May 4, 2015
1 parent d10b788 commit 2852127
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build-vm-kvm
Expand Up @@ -170,10 +170,18 @@ vm_startup_kvm() {
test "$kvm_console" != ttyAMA0 && kvm_options="$kvm_options -cpu host"
test -n "$HUGETLBFSPATH" && kvm_options="$kvm_options -mem-prealloc -mem-path $HUGETLBFSPATH"
fi
qemu_rootfstype=""
if test -n "$VMDISK_FILESYSTEM" ; then
qemu_rootfstype="rootfstype=$VMDISK_FILESYSTEM"
fi
qemu_rootflags=""
if test -n "$VMDISK_MOUNT_OPTIONS" ; then
qemu_rootflags="rootflags=${VMDISK_MOUNT_OPTIONS#-o }"
fi
set -- $qemu_bin -no-reboot -nographic -vga none -net none $kvm_options \
-kernel $vm_kernel \
-initrd $vm_initrd \
-append "root=$qemu_rootdev panic=1 quiet no-kvmclock nmi_watchdog=0 rw rd.driver.pre=binfmt_misc elevator=noop console=$kvm_console init=$vm_init_script" \
-append "root=$qemu_rootdev $qemu_rootfstype $qemu_rootflags panic=1 quiet no-kvmclock nmi_watchdog=0 rw rd.driver.pre=binfmt_misc elevator=noop console=$kvm_console init=$vm_init_script" \
${VM_MEMSIZE:+-m $VM_MEMSIZE} \
"${qemu_args[@]}"

Expand Down

0 comments on commit 2852127

Please sign in to comment.