For me, this is a big deal. I’ve never been a sysadmin, but I talk with sysadmins all the time. Today I feel like I earned a little bit of street cred. I run a 3PAR simulator on my laptop to show demos to my customers. The simulator runs in 3 VMs that have to be booted in a certain order while passing commands through the shell. Not a big deal, and not really a pain. But suppose I’m in a meeting and the customer asks to see the GUI. Wouldn’t it be simpler to execute a single command, and let everything go on in the background? I think so, so that’s what I set out to do.
Queue learning how to do it. Since this will run off of my laptop, running windows 7, I need something that I can do from windows. Good thing there are some strong PowerShell cmdlets for VMware Workstation and SSH.
So what does this street cred generating script do? Not much really, but it is still so cool! There are actually two scripts, one to start the simulator, and one to shut it down.
The startup script:
- Calls the vmxtoolkit to startup the controller VM.
- Open an SSH and pass command to start daemon.
- Start the two node VMs.
The Shutdown Script:
- SSH to node VM
- Executes shutdown command
- Stop node VMs
- SSH to controller VM
- Pass command to stop daemon and shutdown
Like I said super simple. It doesn’t follow best practices for security. The scripts has passwords in plain text. I had a lot of fun, and got super frustrated at times. There are definitely some things I can do to streamline it, but I thought I’d share my experience and my code.