There are actually a number of ways to boot and install the ESXi-Arm Fling, but the easiest method is already outlined in the official ESXi-Arm Raspberry Pi (rPI) documentation and the PDF can be downloaded from the Fling website. As a quick refresher, you only need to have two storage devices.
- SD Card - Used to store the rPI UEFI files which is required to boot ESXi-Arm Installer
- ESXi-Arm can not run on SD Card and for these reasons, you do not need a large capacity SD Card
- USB Device - Contains ESXi-Arm Installer / Installation
- After the ESXi-Arm installer boots, you can actually re-use the exact same USB device for the installation of ESXi-Arm itself. A separate USB device is not required unless that is your goal or if the capacity is not enough for running VMs
The boot process after the ESXi-Arm installation is that the UEFI firmware will first load on the rPI and then it will boot up the ESXi-Arm from the USB device. As mentioned, there are other variations but this is the most basic option. The other nice behavior is that if you need to re-install ESXi-Arm, you simply create a bootable USB device with the ESXi-Arm installer and then install that right on the same USB device without having to mess with UEFI image. This also allows you to perform scripted installation also known as Kickstart, which is something I will be covering in the future that takes UEFI image into consideration.
I have seen a few questions asked whether it is possible to have everything run off of the SD Card and/or USB Device and the answer is yes to certain degree.
- It is possible to put the ESXi-Arm installer + UEFI on SD Card but ESXi-Arm will NOT be able to use it as installation media, so there is not a whole ton of value there.
- It is possible to have both the UEFI image and ESXi Installation on the same USB device, especially if you do not have spare SD Cards which apparently has come up a few times
In this blog post, I will outline the instructions for booting an installed ESXi-Arm installation completely off of the USB device without the needing an SD Card containing the UEFI image.
Step 1 - Download and install the Raspberry Pi Imager Tool for your OS. We first need to install Raspberry Pi (rPI) OS onto our SD Card so that we can change the default boot order to 0xf241 which will try Network Boot, USB and then SD Card and then reboot to go through the boot order again. Power up the rPI with SD Card plugged in and open up a terminal and run the following command to apply latest EEPROM and update the boot order, which is only available when using the command-line.
PI_EEPROM_VERSION=pieeprom-2020-09-03
wget https://github.com/raspberrypi/rpi-eeprom/raw/master/firmware/beta/${PI_EEPROM_VERSION}.bin
sudo rpi-eeprom-config ${PI_EEPROM_VERSION}.bin > bootconf.txt
sed -i 's/BOOT_ORDER=.*/BOOT_ORDER=0xf241/g' bootconf.txt
sudo rpi-eeprom-config --out ${PI_EEPROM_VERSION}-netboot.bin --config bootconf.txt ${PI_EEPROM_VERSION}.bin
sudo rpi-eeprom-update -d -f ./${PI_EEPROM_VERSION}-netboot.bin
Step 2 - Follow the Section 3.2 of the rPI ESXi-Arm Fling documentation in preparing an SD Card with the UEFI Image, as this is still needed initially and section 4 for installing ESXi-Arm on USB device.
Step 3 - Reboot the rPI and when the logo appears, hit ESC and navigate to the Boot Manager->Boot Options->Delete Boot Options and select all boxes except for the USB device which contains the ESXi-Arm installation and then hit F10 to save the changes and exit for normal boot up.
Step 4 - Let ESXi-Arm continue to boot and after it is up and running. Unplug the SD Card and plug that into your local computer
Step 5 - Create a folder on your desktop called "uefi" and copy the contents from the SD Card to this folder.
Step 6 - Zip up the contents of the "uefi" folder and not the folder itself. On a Mac, this can be done by change into the folder and running the following command from within the folder itself and name it uefi.zip:
zip -r ../uefi.zip *
Step 7 - SCP the uefi.zip file to your ESXi-Arm host (you will need to enable SSH if it is not already enabled)
Step 8 - Make a note of the USB device that contains ESXi-Arm Installation, easiest way is to run the following command:
vdq -q
and you will be looking for a device that starts with mpx.vmhba*. If have more than one, it is most likely the lowest numbered vmhba device and make a note of it as you will need it in next step.
Step 9 - Run the following command which will unzip our uefi.zip file into temp directory under /tmp/uefi and then we will be using mcopy utility to copy all UEFI files to the first partition of our ESXi-Arm installation:
mkdir -p /tmp/uefi
unzip uefi.zip -d /tmp/uefi/
mcopy -i "/dev/disks/mpx.vmhba32:C0:T0:L0:1" -vs /tmp/uefi/* ::/
At this point, we now have all the UEFI files within the boot partition of ESXi-Arm and you can now reboot and everything should come back up without needed the SD Card. If you need to reinstall ESXi-Arm for whatever reason, the UEFI files will be removed as the process of installation will reformat the entire USB device.
In a future blog post, I will cover a more automated solution that can scale out without worrying about the manual operations for future deployments and/or reinstallation. In fact, this experimentation was mainly a validation and precursor to having a more scalable method of deploying new ESXi-Arm versions on rPI without having to create bootable image and manually going through the installation.
Alan says
Hi, how can we boot rpi4 esxi from network like nfs or iscsi? I don't mind to have uefi on ad card.
William Lam says
Stay tuned, that'll be a follow-up article to describe the entire setup including managing the UEFI aspect, because simply "booting" isn't enough or you'll run into same issue post-installation
Gregory Thompson says
Williams, this is a great article; I installed ESXi 7 ARM on my Raspberry Pi 4 however when I create VM's I am not able to boot the ISO to install the software. I can change the firmware from EFI to BIOS but it defaults back to EFI and want to boot from PXE Network. What am I missing?
Gregory Thompson says
Willam, I ensure that I am able to change the VM Options from EFI to BIOS but as soon as I power on the VM to boot from the ISO it changes back to EFI attempting to Start PXE over IPv4 or IPv6. Finally I did go ahead and change the ESXi Host Arm BIOS to Delete the ALL options installed of the SD Card booting ESXi.
William Lam says
Sounds strange. Would you mind posting this on ESXi-Arm Fling Discussion where Engineers are watching https://flings.vmware.com/esxi-arm-edition
It would help to describe your setup a bit more, what GuestOS are you using, is this happening just for this OS or for others? More details that you can share on the Fling discussion will be helpful
tutugreen says
Wow, thanks for your work!!!!!
The whole process of trying this is very exciting.
I got some problem when booting (after copy uefi files), it says "unable to read partition as FAT", with some search, I found RaspberryPi 4 (maybe only new bootloader?) needs FAT32 instead of FAT16 for partition 0.
So I backup all the files in partition 0, format to FAT32 and copy them back, it works.
I also found out, I can do the same thing on an SD card with a USB card reader (temporary) when all things are applied, the ESXi can boot directly from the SD card (without USB).
With a little problem, no storage from the sd card can use (no device & datastore), and the setting will be lost after reboot (like a pxe stateless).
Maybe someday VMware adds support for card readers 🙂
REDACTED says
Thanks for all the work you do AND sharing the knowledge to enable others to succeed in their pursuits within various technical domains. I am following these instructions to test my driver for the ssd1306 on the latest arm-filing build. It sure was difficult without the vmkapi or whatever you people (not meant like that, editorial PC for inclusion of diversity) call it. We are a VMware Partner and I'm all over the code site but no luck. I guess I should call our Rep?
William Lam says
Thanks for the comment. We currently do not have an SDK for partners to build drivers for ESXi-Arm as it is still currently a Fling.