]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: do not append root=/dev/vda if passed via command line
authorDavid Ahern <dsahern@gmail.com>
Tue, 5 Apr 2011 16:04:13 +0000 (10:04 -0600)
committerPekka Enberg <penberg@kernel.org>
Tue, 5 Apr 2011 16:44:40 +0000 (19:44 +0300)
commiteb5e0b2f9babdaeb71f4ea7aca2a0e7a69a394e2
tree846b2487fa7c8f9c3ed920ac14d622924706414a
parentbb7c87ee0655ddb873e75fb2cbe25c7045a1e9fb
kvm tools: do not append root=/dev/vda if passed via command line

Hardcoding the root= option prevents an existing qemu-kvm based disk
image using LVM from booting. It fails to find the root filesystem.
By making the root parameter optional if given on the command line, the
image boots correctly. For example,

  ./kvm --kernel=/tmp/vmlinuz-2.6.38 \
        --initrd=/tmp/initramfs-2.6.38.img \
        --image=/home/dsa/vm/images/f14/nkvm-f14.img \
        --mem=1024
        --params="ro root=/dev/mapper/vg_f14vm-lv_root"

works now.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/main.c