Building a VMware vSphere Virtual Lab with VMware Fusion - Part 4ESXi Fusion vCenter
This is the fourth part in a series of tutorials on how to build a VMware vSphere Virtual Lab on a Mac with VMware Fusion. In this tutorial, we'll add our ESXi hosts to a cluster in vCenter server without putting them into maintenance mode.
In the last tutorial, we deployed the vCenter Server appliance to an ESXi 6.7 VM running on VMware Fusion*. After deploying the appliance, we ran the initial setup and configured everything to the point where we can login to vCenter using the HTML5 client.
If you just want to learn how to create a cluster and add hosts to it without putting them in maintenance mode, you might find the steps in this tutorial helpful. However, since this is part of a series of tutorials, it would be advisable to have read and followed the steps in Part 1, Part 2 and Part 3 before continuing with this tutorial.
After completing the steps in the previous tutorials, you will be at a point where you have:
- Three ESXi 6.7 VMs running on VMware Fusion*.
- The first ESXi VM contains a pfSense firewall VM with built in DNS Resolver.
- The first ESXi VM also contains the vCenter Server Appliance.
- We should be able to access the hosts and vCenter from the Mac using domain names.
- vCenter should be able to resolve ESXi hosts using domain names because it uses the firewall VM as its gateway.
Let’s begin by logging into vCenter Server.
Step 1: Create a new Datacenter
The first thing we need to do is create a Datacenter so that we can add our ESXi hosts and clusters to it.
Right click on the root object which is the FQDN of the vCenter Server we’re logged into, then click New Datacenter…
Give the datacenter a name then click OK.
Step 2: Add the ESXi host containing the vCenter Server Appliance to the datacenter
Right click on the datacenter we just created and click Add Host…
Type in the hostname or IP address of the ESXi host containing the vCenter Server appliance and pfSense firewall, then click NEXT.
Enter the user name and password of the ESXi host then click NEXT.
Click NEXT again.
Assign a license to the ESXi host then click NEXT.
Decide whether to lock down the ESXi host or not. Locking down the host will prevent people accessing the host directly from a web browser. In this example, I’ve kept it disabled because I may still need to access hosts directly. Select Disabled, Normal or Strict then Click NEXT.
For the VM location, choose the datacenter we just created, then click NEXT.
Finally, click FINISH to add the host.
You should now see the host added as a child of the Datacenter object. In the next step, we’ll create a new cluster and move this host to it.
Right click on the Datacenter and click New Cluster….
Step 3: Create a cluster and move ESXi host into
Give the cluster a name then click OK. In this example I’ve called it Cluster01.
Now let’s move the ESXi host into the new cluster. You can do this by clicking on the name of the host and dragging it onto the name of the cluster.
As you can see below, the host and its VMs are now added to the cluster.
You’ll notice that we didn’t need to put the host into maintenance mode when adding it to the cluster.
However, as you’ll see in the next step, if we were to try and add hosts directly to the cluster, it would put them in maintenance mode. We didn’t do this with the first host because it would cause all sorts of problems, since the vCenter appliance is running on it.
Step 4: Add multiple hosts to the vCenter Cluster
In this final step, we’ll add our remaining ESXi hosts to the cluster. Right click on the cluster and click Add Hosts…
Tick the Use the same credentials for all hosts check box and enter the names of the remaining hosts. Also, provide the username and password for the first one in the list and click NEXT.
Tick the checkbox to accept the certificates on the hosts and click OK.
Click FINISH to add the hosts.
The hosts should now be added to the cluster and you’ll notice they are in maintenance mode.
Right click on each host that’s in maintenance mode, click Maintenance Mode then Exit Maintenance Mode.
And that’s it. We should now have three ESXi hosts added to a cluster that in the future can be used to enable features like DRS, HA and vSAN.
After finishing this tutorial, we now have three ESXi hosts running on VMware Fusion* and we can manage them all from one control panel because they are connected to vCenter.
In the next tutorial, we’ll create create some iSCSI port groups and connect a Ubuntu iSCSI target to our hosts. This will allow us to move our VMs to centralized storage and test VMotion and Storage VMotion.
Read Next - Part 5: Create a Ubuntu iSCSI Target and Configure Multipathing
As I’m sure you’re aware, there’s only so much information that can go into a blog post, which is why you might want to check out the book titled Mastering VMware vSphere 6.7* (Marshall, Brown, Fritz, Johnson) to get a more in depth understanding of vSphere.
Written by: Tony Mackay
* GraspingTech participates in various affiliate marketing programs, which means we may earn a small commission at no additional cost to you, should you click on a link to a product and make a purchase.