Absolutely delighted to be able to run the ESXi fling for Raspberry Pi. Really cool to see ARM being supported at least for the hypervisor. If some day vCenter would also be available in an ARM flavor it’d be pretty cool.
Not officially supported for actual workloads 😀 It’s certainly possible to run ARM VMs though.
Photon OS is a VMware initiative to create a lightweight Linux based OS with container support. I have to admit my initial reaction to Photon OS was: “y tho?”
It’s a reasonable reaction. There are MANY Linux based OS options out there already and essentially all of them have container support. The reason for creating Photon OS would seem to be that VMware wants their own rubber-stamped Linux OS as part of an ecosystem under their control.
Photon OS’s redeeming feature is the fact that it’s really lightweight. Not as lightweight as Ubuntu Core though. Photon OS for Raspberry Pi weighs in at 512Mb while Ubuntu Core is 450Mb. Still, given the influence of VMware in virtualization and their (our) inroads into IoT / M2M with Pulse, it’s likely that Photon OS will take off eventually.
Currently the main barrier to widespread adoption of Photon OS is a lack of commercial support. At the moment it is simply available as an unsupported download from GitHub (here). This could change in the future though and in that case we may see it being utilized more broadly and also outside the lab environments it is currently inhabiting.
Note that unlike Raspbian, which is 32bit, Photon OS is a 64bit operating system. That too may be something that’ll help float the boat for some.
Getting started with Photon OS on the Raspberry Pi
Deflate the zx compressed image and save to a micro-SD card:
tar xf photon-rpi3-3.0-26156e2.tar.xz
cd rpi3/
sudo dd if=photon-rpi3-3.0-26156e2d.raw of=/dev/mmcblk0 bs=4M;sudo sync
In this example the SD card device is /dev/mmcblk0. This may differ on other systems of course. Please check with “lsblk” or so and please do be careful. Linux / Unix folks don’t refer to dd as “Disk Destroyer” for nothing.
Boot the Raspberry Pi and log in. The default credentials are: root / changeme
DHCP and SSH are both enabled by default and should make it possible to access the Pi across the network if using a wired connection (I haven’t tried though). With a Raspberry Pi it’s likely a wireless connection would be more convenient however. Configuring Wi-Fi is easy and is described in the section that follows.
Photon OS Wi-Fi configuration
There are a few steps to go through for Wi-Fi connectivity but it’s not difficult.
Start the wpa_supplicant service
systemctl start wpa_supplicant@wlan0
Enable the wpa_supplicant service (so it starts with the Pi)
systemctl enable wpa_supplicant@wlan0
Check the service status
systemctl status wpa_supplicant@wlan0
Edit the dhcp settings to get DHCP for wlan0 and not eth0
Photon OS comes in a few different sizes and in the larger ones both Docker and Kubernetes are preinstalled. Not so with the Raspberry Pi version though, so we need to install Docker manually.
Packages are installed with either “yum” or “tdnf”. Docker is available from tdnf so we’ll use that to run the install below.
Refresh the cache but don’t update the packages
We need to refresh the tdnf cache to find the docker package. However, this process can also be used to update all packages. I found that this breaks Wi-Fi. So, if you use Wi-Fi I recommend:
root@photon-rpi3 [ ~ ]# tdnf update
Then select "n" to just refresh the cache without updating any packages.
root@photon-rpi3 [ ~ ]# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
3b4173355427: Pull complete
Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535
Status: Downloaded newer image for hello-world:latest
root@photon-rpi3 [ ~ ]# docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(arm64v8)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
root@photon-rpi3 [ ~ ]#
That’s all! Photon OS is installed, Wi-Fi configured, Docker installed and verified. Ready to rock.