Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 2014 19:56:58 -0400
From:      Assaf Gordon <assafgordon@gmail.com>
To:        freebsd-virtualization@freebsd.org
Subject:   FreeBSD with qemu/kvm "-kernel" option
Message-ID:  <541CC2CA.2050009@gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

I have FreeBSD 8.4, 9.3 and 10 guests VM running under KVM (on amd64 host).
They work great with virtio disk and network.

Now I'm trying to take it to the next level:
Instead of using the bootloader inside the VM, I want to specify the kernel directly using qemu's "-kernel" option.

Generally, the usage is supposed to be this:
     kvm  -drive file=freebsd.qcow2,media=disk,if=virtio,index=0 \
          -kernel ./kernel

Where "./kernel is the FreeBSD kernel ELF file (stored as a file on the host machine).
Using the generic "/boot/kernel/kernel" kernel does not work (VM doesn't boot at all).

I assume that more options are needed (e.g. "-initrd" and "-append"), and perhaps also a kernel with different options.

Does anyone have an idea of how to achieve this ?
Is rebuilding a kernel image from source with special options needed ?

Any help will be appreciated,
Thanks,
  - Assaf



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?541CC2CA.2050009>