0

I'm trying to run KVM on Raspberry Pi 2. Through Google I found that Cortex-A7 used in RPi2 supports virtualization extensions which needs GIC(Generic Interrupt Controller) for interrupt routing/control but Raspberry SoC uses a different modified Interrupt Controller.

I found this awesome post that showed how to hack RPi2 to run KVM virtualization and by following it, I successfully ran a VM using qemu-system-arm.

I tried to run a simple 'CirrOS' using 'virt-install' command after and nothing shows up after the 'escape character' line.

virt-install --connect=qemu:///system --name=cirros --ram=256 --vcpus=1 --disk path=cirros-0.3.2-x86_64-disk.img,format=qcow2 --import --network network:default --nographics

I'm trying to verify if 'libvirt' works okay which I need later in my project. I'm a beginner in this area and I hope someone can guide me. I'm not entirely sure if I should post this question in here or unix.stackexchange.com.

Sources: https://lists.gt.net/xen/users/369667

http://blog.flexvdi.es/2015/03/17/enabling-kvm-virtualization-on-the-raspberry-pi-2/

Thanks

  • Is that guest a x86 image? I think you might stuggle to get that working on the ARM chip on the RPi. QEMU does have some emulation capacity but I think translating x86 to ARM and back might be a little sluggish. You may also need to get hold of some qemu libs to support that translation. – tobyd Mar 16 '17 at 11:07
  • @tobyd I tried an arm version of CirrOS too, same result. And I'm confused about one other thing, QEMU with KVM disabled can be done for arm based images on RPi, right? like underlying hardware shouldn't matter, right? – beenum Mar 16 '17 at 11:29
  • That should be the case - qemu on the Pi in pure emulation might be unusably slow and for x86 you'd need some extra libs. Those instructions appear to only be for ARM guest virtualisation, worth checking the logs at ~/.virtinst/virt-install.log to see whats causing problems. Perhaps try virtualising the stock raspbian-lite image? – tobyd Mar 16 '17 at 13:09

Your Answer

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

Browse other questions tagged or ask your own question.