virtualstudent
Posts: 3
Joined: Sun Jan 27, 2019 11:19 pm

Installing Xen on Raspberry Pi

Sun Jan 27, 2019 11:22 pm

Hi all,

I wish to install Xen hypervisor on my Raspberry Pi 3 on which I'm running Raspbian OS at the moment. I didn't find any proper reference online regarding this. Can anyone help me out with the steps and also an information on whether I should consider running a different OS instead of Raspbian.

Thanks.

fruitoftheloom
Posts: 22701
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Installing Xen on Raspberry Pi

Mon Jan 28, 2019 2:08 am

virtualstudent wrote:
Sun Jan 27, 2019 11:22 pm
Hi all,

I wish to install Xen hypervisor on my Raspberry Pi 3 on which I'm running Raspbian OS at the moment. I didn't find any proper reference online regarding this. Can anyone help me out with the steps and also an information on whether I should consider running a different OS instead of Raspbian.

Thanks.

It does not appear to be supported ?

https://wiki.xenproject.org/wiki/Xen_AR ... Extensions
Rather than negativity think outside the box !

Asus ChromeBox 3 Celeron is my other computer.

virtualstudent
Posts: 3
Joined: Sun Jan 27, 2019 11:19 pm

Re: Installing Xen on Raspberry Pi

Mon Jan 28, 2019 4:56 pm

Xen support is present for ARM Cortex A53 which is present in Raspberry Pi 3 but what I'm looking for is if someone could successfully do it or faced some specific issues. I went browsing on the internet to find if anyone could run Xen either with Raspbian or Ubuntu on Pi but did not come across anything useful and complete in a sense. Any help will be appreciated. Thanks.

fruitoftheloom
Posts: 22701
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Installing Xen on Raspberry Pi

Mon Jan 28, 2019 5:16 pm

virtualstudent wrote:
Mon Jan 28, 2019 4:56 pm
Xen support is present for ARM Cortex A53 which is present in Raspberry Pi 3 but what I'm looking for is if someone could successfully do it or faced some specific issues. I went browsing on the internet to find if anyone could run Xen either with Raspbian or Ubuntu on Pi but did not come across anything useful and complete in a sense. Any help will be appreciated. Thanks.

There is far more than just CPU compatibility, that is a very simplistic motion.
Rather than negativity think outside the box !

Asus ChromeBox 3 Celeron is my other computer.

code_exec
Posts: 273
Joined: Sun Sep 30, 2018 12:25 pm

Re: Installing Xen on Raspberry Pi

Mon Jan 28, 2019 5:56 pm

virtualstudent wrote:
Sun Jan 27, 2019 11:22 pm
Hi all,

I wish to install Xen hypervisor on my Raspberry Pi 3 on which I'm running Raspbian OS at the moment. I didn't find any proper reference online regarding this. Can anyone help me out with the steps and also an information on whether I should consider running a different OS instead of Raspbian.

Thanks.
I'm sure that you can enable Xen on the Pi by recompiling the kernel with Virtualisation and Xen guest support.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

virtualstudent
Posts: 3
Joined: Sun Jan 27, 2019 11:19 pm

Re: Installing Xen on Raspberry Pi

Mon Jan 28, 2019 9:23 pm

Yeah, I'm already trying to compile 64 bit kernel (ARM-v8) on the Pi and give it a try then.

rajagopal
Posts: 1
Joined: Sat Jul 20, 2019 2:41 am

Re: Installing Xen on Raspberry Pi

Sat Jul 20, 2019 2:45 am

Hello virtualstudent,

Were you able to meet with any success running Xen on RPi-3 ?

Thanks.

stewdk
Posts: 2
Joined: Thu Jul 25, 2019 4:25 pm
Location: Grand Rapids, MI, USA

Re: Installing Xen on Raspberry Pi

Thu Jul 25, 2019 4:32 pm

DornerWorks has Xen running on Raspberry Pi 4, which has a GICv2 interrupt controller. See github for build instructions https://github.com/dornerworks/xen-rpi4-builder

Xen does not have a driver for the interrupt controller on RPi3 and earlier.

User avatar
ehem
Posts: 55
Joined: Mon Sep 09, 2019 1:17 am

Re: Installing Xen on Raspberry Pi

Thu Sep 12, 2019 7:53 pm

stewdk wrote:
Thu Jul 25, 2019 4:32 pm
DornerWorks has Xen running on Raspberry Pi 4, which has a GICv2 interrupt controller. See github for build instructions https://github.com/dornerworks/xen-rpi4-builder
Good to know. I'm likely to be trying with a RP4 so knowing it is already out there is valuable.
stewdk wrote:
Thu Jul 25, 2019 4:32 pm
Xen does not have a driver for the interrupt controller on RPi3 and earlier.
[citation needed] I can believe this, but the Xen wiki does mention support for the Cortex-A53. Might the Raspian kernel have virtualization support removed? Generic Debian and Ubuntu kernels include support for running under Xen.

User avatar
ehem
Posts: 55
Joined: Mon Sep 09, 2019 1:17 am

Re: Installing Xen on Raspberry Pi

Fri Oct 04, 2019 6:27 am

So I've now see two potentially viable approaches and am presently quite unsure of which direction to go.

