Building a VMware vSphere Virtual Lab with VMware Fusion - Part 1
Disclosure. This page contains links to products that may earn us a small commission at no extra cost to you, should you click on them and make a purchase.
Read full disclosure.
Learning VMware vSphere, practicing for a certification, testing planned upgrades and demonstrating features are just some of the reasons you might want to build a Virtual Lab. This tutorial will show you how to build one on a MacBook Pro in easy to follow steps.
It would take a huge post to explain how to build a complete Virtual Lab because there are lots of steps involved. For this reason, I’m going to split the task into a series of smaller tutorials, with the first explaining how to prepare your Mac and install ESXi.
Before we begin, let me show you a diagram and describe what we are building.
The diagram is not the clearest, so let me try to explain. First of all, we have a MacBook at the bottom which is running VMware Fusion and has two custom networks (vmnet10 and vmnet11).
The green network (vmnet10) is a private network used for managing ESXi hosts, vCenter Server (vc01), the pfSense firewall (fw01) and the iSCSI storage server (us01).
The red network (vmnet11) is a separate private network which has NAT enabled so that VMs can access the internet through the MacBook. This network will be used to simulate a WAN connection coming into your lab. Traffic on this network will go through the virtual pfSense firewall running on an ESXi machine.
There will be four VMs running on VMware Fusion. These machines simulate what would be physical machines in a production environment. They are the ESXi hosts and the storage servers.
The VMs at the top of the diagram will run on the virtual ESXi hosts. These are the pfSense firewall, vCenter Server and a demo web server. Notice the web server is on a different subnet to the management machines (10.1.2.0), this is because it will be on its own network (DMZ) that is segregated by VLANS. Traffic from the DMZ will need to go through the pfSense firewall.
The diagram also shows two iSCSI networks with different VLANS. The traffic from iSCSI and any other vSphere network traffic will run through the same virtual switch (vmnet10) as the management network and we’ll use VLANS to segregate it. You can think of this switch as being a simulation of a stacked 10 GB physical switch.
Since we’ll be using nested virtualization, we’ll need a modern Mac which has a CPU that supports hardware virtualizaion and at least 16 GB of RAM. You’ll also need to download and install
VMware Fusion* because it allows the hardware assisted virtualization feature of the CPU to be used in a virtual machine.
The following steps have been tested on a 2017 MacBook Pro that has 16 GB of RAM running Mojave and
VMware Fusion 11.5*.
Step 4: Create network adapters and assign to custom networks
If you followed the tutorial in the link of the previous step, you should now have a VM called esxi01 with ESXi 6.7 installed. You will notice that there’s only one network adapter and it won’t be connected to any of the custom VMware Fusion networks we created. We need to add two new Network Adapters to the VM.
Right click on the esxi01 VM and click Settings…
Click Add Device… and then add two new Network Adapters, so there are three like shown in the image below.
Configure the first two so they are connected to the vSphere network.
And the last one so its connected to the WAN.
While you’re in the settings screen, change the memory so that it has 10 GB. We’ll need this much for the first host when deploying the vCenter Server appliance in Part 3 of the series.
Step 5: Modify the ESXi management network
The last step in this tutorial is to configure the management network so that it uses two network adapters for redundancy and the correct IP and DNS configuration.
Login to the ESXi host, navigate to the Configure Management Network screen, then click Network Adpaters.
Assign vmnic0 and vmnic1 then press Enter.
Navigate to the IP configuration screen and make sure the IP address is the same as esxi01 in Figure 1 (10.1.1.11). And make sure the gateway is the same as the IP address of the firewall (10.1.1.251).
Navigate to the DNS configuration screen and for the primary DNS server use the same IP address as the firewall.
Finally, navigate to the Custom DNS suffixes screen and enter your domain name.
That should be it. If everything has been configured correctly, you should be able to view the login page of the ESXi host by entering the FQDN into a browser.
After working through the steps in this first tutorial we are now on our way to building a fully functional vSphere Lab on a MacBook that’s portable. We’ll soon be able to test out some of the best features of vSphere, things like VMotion, Storage VMotion and high availability etc.
Before going onto the next tutorial, I’d like you to repeat all of the steps in this tutorial again for the remaining two ESXi hosts. You should have three hosts in total with the IP addresses and hostnames specified in the diagram pictured in Figure 1.
The next tutorial in the series will show you how to deploy a pfSense VM onto the first ESXi host and configure it so that DNS requests from the management network are resolved by the firewall. This will be required when we come to install the vCenter Server appliance in Part 3.