I'm facing a strange problem. I thought that kvm was just a modified version of qemu for hardware acceleration. Now I'm trying to run a VM on different computers using qemu without acceleration. This is not for production, simply for hacking a little bit on a machine that does not support kvm.

The VM is a debian testing, whith LVM, created using virt-manager with virtio activated for both networking and disk.

When I try to run the VM manually (without the complicated full libvirt command line) the VM just works, using the command kvm myVM.img

Now when I try to boot the VM with qemu: qemu myVM.img, the VM boots and grub loads just fine, but fails loading debian. The machine freezes without any message (no output from kernel at all).

The full kvm command line is given below, in case this may help:

/usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name myVM -uuid 312ff690-5f11-2222-a8b9-1337a545652a -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/myVM.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot dc -drive file=/var/lib/libvirt/images/myVM.img,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:eb:bb:77,bus=pci.0,addr=0x3 -net tap,fd=41,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

Do you have some clue about what I could try ? Thanks !

Edit: with kvm -no-kvm as suggested, the machine loads with errors. I'll try to list those errors soon.

  • what error at startup – bindbn Sep 25 '10 at 17:05
  • no error at startup with qemu, nothing, black screen – ixio Sep 25 '10 at 18:18

KVM is not just qemu with hardware acceleration anymore. While most of the technology seems to flow back to qemu, some parts are ahead or follow a different route and the defaults vary.

Would it not be an option to use kvm -no-kvm ?

Where exactly does the machine fail? Does it still load the kernel?

  • thanks for this fast answer. With kvm -no-kvm the machine takes a few minutes to load the kernel but still loads it. Then I get a few errors I should be able to deal with. With qemu alone, I can't see anything after selecting the kernel within grub, even after waiting an hour. – ixio Sep 25 '10 at 18:17
  • That's odd, grub should either load the kernel or print out an error. It could be the kernel is outputting somewhere else (framebuffer, serial, ..?) and the machine could actually be (partially) booted/running (been there..). All in all, you could be better off using something other than qemu; virtualbox or vmware should be quite a bit faster since they don't emulate the CPU. – Joris Sep 25 '10 at 19:02
  • Well, in fact the problem came out because I wanted to run VM on a Mac. So I converted the image to virtualbox with qemu-img and VBoxManage and in fact I get exactly the same problem. Maybe I should have precised that point. That is, the translated kvm-->virtualbox also boots grub and does not show anything then. – ixio Sep 25 '10 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.