5

Does the Raspberry Pi 2 support hardware virtualization? Looking at the ARM specification page, the Cortex A7 chip has the ability to do so, but I'm unsure if there may be other problematic concerns with the SOC or Raspbian itself.

My end goal is to be able to create a very simple image that can be run on the RPi for learning Kernel development.

1

Xen definitely supports the ARM7/8, but they do not list the RPi in their supported hardware. There are lots of virtualization-related libraries in raspbian jessie, but they all seem to be about managing other platforms, not managing a hypervisor running on the Pi. It could be that the particular flavor of the ARM core used on the SoC is missing some functionality (mmu, iommu, etc.) that would allow you to run a hypervisor on it. Also note that the Pi3 has an ARM8 core -- if you set out on such a journey, better start with that. It's only $39.

If you know enough to write your own kernel, you should be able to write some test code to figure this out, no? :)

(If you do, please let us know!)

Good luck,

/ji

  • No, I am certainly not able to write my own kernel. I have done some projects related to the kernel, but developing the entire thing is waaay outside my expertise. I asked the question with the intention of finding out myself if I had too, but I didn't find anything online so I thought the actual question might help others, or at least save myself some time. ;) – Jacobm001 Apr 15 '16 at 16:46
  • you said in the original posting that you wanted to do kernel development. Now you say you don't. Make up your mind! – JayEye Apr 15 '16 at 19:14
  • Sorry, I was just trying to clarify that I wasn't trying/am capable of creating an entire kernel from scratch. That implies much more knowledge skill than I possess. My experience is more limited to adapting specific pieces of said kernel. – Jacobm001 Apr 15 '16 at 19:30
1

It looks like the Raspberry Pi does not currently support virtualization. The output of /proc/cpuinfo doesn't display any of the standard virtualization flags for either Linux nor ARM.

While you can technically enable KVM in the kernel, the SOC doesn't handle interrupts well. The closest thing to true virtualization you can get is to disable a core on the host, and dedicate it to the "virtual" guest.

0

The Raspberry Pi 2 and 3 do support hardware virtualization via KVM or Xvisor (a type-1 hypervisor) .

Furthermore , Docker is officially supported , even on the RPi1 and Zero. https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/

  • 1
    Small comment on Docker on Raspberry Pi: Raspbian Kernel has no support for AppArmor, user namespace or SECCOMP filtering. Which means Docker is just a "nice to use" chroot environment on Raspbian, but not the chroot on steroids. When AppArmor and user namespace are part of the Kernel, then Docker containers will be better contained than today. It would be even better with SECCOMP filtering, but you need the Kernel support and you need the user space tool, and the one available on Debian Jessie are just too old. So you would probably need to wait for Raspbian 9 for full seccomp support. – Huygens Oct 11 '16 at 11:40

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.