Virtually Sober

If there is free booze and Virtualization; I'm there!

Silencing my 1U rack mount 10GbE switch in the hyperconverged home lab

Back in June, I decided to take on the fun project of upgrading my hyperconverged home lab to 10GbE using an Ubiquiti ES-16-XG Edge Switch. If you missed it check it out here. I couldn’t be happier with the switch in terms of performance and features, but I had one big problem. I was in denial. I didn’t want to admit it. But yes, I just spent $500+ on something that made my lab too noisy to sit near.

Read more of this post

Automating SQL Server Live Mounts with Rubrik Alta (4.0)

How many times in your career have you tested something that totally blew you away? Your mind racing with use cases both past and present. The first VM you created? Check. Your first vMotion? Check. Your first storage vMotion? Check. But what next? I just found one to add to my list and its SQL Server Live Mounts in Rubrik Alta (4.0). So what exactly is it and why is it so amazing? Glad you asked, read on!

Read more of this post

Creating a vSphere Change Management DB for free – Step 4 of 4

For my final blog post in the 4-part series on how to create a vSphere Change Management Database for free, I’m going to show you how to prune the data. If you missed the first 3 posts check them out here:

Step 1 – Creating the SQL Database
Step 2 – Inserting data into the SQL Database
Step 3 – Querying the SQL Database

Depending on the size of your vSphere environment or your data retention policies you probably don’t want to log vCenter settings indefinitely. Because we designed the database to always contain a RecordID in each table along with a LastUpdated datetime, we can use this to prune the data.

Read more of this post

Creating a vSphere Change Management DB for free – Step 3 of 4

In my previous 2 blog posts I took you through creating a vSphere Change Management Database, how to insert data using PowerCLI, and in this post, I’ll show you some example queries you can run once you have the data. If you missed the first 2 posts check them out here:

Step 1 – Creating the SQL Database
Step 2 – Inserting data into the SQL Database

There are probably hundreds of different things you can derive from the data captured. So here is just a sample of what I’m going to show you:

  • Show all configurations of a VM across all data logged
  • Taking oldest date available and showing all VM configs on that datetime
  • Taking the most recent data available and showing total VM size provisioned and used (useful for Rubrik sizing)
  • Using the oldest and most recent VM used size to calculate the total VM used storage growth % (also useful for Rubrik sizing!)
  • Show all VMDisk and VMNIC configurations for a VM
  • Show all configurations for a VMDK or VMNIC
  • Show all configurations for a Port Group on a host
  • Show all configurations of a Cluster and Host
  • Taking the oldest date available and showing all original Cluster and Host configs
  • Show all current and historical stats for a Datacenter (including cluster, host and VM counts etc)

Read more of this post

Creating a vSphere Change Management DB for free – Step 2 of 4

In the last blog we created a SQL database in which to store data from PowerCLI in order to create a vSphere Change Management Database for free. If you missed it, check it out here:

Step 1 – Creating the SQL Database

In this second post we are now going to insert data into the database and configure it to run on a schedule. To do this we are first going to use a PowerCLI cmdlet with variables to store the vSphere data, then we will use ForEach to insert each row of data into a corresponding SQL table row.

Read more of this post

Creating a vSphere Change Management DB for free – Step 1 of 4

In my last blog post I gave an introduction to Working with SQL Databases using PowerShell. What I’d now like to do is share an example of a cool use case for combining PowerShell, SQL and PowerCLI.

After drinking a few beers (this blog is called virtually sober for a reason!) I started to think about different problems that I could solve by logging information into a SQL database. What info could I pull and store that would be useful to a virtualization admin? Then the answer hit me. Every setting in the vCenter from VMs to port groups, clusters, hosts to datastores! Why? Because the vCenter database only stores the latest setting.

Read more of this post

Working with SQL databases using PowerShell

One of the things I love about PowerShell is the sheer number of use cases you can address. A perfect example is working with SQL databases. If you think you need to wait for a DBA to give you data from a SQL database then you’d be wrong. You can use SELECT queries to pull data directly into PowerShell from any SQL database and not only that, you can also INSERT, UPDATE, DELETE or whatever else you desire, all from the comfort your scripts using invoke-sqlcmd in the Sqlserver PowerShell module. This also means you can now store data from your PowerShell scripts in SQL for long-term reporting, configuration management, you name it.


Read more of this post

REST API changes in Zerto Virtual Replication 5.0 U3

Since my first post back in 2014, many of the example scripts that I’ve shared integrate with Zerto using their bolt-on REST APIs. After 4 years of stability, in 5.0 U3, Zerto changed the requirements of the authorization header to require the content type in addition to the session token as a “security” feature.

Unfortunately, this means that any Zerto script you have downloaded from my blog, customized, or written, needs to be edited to continue working after the upgrade. Without any modification, your REST API calls to Zerto won’t even give you an error, they will just return null. Pretty annoying huh? I’ll be honest in that I was completely livid when I found out. To me, this looks like a pointless change to fix a problem that didn’t exist while creating a heap more by how it is was implemented and communicated.

On top of this, the Zerto API documentation leaves a lot to be desired as it hasn’t even been updated (as of 06/25/17) to reflect the new requirements! But that’s why I’m here to help. So how do you go about fixing your Zerto scripts?

Read more of this post

Automatically detecting Ransomware infections with PowerShell

Back in July 2016, I posted a script which used PowerShell to send an email alert upon detecting a Ransomware infection by continuously comparing a purposefully vulnerable word doc for changes, deletion etc. The script also integrated into Zerto to insert a checkpoint, but what if you don’t have Zerto and you just want to get the email alerts? I’m presenting at Foxwoods Casino with a Rubrik partner this afternoon on Ransomware (the irony of the venue and subject not lost on me) and so I wanted to post a non-vendor integrated example as a free giveaway for everyone attending the presentation and reading the blog. This post will give you just that.

Read more of this post

Bandwidth throttling your home lab and Rubrik replication/archiving

Having your own home lab is one of the best tools you can have to progress your knowledge and career in IT. But, having lots of VMs and hardware can equal a decent load on your home internet connection. This gets even worse when you start using replication and archiving technologies. So how can you stop your home lab from saturating your internet connection, interrupting the family movie night (yes this happened to me), and the plethora of streaming services used in a modern household?

Read more of this post