Lab Time: Setup with Vagrant on VMware Fusion/Workstation

In this post, I’ll guide you through the seamless deployment of laboratory (lab) environments on VMware Fusion or Workstation using Vagrant. The primary objective is to create a versatile, multi-purpose lab environment ideal for testing cloud-native solutions, prototyping integrations, exploring automation, and refining workflows.

The importance of a Lab

A lab, whether it’s a full-scale environment, a miniaturized version, or a portable setup, holds significant value for infrastructure administrators, platform engineers, and developers. It serves as a crucial space for testing technologies before implementation in a production environment. While a lab is not a direct Proof of Concept (POC), it provides a controlled space for decision-making without impacting operational environments.

For this reason, a good lab should:

  1. go straight to the objective without wasting time with long and interactive installation processes
  2. repeatable, using a good automation level to reproduce, destroy, and rebuild the environments
  3. recoverable, the essential data should be protected in case of deep system corruption
  4. secure, with networking and infrastructure isolation from the production environment to avoid unwanted interactions and guarantee enough protection to work safely with your platform.


Special thanks to the vExpert program and Cohesity for providing the hardware: a fanless mini PC Maxtang NX 6412, equipped with an Intel Elkhart Lake J6412 Processor and 32 GB RAM. This “portable lab” serves various needs and can run on Windows/Linux or as a portable ESXi host. For those curious about setting up ESXi, refer to Vladan’s post here.

So here thanks again to Cohesity and the vExpert program for this gift!

Note: the following “instructions” can be applied also to other systems, like Mac or different mini servers. Just minds to have enough CPU and Memory to run an Intel Virtual Machine with 2vCPU and 8GB RAM.

Getting started!

Following the ingredients:

After installing VMware Workstation or Fusion, the next step is to prepare your environment for automation. Follow these steps:

  1. Install Vagrant Community and Vagrant VMware Utility:
  2. Set Up Git CLI and Visual Studio Code:
  3. Clone the Repository:
    • Use Git CLI to clone the lab setup repository: git clone

Then you’re ready to deploy the first lab.

Automation with Vagrant, Terraform, Ansible, …

One interesting thing behind the automation/configuration management/infrastructure as code tools is the extensive use of the following tools:

  • Drone: an extremely lightweight pipeline tool that, depending on the size in terms of automation tasks can run in Docker, Kubernetes, and GitLab. With a simple YAML and a Docker/Podman instance, it’s possible to easily run pipelines and execute tasks based on containers.
  • Ansible: one of the most famous configuration management systems and automation tools with a huge collection of playbooks and extensions (
  • Terraform: the standard de-facto of Infrastructure as Code, able to deliver infrastructure elements across all clouds and all platforms. In this lab, we’re gonna use the CLI version (free to use and implemented as-is)
  • Other tools: in the next post I’ll use some other tools and platforms… from now I will include Docker, Minikube, and HAProxy

In this lab all of these tools are installed in the following way:

  1. Vagrant installs Ansible in the remote VM (This is to avoid the Vagrant and Ansible local interaction which is not well supported by Windows host systems).
  2. Drone, Terraform, and other utilities are provided by playbook files which are uploaded to the remote VM
  3. Ansible in the remote VM reconciles with the content of the playbook files.

Lab up!

To run this lab just clone the repo and type

to build and start the basic lab.

Congratulations! You’ve successfully set up your laboratory environment. If you have any questions, feedback, or suggestions for improvements, feel free to reach out to me on X (@linotelera).

In the upcoming posts, we’ll delve deeper into this lab, exploring various technologies, automation techniques, and enhancements. If you have specific topics you’d like to see covered, or if you have interesting cases to share, don’t hesitate to get in touch.

Enjoy your lab!

   Send article as PDF   

Un pensiero riguardo “Lab Time: Setup with Vagrant on VMware Fusion/Workstation

I commenti sono chiusi.