Add qemu ARM support for raspberry pi virtualization


Recommended Posts

  • 3 weeks later...
On 2/29/2020 at 7:54 PM, Tjlejeune said:

+1. Would love to be able to run a Android VM, mainly for Tasker 

Use AndroidX86:
https://www.android-x86.org/releases.html
In a normal x86 vm. Arm is not required for this.

@OP - are there any specific limitations that prevent you from running the native x86 versions of those packages or configurations in say, an ArchLinux or Debian VM? I mean, testing rpi images is a fine use case for it. But crosscompiling for ARM is faster on native x86 if you are planning on using it for any sort of dev purposes.

Link to comment
  • 2 weeks later...
On 3/4/2020 at 5:58 PM, Xaero said:

Use AndroidX86:
https://www.android-x86.org/releases.html
In a normal x86 vm. Arm is not required for this.

@OP - are there any specific limitations that prevent you from running the native x86 versions of those packages or configurations in say, an ArchLinux or Debian VM? I mean, testing rpi images is a fine use case for it. But crosscompiling for ARM is faster on native x86 if you are planning on using it for any sort of dev purposes.

For me specifically, I'm looking to do Raspberry Pi central management, development and testing before I send my images off to SD cards.

Link to comment
On 3/4/2020 at 7:03 PM, Tjlejeune said:

Yeah, I've tried Android X86. Unfortunately it ran like crap and some apps don't work well on it

Android running on Emulated ARM hardware would probably run worse, FWIW.
 

 

4 hours ago, jfrancais said:

For me specifically, I'm looking to do Raspberry Pi central management, development and testing before I send my images off to SD cards.

This would be a use case for it then. You could however, set up a PXE boot SD card and store your development/testing images on a PXE server for the PI. This way you aren't constantly writing an SD card and your changes to the image can happen quickly.

  • Like 1
Link to comment
On 3/15/2020 at 3:36 PM, Xaero said:

Android running on Emulated ARM hardware would probably run worse, FWIW.
 

 

This would be a use case for it then. You could however, set up a PXE boot SD card and store your development/testing images on a PXE server for the PI. This way you aren't constantly writing an SD card and your changes to the image can happen quickly.

I still need to develop the image which currently involved the Pi.  Once setup I pull the image and deploy to other Pis.  I'd like to do all that configuration on the PC and deploy from there.

Link to comment
  • 10 months later...

I would like to second/third this request.  ARM64 devices are becoming more popular. Microsoft Windows has an ARM64 edition available, and Apple is now moving to ARM64 as their primary OS platform. QEMU already proves the needed code to emulate the ARM64 platforms on other distributions.  It would be awesome to have the capability included in Unraid as well. 

Link to comment
  • 4 weeks later...
  • 2 weeks later...
  • 4 months later...
  • 2 weeks later...
  • 2 months later...

Looks like this feature has been added to 6.10-rc2, if you have time, upgrade and give some feedback on if this is working for you or not.

 

Quote

Virtualization

Both libvirt and qemu have been updated.  In addition qemu has been compiled with OpenGL support, and [rc2] ARM emulation (experimental).

 

Based on @SpaceInvaderOne's new 6.10-rc2 overview video, you need to manually edit the XML for the arm cpu type to get up and running 

 

  • Like 1
Link to comment
  • 10 months later...

I am looking at the requirements for ARM + Other non intel platforms to add as a PR a new template.

 

Does any one know the main requirements. in another post in the VM section ghost82 has used the following for a pi but not on Unraid.

 

  <os>
    <type arch='armv7l' machine='versatilepb'>hvm</type>
    <kernel>/media/6TB/rasp/kernel-qemu-4.19.50-buster</kernel>
    <cmdline>root=/dev/sda2 rootfstype=ext4 rw</cmdline>
    <dtb>/media/6TB/rasp/versatile-pb-buster.dtb</dtb>
    <boot dev='hd'/>
  </os>
  <cpu mode='custom' match='exact' check='none'>
    <model fallback='forbid'>arm1176</model>
  </cpu>

  <devices>
    <emulator>/usr/bin/qemu-system-arm</emulator>

 

