We have a product with three (3) components and I am trying to figure out a good way to set up an environment for local development and testing.

Our components are:

  1. A "Gateway" per customer that runs on CentOS in a VMware VM running in vSphere.
  2. Many "Agents" per customer that run on Windows and sends data to the Gateway.
  3. A single remote SaaS that many Gateways send their data too.

For this question I am mostly concerned about setting up and running #1 and #2 in a local environment for programmers who use Macs during development.

What comes to mind is to use Vagrant to create a Windows VM to install an Agent on, and then separately run Docker Desktop for Mac to run CentOS in a Docker container to install a Gateway.

However, that feels very complex. I am wondering if it can be done more simply and/or done with a single tool. I have read this from Mitchell Hashimoto about Vagrant which implies it can do both, but if so I am unclear how to do it.

Basically I am looking for a list of the available options for this use-case, and ideally a detailed "how-to" for each, but minimally a high-level how-to for each.

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Oct 9 at 7:55

https://www.parallels.com/ (commercial) is a good way to run Windows desktops on the Mac. Everything else I've seen so far is a bit painful to use. In particular getting legal Windows images that are not limited in some way doesn't seem to be easy.

If you are running Parallels anyway, having another CentOS VM in it (and not in VMware/vSphere) is the obvious next move.

Running Docker in a Linux VM (because that's what you need on the Mac, and that's what all Docker flavours on the Mac do in one or other) and then running the CentOS inside Docker seems unnecessarily complicated, in particular if you are not using Docker images in the first place.

Vagrant is more for scripting some kind of VM setup. It doesn't solve the problem that first you have to pick some good way to run Windows VMs on your Mac. So that's the choice everything else depends on.

If your primary goal is to script it, in particular to version control how you set up the virtual images, because you don't want to set up a particular image and then update your software on it, but you want to build it from scratch each time, or at least repeat that process when necessary, then yes, vagrant looks like a good solution for that.

Yes, a single Vagrantfile can describe multiple machines.

I have not used Vagrant with Windows, but the docs says it access windows over WinRM, so I'd assume any VM system with network set up in the base image would do.

If you want to also script starting up the system with multiple VMs, then Parallels Enterprise comes with a CLI, but I have not used that.

Alternatively, virtualbox should be easily scriptable, and is free, but then you need some source of unlocked Windows base images. Maybe someone else has an idea how to get those (I'd be interested in those, too).

I have not looked into scripting on VMware, possibly it works there, too.

  • Thanks for answering. Let me clarify my goals: First and foremost is to be able to script this so we can version control it, have other people use it, and onboard new people quickly with it. Without scripting, it's a moot point. That said, it seems your recommendation would then be use Parallels and script it with Vagrant using two VMs? Do I understand that correctly? If I understand correctly, do you know if it is possible to create two VMs in one Vagrantfile? BTW, I have Parallels, VMware Fusion VirtualBox and Vagrant all installed on my Mac so I can try any combination. Oct 9 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.