While writing my previous article, I remembered the days when I was only building my first lab. It was a bit tough, you know, as vSphere yet was a black box for me. Those thoughts brought me to the idea of writing this article. The article in which I share my know-how of building a minimalistic lab using… only a PC, switch, and laptop.
I’ve divided this topic into 2 parts as I am unsure whether you guys like long-reads. In this part, I discuss how to build an ESXi environment using PC and ESXi 6.7 U1. The next article addresses creating a lab using PC and VMware Workstation 15 Pro. I hope that both of them will be really handy for you!
More about the scope of this article: What am I going to do here?
As it comes from the article title, today, I take a closer look at building a minimalistic environment. And, since it is just your starting point, you may not be ready yet to invest tons of money and time in the lab. Well, then what about a free setup? The setup that I use today is conditionally free. It is running on ESXi Evaluation since, for my money, 60 days trial period is enough to enjoy vSphere advantages and get used to its quirks.
This article can be handy for guys who have just started with virtualization or work indirectly with it. Let’s say, you are a blogger or a technical writer who has to write about virtualization, but there was no chance yet to have a deep dive into this topic. I know that these guys are often short on resources and do not want to purchase expensive equipment and licenses therefor. Yet, everybody who reads this scribbling has a PC! So, why not use it to build a home lab?
Running a PC-based lab has several drawbacks and limitations. But, there are workarounds that I am happy to share with you here.
Does your hardware support virtualization?
Let’s assume that you have a BIOS-based PC. Here are quick steps to enable CPU virtualization:
1. Reboot your PC and enter BIOS. Here are the common keys to enter BIOS: Del, Ctrl+Alt+Esc, or F2. Note that the next steps may be different for your case, so, take a look at the documentation provided by your motherboard vendor before you start.
2.Go to the processor settings. Just find a submenu called like Processor, Chipset, Advanced CPU Configuration, or Northbridge.
3. Now, you need to enable the processor virtualization technology. It is called Intel Virtualization Technology (Intel VT) or AMD-V, depending on which processor you have.
4. That’s it! Select Save & Exit to save all settings and leave BIOS.
For UEFI-based PCs, you need to look through the motherboard documentation as a way to enable processor virtualization may be different for each case.
Building setup on ESXi 6.7 U1: Things that are good to know
Thanks to Nested Virtualization, building home lab ESXi 6.7 U1 is just as easy as pie. You need just these 4 small things:
1. A PC that fits the minimum ESXi hardware requirements (find more details at https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.esxi.install.doc/GUID-DEB8086A-306B-4239-BF76-E354679202FC.html).
2. At least one CPU that supports virtualization. It should be better on the hardware compatibility list (find out more at https://www.vmware.com/resources/compatibility/search.php?deviceCategory=cpu).
3. Understanding the setup purposes: Estimate the required storage capacity and amount of RAM based on your expectations.
4. A laptop: You need it to connect to ESXi hosts via the web client.
HCL might be a problem. The thing is, there may be some hardware components in your setup that officially do not support ESXi (i.e., due to performance and reliability concerns). Such strict HCL may be a good reason to consider building a virtual setup. It is just cheaper and provides you the room for playing around with configurations.
Today, actually, I’m out of luck as my Realtek network adapter is not on HCL. However, I decided to hook up an external Intel NIC instead of building a virtual setup. I told you at the beginning that I am going to use only my computer, remember? I realize that using an external NIC is a bit of cheating, but I still use my PC anyway! Let’s just hope that you’ll be luckier than me and find your equipment on HCL.
Why did I miss ESXi hardware requirements? Well, I am sure that your hardware fits them. These days, you’ll hardly find a PC with less than 8 GB of RAM, or without a multi-core CPU that supports virtualization technology. So, yes, I do not see any problems to build a home lab using more or less modern PC! Here’s just a small thing before you start: YOU MAY LOSE YOUR DATA since installing the hypervisor involves formatting the disk.
Here’s the configuration of PC used for today’s study.
- Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (CPU);
- Gigabyte Z68X-UD7-B3 (Motherboard);
- 24 Gb (RAM);
- 2 x 1TB (HDD);
- 1 x 1 Gb/s RTL8111E (LAN);
- 1 x 1 Gb/s Intel ® PRO/1000 PT Dual Port Server Adapter(LAN).
I also used here the laptop on Windows 10 (10.0.14393) and a 100 Mb/s switch with the built-in DHCP service as a secondary infrastructure. The hardware configuration of the former does not matter for this study. The latter is used to let the PC and laptop talk to each other.
Let’s discuss the software components of my environment now. For building the lab, you need ESXi 6.7 U1 and VMware vCenter Server Appliance 6.7 U1. They are available once you register at the official VMware website.
Now, let’s look at the whole thing.
It should be noted that the connection between Layer 2 VMs is disabled by default. Well, this is a Nested Virtualization quirk. No worries, there’s a workaround: you need to enable the Promiscuous mode manually on Layer 1in the virtual switch settings. Also, note that you need to assign some resources to vCenter Server in advance to avoid it altering the performance of VMs from Layer 2. Trust me, taking a just a tiny fraction of resources available for both ESXi hosts is the only thing you can do to make sure that everything runs smoothly at the end.
Let’s create the lab!
First, let’s install ESXi on the PC. If you need help with this process, look through this guide: https://docs.vmware.com/en/VMware-vSphere/6.7/vsphere-esxi-67-installation-setup-guide.pdf.
Once you are done with installation, connect to ESXi host via the web interface from the laptop.
Let’s look at configuration of two VMs that will be hosts today:
- 8 x Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (CPU);
- 1 x 8 Gb (RAM);
- 1 x 300 GB (HDD);
- 1 x VMware Paravirtual (SCSI controller);
- 1 x 10 Gb/s (VMXNET 3 LAN).
There’s actually a good reason why I use parameters like that. I have distributed the resources across the Layer 1 VMs. Each VM got 8 vCPUs and 8 GB of RAM. Well, I think it is enough for this study. vCenter Server VM, in its turn, got 2 vCPUs and 10 GB of RAM.
Setting up ESXi hosts
The way you can create ESXi hosts is discussed here. Even though that article is about installing Windows on a VM, I think you’ll still get the principle. Just use ESXi image instead of Windows one. Speaking of the guide itself, I don’t want to re-write the stuff from that article, so I highlight only the key moments below.
First, specify the right OS settings on the host. It just makes working with VMs easier!
The warning below says that I cannot count on VMware support running the configuration like that. Anyway, let’s just ignore that message. I have a gut feeling that everything works out at the end.
Enable the Expose hardware assisted virtualization to the guest OS checkbox; otherwise, you won’t be able to run Layer 2 VMs. If you forgot to tick that checkbox, no worries. You can enable it later in VM settings.
How many vCPUs should you assign to the hosts? Just as many as the New virtual machine wizard allows! In my case, it is kinda a coincidence that the number of sockets matches the number of cores per socket. Who knows, I may need to adjust that number in a while.
Well, I guess that’s it! You need to install ESXi. Again. But, you know how to do that, anyway.
Once you are done with installation, go to the ESXi-Host-0 web interface and jot down ESXi-Host-1 and ESXi-Host-2 IPs. Just a friendly advice: think through IP address distribution beforehand. Automatic DHCP is good (I used it here), but setting up IPs manually may save you a hassle one day.
Installing vCenter Server 6.7 U1
Now, let’s install vCenter Server 6.7 U1 on ESXi-Host-0.
I did not set its IP manually because it will be automatically assigned anyway during DHCP server installation. You can learn vCenter Server IP just in the same way as you do this for VMs.
Find more details about vCenter Server installation here.
Once vCenter Server is successfully installed, log in to it and add hosts.
Now, let’s create VMs! I decided not to go further than 1 VM per-host in this study. Of course, the configuration that I use here allows running more than a single VM, but I just do not want to bother with their creation. The number of VMs that you can spawn in the host depends on the amount of RAM that they use.
Both VMs have the same configuration:
- 2 x Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (CPU);
- 1 x 4 Gb (RAM);
- 1 x 40 GB (HDD);
- 1 x VMware Paravirtual (SCSI controller);
- 1 x 10 Gb/s (VMXNET 3 LAN).
Let’s install the guest OS on both VMs
That’s it, this setup is good to go!
Today, I took a closer look at how you can create a fairly cheap lab using just a PC, laptop, switch, and ESXi 6.7 U1 Evaluate. The setup I described here provides beginners who are on strict budgets with a lab to try out virtualization. Enjoy!