Maksim Samasiuk - Fotolia
Virtual home labs let you explore the complexities of OpenStack cloud, despite the fact that your day job requires you to run production workloads only on vSphere VMs and test and development workloads in Amazon Web Services. You can compare Kubernetes and Docker Swarm in advance of deploying Docker containers on production servers, or prepare for an automation certification test.
Emulating large environments in a home lab can prove difficult and require a fair bit of hardware. Virtualizing the home lab makes sense, and even virtualizing the virtualization layer. There's a degree of trial and error to setting up a virtual home lab that mimics a larger-scale setup. Try these tips for a mostly vendor-agnostic lab that pushes development of modern IT skills.
Open up a virtual world
Start with the two major hypervisors, VMware vSphere and Microsoft Hyper-V, as a foundation. Virtualized hardware is key to a complex home lab, unless lots of hot, noisy and expensive hardware fits your living room decor. VMware vSphere allows the administrator to "nest" a VM inside of another VM, enabling fairly complex production simulations from the comfort of a virtual home lab. Consider using VMware vSphere Hypervisor, a free, bare-metal hypervisor, to virtualize the environment.
Unfortunately, Hyper-V could not run nested Hyper-V in a similar manner until the release of Windows Server 2016 and Hyper-V configuration version 8.0. The workaround, if you don't have the latest version of Windows Server, is to use the vSphere hypervisor to provide nesting capabilities to Hyper-V: Create the Hyper-V nodes as VMware guests and run a cluster of Hyper-V VMs on the vSphere host. The same process will virtualize other systems, such as open source Proxmox and OpenStack.
In a nested configuration, irrespective of hypervisor choice, the administrator must enable access to the underlying CPU. Using the web interface in the full vSphere edition -- see the sidebar -- is simple enough.
CPU access for nested VMs
Select the VM to be the host. Right click and choose to edit the VM; select the CPU tab on the hardware section.
Expand the CPU tab and select "Expose hardware assisted virtualization to the guest OS" and click OK.
At this point you can install the OS. Without the CPU exposed to the guest VM, the OS may fail to install properly, if at all.
Install VMware Tools, a suite of performance and management utilities, if you are nesting Linux or Hyper-V VMs.
We're talking about a home lab here. Nested hypervisors are not supported in pretty much any configuration for production IT workloads, so don't let your creation escape the lab.
Creating a realistic environment within a virtual home lab is important. Mimic a true-to-life scenario better by including test users and layout settings. Rather than manually creating phantom Active Directory (AD) users, groups and other objects, use this script built by Microsoft to create bulk data, or use other scripts for more specific purposes.
To create more specific setups, try the ldifde command in the Windows Server command line to import data. The home lab user can create a spreadsheet with all the desired users, groups and ancillary details, reusing it each time they rebuilt the virtual lab for a different experiment.
In whichever hypervisor platform you choose, work with machine templates and automated deployment for servers in the virtual home lab environment. We are moving rapidly to a world of code-first IT deployments rather than manual efforts. Your skills-development playground should mirror this change.
Desired state configuration is also an important concept for IT professionals to understand and put into action. DSC, alongside other automation technologies, ensures that a server deploys set up according to rules that are defined in code.
To get a job with an advanced IT department or IT-reliant company, you'll likely need strong familiarity with configuration management tools, such as Chef and Puppet. What better use for a test lab than get your automation skills up to date and learn ways to save time at work?
Don't try this at home
On-premises setups prove useful, but it is all too easy to run out of capacity when creating complex home lab environments. Offsite cloud providers can add a temporary bump in capacity for home lab projects.
Use a virtual private network to connect to the cloud provider. Once that's in place, it is easy to spool up those large servers on someone else's hardware.
Do not use a live domain name when you set up Active Directory and the domain name system. Live domains are a hassle if you host multiple items, and present a larger scope for errors. Just use a .local with the domain.
It may sound a bit excessive, but setting up your own internal certificate authority is smart. Do it at the start of setup and not the end.
A lot of applications in today's secure, multi-tier mode world require a properly set up secure socket layer (SSL) certificate authority infrastructure to sign servers and other certificates as required. A proper SSL is especially important for home lab projects that use load balancing.
Small things matter
It's easy to overlook small details during the creation of a large cloud environment. Don't forget AD or Lightweight Directory Access Protocol, DNS and Dynamic Host Configuration Protocol configuration, among other variables.
Include shared storage to make the virtual home lab truly functional for experiments.
A realistic setup also includes multiple networks and ancillary services. Multiple networks and virtual local area networks create more realistic tests and learning. There are plenty of free firewalls, such as pfSense, that can provide this functionality.
While not mandatory, consider creating a log capture server, https server and PXE servers for kickstart installations and other nice-to-have functions, and to ensure there's an email server working. Approval processes and automated workflows make extensive use of email alerts and hyperlinks for management tasks; the virtual home lab should reflect this importance of automated communication.
A home lab for IT is fun, and breaking things comes with the territory. Virtualizing the home lab makes it easier to manage and deploy. When investigating new technologies or problems, remember that there are many ways to achieve the same outcome -- experimentation is key.
Try EVALExperience in your VMware home lab
Learn the costs of building a VMware vSphere home lab
VMware OpenStack 2.5 offers collection of new features
This home lab explores DevOps and some popular tools