How to Build a VMware Homelab – Step-By-Step Tutorial Series: 1. Introduction

03. September 2022 Homelab, NSX, SDDC, vSphere 0
How to Build a VMware Homelab – Step-By-Step Tutorial Series:  1. Introduction

Having a VMware homelab is key to learning products like vSphere and NSX. In previous blog posts and videos on YouTube, I provided partial walkthroughs of my nested VMware Homelab environment running vSphere and NSX. I realize these do not fully explain how to build and configure everything, and there are some inconsistencies. I’m going to wipe my entire homelab and rebuild it step-by-step and I will try to cover everything in 10 blogposts and 10 YouTube videos. Consider this an ultimate beginner’s tutorial on setting up a fully nested VMware homelab. These blogposts and videos are targeted at people new to VMware vSphere or NSX, so I will try to explain everything fully, and as simple as possible.

What is nested virtualization?

We are going to start the rebuild of my nested VMware homelab. Before we dive in, I want to explain what it means to run a “nested” homelab. In other words, what is “nested virtualization”? If you’re already familiar with the concept of nested virtualization, feel free to skip ahead.

Nested virtualization means nesting the ESXi hypervisor in a Virtual Machine that runs on a physical ESXi hypervisor. So we’re nesting, or layering two hypervisors on top of each other. This can be a bit confusing, and the concept is also referred to as “inception”, after the fantastic Christopher Nolan movie where layers of dreams are stacked on top of each other.

Maybe a small drawing will help clear things up:

  • So we have a physical server that runs the ESXi hypervisor (the grey box)
  • We install one or more Virtual Machines that also run the ESXi hypervisor (the green boxes)
  • On that hypervisor we create another layer of Virtual Machines that run our Guest OS’s. (the blue boxes)

The major benefit of nested virtualization for me is the space and energy efficiency of just using a single physical server. I did not want to run multiple servers at home. The low noise level is also a big plus for me. Finally, running a virtual ESXi server also brings a ton of flexibility. When vSAN was introduced for example, many homelab enthusiasts had to go out to upgrade their VMware homelab network gear to 10Gbit, and buy new NICs for their physical ESXi servers. With nested ESXi servers, most network traffic stays within the physical box so you can use virtual 10Gbit NICs. vSAN traffic never ever hits my physical network and is simply forwarded on my virtual switch … in memory! Only traffic going from my VMware homelab to my home network and to the internet traverses my physical network. Everything else is handled in memory inside my physical server.

Of course there is the downside of the added complexity, because setting up nested virtualization does require some specific configuration settings. And you need a pretty beefy server to run all these nested ESXi servers on a single machine.

So, this is my physical server that hosts my VMware homelab. It’s a space-efficient, compact design so I can easily store it in my home office. It has Intel® Xeon® processor D-1541 SoC (System on a Chip) 8 core CPU and 128GB RAM. I also installed a NVME flash drive and a SATA SSD. It also hosts 2 10Gbit NICs and a IPMI interface for remote management.

I’m still booting my homelab using USB. It’s good to know that booting from USB should be avoided when possible due to the increased number of writes to the filesystem with recent versions of ESXi Check out https://kb.vmware.com/s/article/85685 for more guidance from VMware. I already had one USB drive fail on me. It would be best to migrate to a SATADOM device for example …. but I don’t have that available right now. Alternatively, I can also install ESXi on the NVME drive and use the remaining capacity as a VMFS datastore.

How to Create an ESXi installation USBdrive on macOS

Let’s create the USB boot device. There are multiple ways to approach this but let’s start with downloading the ISO. If you’re a VMware customer or partner you logon to Customer Connect. If you’re a vExpert (like me) the vExpert Portal is also a good location to download the ISO.

If you’re running a Windows workstation, something like RUFUS would probably be easiest. I’m running macOS so I will fire up my terminal to create the USB disk without using any 3rd party tools:

First plug in your USB drive into your Mac

  1. Open Terminal and list your mounted disks using diskutil list. Make a (mental) note of the disk #. In my case it’s #4

2. Now we’ll reformat the USB drive in FAT32 using diskutil eraseDisk MS-DOS “ESXI70” MBR disk4. Ensure you are using the correct drive number!

3. Next, we need to unmount the USB drive with diskutil unmountDisk /dev/disk4

4. To make the USB drive bootable we need to use fdisk in interactive mode and make the correct volume active and bootable using sudo fdisk -e /dev/disk4. Type f 1 and confirm with write. Type exit to quit

5. Now mount the ISO file you downloaded and copy everything over to the new USB drive. You can use Finder or the Terminal to do this

6. We’re almost finished but we need to make one final change. Rename ISOLINUX.CFG to SYSLINUX.CFG and edit the file using ‘vi’ or ‘TextEdit’ if you prefer a GUI. For vi simply type ‘vi SYSLINUX.CFG’ and go to this line that says APPEND -c boot.cfg and add -p 1 at the end. Save your changes and quit vi using :wq!

Now it’s time to boot the SuperMicro server. Plug in the USB drive in one of the USB drives. I don’t have a monitor and keyboard connected so I need to use the IPMI interface to press F11 during the boot process to select the USB drive as a boot device. Now we have the option of simply plugging in another USB drive to which we can install ESXi 7.0, or install it directly to one of my SSD drives.

Stay tuned for the next part of this tutorial!


Leave a Reply