With ESXi 7.0 Update 2, VMware has introduced a new way to boot the ESXi installer by using native UEFI HTTP. What is it? It is a way to boot the ESXi installer over the network but without setting up the whole PXE infrastructure (PXE server, TFTP, and DHCP).
Avatar

You can use this setup on bare metal to install production servers and avoiding setting up PXE, or you can use it in the lab to prepare some proof of concept (POC) work with nested ESXi hypervisors.

For users with existing PXE, there is no need to change anything. They can still use PXE to boot their ESXi. An HTTP boot of ESXi is just another alternative to booting ESXi over the network.

In this post, we'll detail the step-by-step procedure to boot your ESXi 7.0 Update 2 installer over the network by using VirtualEFI. You'll see that there is not much we need. All we need is a web server and configuring some advanced VM parameters.

Requirements

  • An ESXi host supporting UEFI firmware with HTTP support (for the purpose of this post, we'll be booting virtual ESXi)
  • ESXi installer ISO with ESXi 7.0 U2 or later
  • (Optional) Installation script (kickstart file) – This option is for automated installation of ESXi.

Steps

Step 1—Extract the ESXi Installer ISO that you downloaded from VMware and copy the entire file structure and all the files to a subdirectory on your web server.

In our case, we are using a small, simple, lightweight HTTP server called Abyss Web Server (but any web server can be used). We copy all the files to c:\web\esxi directory on the disk.

Note: The default website (the web server root directory) under this setup is configured to c:\web\htdocs, so when you test, you'll see the "index.html" page there. Simply create a subdirectory and copy the extracted ESXi 7.0 Update 2 files from the ISO.

Default web server root directory

Default web server root directory

Step 2—From the ISO you just extracted, copy the efi/boot/bootx64.efi file to a directory on your HTTP server, and rename the file to mboot.efi.

In our case, we placed the file in an ESXi directory.

Rename the bootx64.efi to mboot.efi and place it in this directory

Rename the bootx64.efi to mboot.efi and place it in this directory

Step 3—Open the efi/boot/boot.cfg file and modify some content. You'll need to add the following line with the URL of the newly created directory.

prefix=http://192.168.1.7/esxi

The filenames in the kernel= and modules= lines begin with a forward slash (/) character. Delete that character. Delete all the other forward slash characters as well.

If the kernelopt= line contains the string cdromBoot, remove only the string. You can see my file, where the
left one is the original
and the
right one is the modified lab version.

Modify the boot.cfg file

Modify the boot.cfg file

(Optional step) For a scripted installation, in the boot.cfg file, add the kernelopt option to the line after the kernel command and specify the location of the installation script.

For example, we could do something like this:

kernelopt=ks=http://www.example.com/esxi_ksFiles/ks.cfg

We won't go into the details of the specification options available in the kickstart file in this post.

Note: UEFI HTTP supports booting multiple versions of the ESXi installer. You use the same mboot.efi initial boot loader for all target machines but different boot.cfg files depending on the target machine's MAC address.

Step 4—Make sure that your web server is accessible and that you don't have your firewall in the middle. You can test it by connecting to your web server and trying to show or download some files.

Test whether you can access your web server and the subdirectory

Test whether you can access your web server and the subdirectory

I had to create a new firewall rule on my Windows host for port 80.

Create a firewall rule for your environment

Create a firewall rule for your environment

Step 5—As I said at the beginning of the article, you can boot virtual or physical ESXi hosts. In my case, I did not have a physical ESXi host to test it, so I created a new virtual machine based on the latest virtual hardware 19 and added two advanced configuration settings.

I'm not using the vCenter Server in this example, but if you have a vCenter Server, you can certainly use the vSphere client and not the ESXi host client.

Open your ESXi host client and create a new virtual machine (VM).

Create a new virtual machine based on a template for ESXi 7.0 or later

Create a new virtual machine based on a template for ESXi 7.0 or later

As you can see, the exclamation mark from VMware says that nested virtualization workloads are not supported. This is perfectly fine, as we only use it for demos and POCs.

Add those two advanced configuration parameters to the configuration.

Select the VM. Then select Edit > VM options tab > Advanced > Edit Configuration.

Add these two advanced keys and their values (the left is the key, and the right is the value):

  • networkBootProtocol - httpv4
  • networkBootUri - http://192.168.1.7/esxi/efi/boot/bootx64.efi
Add two advanced configuration parameters

Add two advanced configuration parameters

Step 5—Start the VM to see the boot process. You'll quickly see the location of the URL.

See the path of the ESXi bootloader quickly

See the path of the ESXi bootloader quickly

The boot process continues to load the ESXi installer as normal.

ESXi 07.0.2 loads the installer over HTTP

ESXi 07.0.2 loads the installer over HTTP

Note from VMware:

Newer versions of mboot.efi can generally boot older versions of ESXi, but older versions of mboot.efi might be unable to boot newer versions of ESXi. If you plan to configure different hosts to boot different versions of the ESXi installer, use the mboot.efi from the newest version.

This gives you flexibility about ESXi versions, but there is still the requirement of using ESXi 7.0 U2 at a minimum.

The last screen is the standard ESXi installation screen via its interactive installer.

The ESXi 7.0.2 Installer waiting for input

The ESXi 7.0.2 Installer waiting for input

You can use IPv6, but in this case you can't use IPv4. And you can't use both—it is one or the other.

You have the option to automate the rest of the installation via a kickstart file if you wish, but it is outside of the scope of this article. Have a look at the VMware documentation, where it is explained as an optional step 6 out of the whole procedure.

Final words

The possibility of booting the ESXi installation via HTTP and EFI is new in vSphere 7. Previously, you had to set up a PXE server, TFTP, and DHCP. You can use it for a bare metal setup of ESXi, where you'll have to go into the BIOS/UEFI of the host and configure the URL.

For labs or POCs, this is a very light alternative to the traditional PXE infrastructure. For someone who does not have the PXE infrastructure already created, the VirtualEFI and HTTP boot is a simpler method.

Subscribe to 4sysops newsletter!

Additionally, if you have a vCenter Server, you can simply create a clone of this ESXi VM before starting the installation process. Scripted installation is also an option when you want to automatize the installation.

avatar
1 Comment
  1. Avatar
    Nathan Smith 2 years ago

    This is very cool. Leaves open an option for booting from a raspberry pi running a web server.

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account