ESXi on Raspberry Pi 4

The VMware ESXi Hypervisor is performing pretty well on Raspberry Pi 4 and may be the ideal Solution for you, if you want to run two or more VMs with low Power Consumption.

Before we begin, note a Raspberry is no High End Server, so the Services and VM count it can handle is limited. We recommend to run only simple non-GUI Services in your VMs like Webservers, Home Automation etc. . It’s also not possible to run x86 VMs – You can only run Arm VMs.

Important Hint: The SD Card is only needed to run the UEFI Bios. You need at least 2 USB Sticks: VMs have to be installed onto an USB Stick or other USB Storage. The ESXi OS needs an own USB Stick.

Advertisements

Hardware Requirements

*Amazon Affiliate Link

Software Requirements:

  • Raspberry Pi OS lite (Download)
  • Official Raspberry Pi Firmware (Download)
  • Raspberry Pi 4 UEFI Firmware (Download the latest Version from here)
  • ESXi ISO (Download from here – You may need to register a free vmWare Account)
  • Optional: A Guest VM ISO like Ubuntu Server for Arm (Download)
  • Optional: Balena Etcher to flash your SD Card (Download)

Preparation

Firmware Upgrade

We need to update our Raspberry to the latest Firmware first. This could be easily done with Raspberry OS. Flash Raspberry OS lite to the SD Card with i.e. BalenaEtcher and boot your Raspberry with it.

Etcher RaspiOS Image flashing

Connect your Raspberry by wire to the Network and power it on. After your Raspberry was booted, logon with Username: pi and Password: raspberry .

Update the OS by typing:

sudo apt-get update
sudo apt-get upgrade

Reboot the Raspberry if displayed.

Now we’ll flash the firmware by entering:

sudo rpi-eeprom-update -a

Wait until the Firmware Update is complete – Power Down your Raspberry and remove the SD Card.

UEFI BIOS Installation

Format the Raspberry Pi OS SD-Card we used before to Partition Type “MBR” and Filesystem “MSDOS” / “FAT32”.

  • Extract all content of the Firmware Downloads boot Folder (firmware-master.zip) to the SD-Card except “Kernel*” Files.
  • Extract the UEFI Files (RPi4_UEFI_Firmware_version.zip) onto the SD-Card afterwards and overwrite files..

You can put the SD Card back into the Raspberry now.

USB Installer Preparation

We will prepare 2 USB Sticks now:

  • Installation Source Stick (contains ESXi ISO)
  • Installation OS Destination Stick (will contain the ESXi Installation)

Use balena Etcher once again to prepare the Installation Stick with the ESXi ISO.

Also delete the second (OS Destination) Stick. Put both USB Sticks into the Pi and press [ESC] while booting to get into the BIOS. Remove the 3 GB RAM Limit and boot from the Installer afterwards.

Boot from the Installation Stick and install ESXi onto your Destination Stick. Reboot the System without the Installer Stick. After the System is booted, put the Datastore Stick into your Raspberry. You can now logon to your fresh installed ESXi with your favorite Webbrowser.

USB Datastore

You’ll need to enable SSH first, to use an USB Device as Datastore. You can do this from the Web UI, Menu “Manage>Services. Start the Service “TSM-SSH”.

SSH into the ESXi Server and disable the USBArbitrator Service:

/etc/init.d/usbarbitrator stop
chkconfig usbarbitrator off

Go to the Disks folder and list all available Disks

cd /dev/disks/
ls -l

Usually, the first Device is our ESXi OS Installation (mpx.vmhba32:C0:T0:L0) and the second Disk is our empty USB Stick (mpx.vmhba34:C0:T0:L0)

mpx.vmhba32:C0:T0:L0
mpx.vmhba32:C0:T0:L0:1
mpx.vmhba32:C0:T0:L0:5
mpx.vmhba32:C0:T0:L0:6
mpx.vmhba32:C0:T0:L0:7
mpx.vmhba34:C0:T0:L0
mpx.vmhba34:C0:T0:L0:1

We create a GPT Partition Table onto our Datastore Disk (Stick) by typing:

partedUtil mklabel /dev/disks/mpx.vmhba34\:C0\:T0\:L0 gpt

Now go back into your ESXi Web UI and partition the new Device as Datastore in Menu “Storage>Devices”. The ESXi is now ready to use.

Optional Configuration

the next Steps are optional but highly recommended.

NTP Time Synchronization

Login to your ESXi Webfrontend. Go to “Host>Manage” Tab “System>Time & date”. Enable the NTP client to “Start and stop with host”. Add your local NTP Servers separated by “,”.

Go to Tab “Services” and start the Service “ntpd” afterwards to update the Time without rebooting your Hypervisor.

Hostname, DNS, Domain and static IP-Address

Go to Menu “Networking>Default TCP/IP Stacks” and select “Default TCP/IP Stack” to change your Hostname, Domain and DNS Settings.

Switch to Menu “Networking>VMkernel NICs” and edit the IP-Address Settings for Device “vmk0”. Please note – the Host (Web UI) will instant be no longer reachable under the old IP if you apply the Setting. You’ll find the Web UI under the new IP-Address afterwards.

Licensing

You can activate your ESXi for free by creating an Account at vmWare – Just follow this link and activate an ESXi 7 to get a License Key:

https://customerconnect.vmware.com/en/group/vmware/evalcenter?p=free-esxi7

Enter your License Key at the ESXi Menu “Manage>Licensing”.