Skip to contentSkip to conversation

can kvm tool load vmlinux?

DISCUSSION David Evensky 2 participants 2 messages Dec 14, 2011 – Dec 15, 2011 KVM

lore
Share & tools
lore
#0 lore raw

I've been trying see if I can use a vmlinux kernel binary image with kvm tool. If use a bzImage as

    lkvm run -k .../bzImage --console serial -d /dev/null

which runs until it expectedly dies since I didn't give it an initramfs or disk. However, when I try:

    lkvm run -k .../bzImage --console serial -d /dev/null

I get the following printed and then nothing:

  # kvm run -k .../vmlinux -m 448 -c 4 --name guest-12289
  Warning: .../vmlinux is not a bzImage. Trying to load it as a flat binary...

Is this supposed to work?

Thanks,
\dae

#1 lore raw
Quoted 11 lines · David Evensky

I've been trying see if I can use a vmlinux kernel binary image with kvm tool. If use a bzImage as

    lkvm run -k .../bzImage --console serial -d /dev/null

which runs until it expectedly dies since I didn't give it an initramfs or disk. However, when I try:

    lkvm run -k .../bzImage --console serial -d /dev/null
Quoted 7 lines

I get the following printed and then nothing:

  # kvm run -k .../vmlinux -m 448 -c 4 --name guest-12289
  Warning: .../vmlinux is not a bzImage. Trying to load it as a flat binary...

Is this supposed to work?

Hi David,

Currently there are loaders for bzImages and flat binaries only. Since your vmlinux is not detected as a bzImage (it's a plain ELF), kvmtool will assume it's a flat binary (which it isn't) & try that. Boom!

An ELF loader would be cool though. (Maybe if I find time...)

Cheers,

Matt