Building My Orion Lab

So, I normally need to build a Lab for my SolarWinds Orion.  If I’m doing this on my own machine and don’t have the luxury of a Windows Deployment Server (WDS), and I’ve built a custom hard drive for my Windows Servers, then I use a PowerShell script to do this work for me. (Seeing a pattern here?)My script is broken into a few stages.  If you’ve seen my other scripts then, you’ll notice that I’ve used a similar format in the past.  In this one, I really only have two regions: the Variable Definition and the actual work.

First we have the variable definition…

I’ve outlined the things that don’t change – the Virtual Switch Name, the Memory Settings, CPU Count, if I want to Power it on and the Path to the Template Hard Drive.

Then it’s a little more specific to this particular script.  I list out the new VM Names – I’m creating an Orion Main Polling Engine (MPE), an Add’l Polling Engine (APE), two Add’l Web Servers (AWS), and one machine for the FastBit NetFlow Database (NTA).  Collectively, the APE’s and AWS’s are considered Scalability Engines.  If you have a large scale deployment and you aren’t using them, then you definitely should consider them.

I’ve already got a SQL Server, so I’m not building that.

Finally, we setup variables ($i and $iCount) for creating the progress bar.

Now it’s time for the real work of the script.  We need to do the following:

  1. Build the “shell” of the VM with the name, no Hard Drive, Startup Memory, and the Switch.
  2. Update the Processor Count (since we want 2 and not the default 1).
  3. Configure the Dynamic Memory
  4. Copy the Template Hard Drive.
  5. Add this disk to the Virtual Machine
  6. Set the Boot Order of the Machine (Disk first, then NIC)
  7. Finally, if we want to Power On the Machine, do so.

What’s that look like in script form?

And there you have it.  A simple script to build however many machines you want.  There’s an assumption or two with this of course.  I’m assuming that I want all the machines identical (yes), and second that you are installing all the various parts of SolarWinds Orion (for me – yes).  Also, this script does not error trap for hard drives with the same name.

I’m thinking that my next post will involve using differencing disks instead of copies of my template hard drive.

Until next time everyone – Ramble on!

Leave a Comment