First, there is https://github.com/dornerworks/xen-rpi4-builder which stewdk pointed out. This is some scripting to build a bootable Ubuntu image with Xen for the Raspberry PI 4. Since I'm planning to use a distinct, but related Linux distribution as my base this is a decent starting point. The broken HDMI and 1GB limitation need fixing, plus this looks like they're building the kernel onto the boot area of an SD card so kernel updates are an issue.

Second, there is a UEFI implementation for the RP3 and the issue of RP4 support has already been brought up https://github.com/andreiw/RaspberryPiPkg/issues/130 I like this approach since it means nearly everything can be "off-the-shelf". Difficulty is it may still need adjustments to Xen to work, though these may come out of the former.

Ugh, wavering back and forth about which way to invest time.

stewdk
Posts: 2
Joined: Thu Jul 25, 2019 4:25 pm
Location: Grand Rapids, MI, USA

Re: Installing Xen on Raspberry Pi

Wed Oct 09, 2019 5:27 pm

ehem wrote:
Thu Sep 12, 2019 7:53 pm
stewdk wrote:
Thu Jul 25, 2019 4:32 pm
Xen does not have a driver for the interrupt controller on RPi3 and earlier.
[citation needed] I can believe this, but the Xen wiki does mention support for the Cortex-A53. Might the Raspian kernel have virtualization support removed? Generic Debian and Ubuntu kernels include support for running under Xen.
Here is a list of interrupt controllers that Xen supports:

GICv2 family:
arm,cortex-a15-gic
arm,cortex-a7-gic
arm,gic-400

GICv3 family:
arm,gic-v3

Yes, Xen supports Cortex-A53 paired with one of these interrupt controllers. Unfortunately the Raspberry Pi 3 has Cortex-A53 paired with a brcm,bcm2836-l1-intc per core and brcm,bcm2836-armctrl-ic for peripheral interrupts, which are unsupported in Xen. The bcm2837 (RPi3) dts includes the 2836 dtsi linked below.

https://xenbits.xen.org/gitweb/?p=xen.g ... =HEAD#l160

https://github.com/raspberrypi/linux/bl ... m2836.dtsi

Geetha
Posts: 1
Joined: Tue Jan 21, 2020 3:20 pm

Re: Installing Xen on Raspberry Pi

Wed Feb 19, 2020 3:35 pm

I would like to install Xen on Raspberry pi 4 according to the instructions mentioned in READMe script of below link: https://github.com/dornerworks/xen-rpi4-builder . Will it be sufficient if I only run the shell script(./rpixen.sh) or should I install anything before starting it?

mjb296
Posts: 2
Joined: Wed Apr 15, 2020 9:08 am

Re: Installing Xen on Raspberry Pi

Wed Apr 15, 2020 10:11 am

Hi, has anyone has success with the Dornerworks build? I ran the script and it appeared to work (on the second attempt with a fresh, clean install of Ubuntu). I get a 2Gb image which I copied to an SD card as suggested. I get two partitions, 128M and 1.9G, so the image contains something, but the RPi4 won't boot from it and I can't mount the partitions to see what's in them.

Does anyone have a built, working image they could provide?

mjb296
Posts: 2
Joined: Wed Apr 15, 2020 9:08 am

Re: Installing Xen on Raspberry Pi

Tue Apr 21, 2020 2:25 pm

mjb296 wrote:
Wed Apr 15, 2020 10:11 am
Hi, has anyone has success with the Dornerworks build? I ran the script and it appeared to work (on the second attempt with a fresh, clean install of Ubuntu). I get a 2Gb image which I copied to an SD card as suggested. I get two partitions, 128M and 1.9G, so the image contains something, but the RPi4 won't boot from it and I can't mount the partitions to see what's in them.

Does anyone have a built, working image they could provide?
Just an update: finally got the build working. A "clean" Ubuntu installation isn't quite enough. Several other packages are needed that are not installed by default, including wall, gettext and, most importantly, dosfstools for mkfs.vfat. This doesn't halt the script, but it runs through and creates the disk image without a file system.

Other gotchas: when the Dornerworks notes say it only supports 1Gb system memory, it boots on my Pi with 4 Gb, so hopefully that just means it ignores the extra 3 Gb. However, when it says it doesn't support HDMI, it's serious - it won't even boot unless you unplug your monitor.

The other point to note (which was actually on the Dornerworks GIT issues page when I thought to look) is that the default login is: username: dornerworks, password: dornerworks.

Finally, here's the built image:
https://drive.google.com/file/d/1Y5pBtZ ... sp=sharing

User avatar
ehem
Posts: 55
Joined: Mon Sep 09, 2019 1:17 am

Re: Installing Xen on Raspberry Pi

Fri May 22, 2020 2:18 am

mjb296 wrote:
Tue Apr 21, 2020 2:25 pm
Other gotchas: when the Dornerworks notes say it only supports 1Gb system memory, it boots on my Pi with 4 Gb, so hopefully that just means it ignores the extra 3 Gb. However, when it says it doesn't support HDMI, it's serious - it won't even boot unless you unplug your monitor.
Due to reading an appropriate mailing list some work is being done to get Xen fully operational on Raspberry PI 4s. Initial work is likely to be in Xen 4.14. Right now certain individuals are pushing for it and testing the experimental patches.

In the short term though I suspect using qemu and libvirt may be a workable approach for the RP3 and RP4.

Return to “General discussion”