Virtulization on arm64

Hello everyone,

I hope you're doing well. I have a question regarding virtualization on OpenWrt (19/21/22) with the arm64 architecture and A53/A72 processor cores.

I'm interested in exploring virtualization options like qemu/kvm, but I came across an article that mainly focused on x86 architecture. Moreover, the packages mentioned in the article were not available in OpenWrt's package manager.

I would greatly appreciate your help with the following:

  • Can virtualization be performed on OpenWrt (19/21/22) with the arm64 architecture and A53/A72 processor cores?
  • Are there any specific resources or documentation available for this setup?

Thank you so much for your assistance.

Yes, here's the image:

https://downloads.openwrt.org/releases/22.03.5/targets/armvirt/

Virtualization can also be done with Docker/LXC, previously I did it with LXC.

1 Like

yes in theory it is :slightly_smiling_face:, but my problem is still same :confused::

root@pi3b_open:~# cat /etc/os-release 
NAME="OpenWrt"
**VERSION="22.03.5"**
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 22.03.5"
VERSION_ID="22.03.5"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r20134-5f15225c1e"
OPENWRT_BOARD="bcm27xx/bcm2710"
OPENWRT_ARCH="aarch64_cortex-a53"
OPENWRT_TAINTS=""
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 22.03.5 r20134-5f15225c1e"
root@pi3b_open:~# 
root@pi3b_open:~# 
root@pi3b_open:~# opkg list | grep qemu
qemu-ga - 6.2.0-2 - QEMU Guest Agent
root@pi3b_open:~# opkg install kmod-tun qemu-bridge-helper qemu-x86_64-softmmu kmod-kvm-intel
Package kmod-tun (5.10.176-1) installed in root is up to date.
Unknown package 'qemu-bridge-helper'.
Unknown package 'qemu-x86_64-softmmu'.
Unknown package 'kmod-kvm-intel'.
Collected errors:
 *** opkg_install_cmd: Cannot install package qemu-bridge-helper.**
 *** opkg_install_cmd: Cannot install package qemu-x86_64-softmmu.**
 *** opkg_install_cmd: Cannot install package kmod-kvm-intel.**
root@pi3b_open:~# 

thanks, but I need to do this way.

You never stated a problem. :person_shrugging:

  • Ummmmm, is this the host, or VM
  • Have you tried on another hoat OS
  • Your device isn't an x86_64 nor an Intel, why would you expect those virtualization packages to be avaliable for your device?
  • (I wasn't aware host virtualization was available on arm64)

Are you trying to run OpenWrt as a Host - as a VM - or both?

I am interested in running OpenWrt as a virtualization host on my arm64 device, which has a quad-core Cortex-A53 CPU.

I came across the documentation for running OpenWrt as a QEMU host, which can be found at https://openwrt.org/docs/guide-user/virtualization/qemu_host.

However, I encountered difficulties in installing the packages mentioned in the document using the opkg package manager:

root@pi3b_open:~# opkg install kmod-tun qemu-bridge-helper qemu-arm-softmmu
Package kmod-tun (5.10.176-1) installed in root is up to date.
Unknown package 'qemu-bridge-helper'.
Unknown package 'qemu-arm-softmmu'.
Collected errors:
 * opkg_install_cmd: Cannot install package qemu-bridge-helper.
 * opkg_install_cmd: Cannot install package qemu-arm-softmmu.
root@pi3b_open:~# 

I appreciate your attention to this matter, and I would be grateful for any assistance you can provide.

Thank you for your time and consideration.

From what I know there is no qemu package for any target other than x86. If you wanna run qemu on an ARM board so bad, you should better go with Raspbian or Alpine, assume that your board is supported.

1 Like

You can run AARCH64 Debian (like official Raspbian 64bit, DietPi, Armbian) and get the hardware assisted KVM on it.

2 Likes

Is your base OS 64 bit?

Yes, previously I used NanoPi R6S with DietPi + PiMox 7 and then run OpenWrt LXC. I haven't tried KVM but technically 64bit OS has the support and it should work as well.

it is need to be openwrt and yes it is 64 bit.

any command or article or document will be fine..

Wait, I saw from your previous post that you are running on Pi3B? I doubt you have enough resources for KVM virtualization, even a Pi4B 2GB ram isn't recommended, you'd better have at least 4GB ram. In my case the NanoPi R6S has 8GB RAM which is kind of OK.

1 Like