- How to use VMware vSAN ReadyNode Configurator - Fri, Dec 17 2021
- VMware Tanzu Kubernetes Toolkit version 1.3 new features - Fri, Dec 10 2021
- Disaster recovery strategies for vCenter Server appliance VM - Fri, Nov 26 2021
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.
- 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.
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.
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.
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.
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
right one is the modified lab version.
(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:
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.
I had to create a new firewall rule on my Windows host for port 80.
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).
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
Step 5—Start the VM to see the boot process. You'll quickly see the location of the URL.
The boot process continues to load the ESXi installer as normal.
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.
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.
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.