I wrote a script!

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.

I used POSH-SSH to manage my SSH connections to the VMs and vmxtookit to do the VM power management.

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:

  1. Calls the vmxtoolkit to startup the controller VM.
  2. Open an SSH and pass command to start daemon.
  3. Start the two node VMs.

The Shutdown Script:

  1. SSH  to node VM
  2. Executes shutdown command
  3. Stop node VMs
  4. SSH to controller VM
  5. 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.

Code on GitHub

30 in 30

I’ve always said I’m going to participate in NaNoWriMo, but I inevitably end up not doing that. So rather than try to write a novel this month. I’m going to write blog posts. One a day, about the stuff I’m learning about and doing. This one is sort of cheating, because it counts as #1. Check back tomorrow and each day this month for something new.

This was the lab once it was initially deployed. Looks a little different now, but it looks basically the same

The Creation of the Nexus Lab

After a recent move to the Midwest, I decided that I was going to work on building out a home lab. In order for me to be successful from a consultative perspective, I find it essential.

First, I wanted to get some networking switches. I bought several second hand switches, and a few routers. I also bought a small 15U rack to hold my infrastructure. I’ll talk more about that in a future post.

The next step was to get a Virtual Machine host up and running. My day job allows me access to licensing for some tier-1 hypervisors, so next I needed to get going. Now this wasn’t my first rodeo deploying a hypervisor, but it was my first baremetal install on my own desktop hardware. I’d like to share the successes and the failures that I experienced in my deployment.

My lab hardware:

Asrock Extreme3 z87 motherboard – supports 32GB of RAM and has a 1Gb Intel NIC onboard
Intel i7-4770k
8GB of RAM
Samsung 840 EVO 120GB SSD x2
Seagate Barracuda 2TB HDD x2
Gigabyte Radeon R9 280x GPU

The idea when I designed this PC was for gaming, and I have put it through its paces. However after a RAID mishap, user error, I decided that I would repurpose the machine. When deciding what hypervisor I would use I was checking for the ability to do pci passthrough, so I could still play PC games using my GPU. These days, pretty much every hypervisor supports pci passthrough, so all good there. So I deployed ESX 5.5 on a usb drive. Then I ran into problems…

The importance of the checksum:
So initially when ESX was loading I got an error and I couldn’t get it to install. Ok, rebuild the usb key, failed. Switch flash drive, failed. Get VMware’s md5 file, no match. Ahh, that’s the problem. Redownload the .iso, rebuild the usb, success!

Motherboard compatibility and custom .iso files:
Who knew that networking was required to install ESX, joking aside, turns out my onboard NIC isn’t natively compatible with ESX. So how do I get the linux driver for my NIC up and running? Well as much as I like linux, I’m by no means a guru, so I had to consult the web. In steps Robert Kihlberg and his blog, his post has a link for the .vib for an intel E1000. A .vib is a VMware installation bundle, which is used to create the custom .iso. Create the custom .iso, and then boom, working.

Not all i7’s are created equal:
I mentioned that the reason for my initial build was for gaming, and I tried to go all out. I bought an overclockable processor, which at the time was the top of the line proc. 3.25Ghz native and I had seen this bad boy running smooth at 4.0Ghz. However, as I learned with this deployment, in order to get that sweet sweet performance Intel had to remove some features, one of those being VT-d. So after all the challenges I faced, PCI passthrough isn’t feasible with this hardware, no problem. Just gives me a reason to shop for a new processor.

I had a lot of fun and frustration getting what I have up and running today, but as I was telling a friend technology induced raised blood pressure counts as exercise in my book. I’m happy with my lab as it is today, and I’m going to keep everyone posted on all the things I’m going to do in the future.

Robert Kihlberg’s blog
What’s in a VIB?
Paul Braren’s YouTube ESX 5.5 Datacenter Video
Paul Braren’s post on ESX 5.5 Datacenter

A Fresh Beginning

Hello everybody! I’m on a journey to explore and understand more about technology. I’ll share the best things that I can find, and hopefully we can learn from each other.

I’m passionate about all types of technology. I currently spend most of my time focused on enterprise technology.