These are other available options and current windows OS options used.

 


<os>
  <type>hvm</type>
  <loader>/usr/lib/xen/boot/hvmloader</loader>
  <kernel>/root/f8-i386-vmlinuz</kernel>
  <initrd>/root/f8-i386-initrd</initrd>
  <cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
  <dtb>/root/ppc.dtb</dtb>
  <acpi>
    <table type='slic'>/path/to/slic.dat</table>
  </acpi>
</os>


  <os>
    <type arch='x86_64' machine='pc-q35-5.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/c_VARS-pure-efi.fd</nvram>
  </os>

 

Does any one have other working examples of arm XMLs

 

Example template.

 

image.png.d18cbdb799a8848a86fbb56cde3fbc01.png

Link to comment
  • 2 months later...
On 10/2/2022 at 2:11 AM, SimonF said:

I am looking at the requirements for ARM + Other non intel platforms to add as a PR a new template.

 

Does any one know the main requirements. in another post in the VM section ghost82 has used the following for a pi but not on Unraid.

 

  <os>
    <type arch='armv7l' machine='versatilepb'>hvm</type>
    <kernel>/media/6TB/rasp/kernel-qemu-4.19.50-buster</kernel>
    <cmdline>root=/dev/sda2 rootfstype=ext4 rw</cmdline>
    <dtb>/media/6TB/rasp/versatile-pb-buster.dtb</dtb>
    <boot dev='hd'/>
  </os>
  <cpu mode='custom' match='exact' check='none'>
    <model fallback='forbid'>arm1176</model>
  </cpu>

  <devices>
    <emulator>/usr/bin/qemu-system-arm</emulator>

 

These are other available options and current windows OS options used.

 


<os>
  <type>hvm</type>
  <loader>/usr/lib/xen/boot/hvmloader</loader>
  <kernel>/root/f8-i386-vmlinuz</kernel>
  <initrd>/root/f8-i386-initrd</initrd>
  <cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
  <dtb>/root/ppc.dtb</dtb>
  <acpi>
    <table type='slic'>/path/to/slic.dat</table>
  </acpi>
</os>


  <os>
    <type arch='x86_64' machine='pc-q35-5.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/c_VARS-pure-efi.fd</nvram>
  </os>

 

Does any one have other working examples of arm XMLs

 

Example template.

 

image.png.d18cbdb799a8848a86fbb56cde3fbc01.png

 

SimonF, How do I get access to these options? I do not see these drop downs available. Running 6.11.5 Stable.

Link to comment
10 hours ago, sasdakota said:

 

SimonF, How do I get access to these options? I do not see these drop downs available. Running 6.11.5 Stable.

These options don't exist in the GUI, current there is only the executables included with the OS.

 

root@computenode:~# ls /usr/bin/qemu*
/usr/bin/qemu-aarch64*     /usr/bin/qemu-i386*    /usr/bin/qemu-nbd*        /usr/bin/qemu-riscv64*         /usr/bin/qemu-system-ppc*      /usr/bin/qemu-x86_64*
/usr/bin/qemu-aarch64_be*  /usr/bin/qemu-img*     /usr/bin/qemu-ppc*        /usr/bin/qemu-storage-daemon*  /usr/bin/qemu-system-riscv32*
/usr/bin/qemu-edid*        /usr/bin/qemu-io*      /usr/bin/qemu-pr-helper*  /usr/bin/qemu-system-aarch64*  /usr/bin/qemu-system-riscv64*
/usr/bin/qemu-ga*          /usr/bin/qemu-keymap*  /usr/bin/qemu-riscv32*    /usr/bin/qemu-system-i386*     /usr/bin/qemu-system-x86_64*

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.