That… Could Be A Problem…

17Jan/170

Upgrading the Home Lab

Home labs are always a hotly contested topic. Do you need one, do you not? Can you host it or should it be physical? Can you make do with hand-me down gear or should you buy new? Will it stay powered on or only powered on for lab work? And this goes on and on until you’re absolutely tired of thinking about it.

In my case, I’ve had a home lab for around 4 or 5 years now. I went the new physical route. I found a Dell tower (T110) with a Xeon processor and 16GB RAM for pretty cheap and made it work. It was good enough for multiple VCAPs, a bunch of blog posts, and enough learning to earn a couple new social designations.

However, slowly over the years, my home lab was being shutdown less and less. There were things now running in it which had an uptime requirement (mostly self-imposed) and that 16GB of RAM was almost always over-subscribed.

This all means that it was time for a home lab upgrade! There were lots of characteristics to take into account such as the lab’s footprint, cooling, power, connectivity, noise, and so forth. After a couple months battling back and forth between the new Intel NUCs and SuperMicro Xeon-D systems, I ended up going the SuperMicro route. I also decided to go with the rackmount option. The rackmount cases have slightly less depth than most closet shelves and plenty of space to adding in a bunch of extra drives or PCIe devices.

Next was choosing the board. This offers its own complexity because the X10SDV boards have gained popularity over the years and there’s a bunch of different combinations. I ended up landing on the board with the Intel Xeon D-1528 processor. It has 6 cores (12 threads), goes up to 128GB RAM, and only requires 35W of power. I also skipped the sticker shock of going straight to 128GB right away and went with 64GB.

The Build

Primary Components:
SuperMicro CSE-505-203B Case - LINK
Intel X10SDV-6C+-TLN4f Motherboard - LINK
Samsung 32GB DDR4 RAM x 2 - LINK

Accessories:
I/O Shield - LINK
40x28mm fan x 2 - LINK
Fan Hold x 2 - LINK
Hard Drive Retention Bracket - LINK

As the links indicate, I used WiredZone for the purchase. They’re an authorized reseller and had everything in stock. I would definitely order from them again.

Assembly

Couple days later the parts started arriving and it was time for assembly! This was a little more frustrating than I anticipated. Pain points were the power connection and the fans.

The power problem was due to the case PSU including a 20-pin connection while the motherboard had a 24-pin power connection. I had read a couple places that these boards could be powered multiple ways, one through the 24-pin connection and the other through a 4-pin connection. However, they should NOT be used at the same time. After some discussion on the OpenHomeLab slack group with Mark Brookfield, we got it sorted how the power should be on pins 1 through 10 and 13 through 22. Big thanks to the OpenHomeLab folks and Mark especially. I was also able to confirm this configuration through WiredZone, whom responded back in less than 24 hours.

PSU Connection

Motherboard Power Connected using 20 of 24 Pins

The other issue was with the fans. I ordered some fans since the server would be sitting on a shelf somewhere in my house. Basically, the more fans to move the hot air out the better. The fun with the fans was because there’s not really any instructions on what to do with them or the fan holders. The fan holders did end up connecting together and then they basically sit on top of these pins. From that point, the fans literally just sit in the holders and are connected to the fan accessory ports on the motherboard. The case top is what helps hold everything together. Certainly not what I expected, but it’s moderately better than zip tying the fans to the case.

SuperMicro Dual Fan Holder Assembled

SuperMicro Dual Fan Holder Assembled


Fan Holder Pins Inserted

Fan Holder Pins Inserted in the Case


Holder and Fans Installed

Fans and Holder Installed in the Case

Everything else was extremely straight forward. Only other wish, the case could use some extra room for better cable management. You’ll see why in the assembly images below.

505-203B Case

SuperMicro 505-203B Case


Case and Motherboard Installed

SuperMicro 505-203B Case and Intel X10SDV-6C+-TLN4f Motherboard


IO Shield Installed

IO Shield Installed


Install Completed

Installation Completed

In Action

It's all cabled up and I can finally hit the power button and watch it spring to life, which it did with no fuss.

First thing I did afterwards was configure the BIOS settings as per Paul Braren's advice over at TinkerTry: Recommended BIOS Settings for Supermicro SuperServer SYS-5028D-TN4T

Next up, install ESXi to an attached USB thumb drive. I did this by way of the motherboard's KVM and it was quite easy, just like it would be via an HP iLO or Dell DRAC.

Lastly, install the VIB to make the 10GbE ports work properly. Paul has a great write-up on that as well over at TinkerTry: How to download and install the Intel Xeon D 10GbE X552/X557 driver/VIB for VMware ESXi 6.x

I had the system running for 90 days straight before I shut it down to start the upgrade to vSphere 6.5. No hiccups or any issues whatsoever. I've been extremely happy with the purchase, almost to the point of wondering why I hadn't done it sooner.

Server Running Status via ESXi

Home Lab Server running for 88 days!


Server Installed

Current Living Quarters for my Home Lab

If you have any questions as you're reading this, feel free to use the comments or find me on Twitter. Also check out the OpenHomeLab site and their slack channel, and definitely browse through Paul Braren's blog TinkerTry. Paul has done an immense amount of research and countless hours of hands-on work with these SuperMicro motherboards.

Now to start thinking through the next home lab upgrade whether I should do vSAN or upgrade my Synology...

5Apr/161

EUC Day 2016: PowerCLI for View

The Minneapolis VMUG had a terrific idea to put together a specialized event based around End User Computing (EUC) and I was lucky enough to be asked to come and present something around automation.

That brings me to the session I chose, which is an introduction to PowerCLI for View. Horizon View and automation (Powershell, specifically) aren't something that go together all that well at this point in time. PowerCLI for View is a great utility, don't think I'm taking anything away from it nor bashing it, but it does take some understanding to kinda set the groundwork before you dive-in head first. This session is my attempt to help set that groundwork.

Thanks again to Matt Heldstab and the rest of the MN VMUG team for having me out, the event was awesome. I also want to call out the rest of the sessions from that day, which can be found on YouTube: https://www.youtube.com/channel/UCMHCjDBAx2NhBlTRi2ud90A/videos?shelf_id=0&view=0&sort=dd

9Nov/150

PowerCLI – Quick Stats Not Up To Date Error

Recently rebooted one of my vCenters and came across an error on my ESXi hosts stating "Quick stats on *vmhost* is not up-to-date". A couple seconds worth of googling brought me to VMware KB2061008 which helped to resolve the issue.
Quick Stats Error Message

However, the KB only went through the GUI process of adding in the requisite parameters but there's no fun in clicking through the GUI so I came up with a short script that's applicable to vCenter 6.0 which can also accomplish performing the parameter creation/updates for the KB's workaround.

Once you run the script, you'll still need to restart the vCenter service on your VCSA or Windows server. If you happen to be in the web client:
Go to "Administration" then to the "Deployment" area to select "System Configuration"
Select "Services", then select "VMware vCenter Server"
Select "Actions" followed by "Restart"

Once the service is back up and running the error will no longer be present.
vCenter Service Restart

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.

29Oct/150

PoSh – Finally Testing PernixData!

My home lab has been in need of some upgrades lately. One of the easiest, and cheapest, was the addition of PernixData and their FVP Freedom edition release.

Couple of caveats I feel I should cover if you've never been exposed to PernixData's FVP product:

  • FVP, the normal offering, cannot activate a Freedom license.
  • FVP Freedom edition cannot be installed and used in trial mode.
  • FVP Freedom edition can only use RAM as an acceleration resource and requires a minimum of 4GB free per host.
  • FVP Freedom edition can only be used for read only acceleration (ie. write through mode).
  • FVP Freedom edition cannot be used with more than one cluster.

With that said, I ended up going with the regular FVP edition in trial mode because I don't have an additional 4GB of RAM available. The install was extremely easy using SQL Express. vSphere Web client plugin installed to my VCSA instance properly and creating the first FVP Cluster was equally as easy. However this isn't about the install and config, so let's jump to the Powershell module!

First, if you're on the management server, import the module:
Import-Module PrnxCli

If you don't happen to be on the management server, you'll want to copy/paste the "Program Files\PernixData\FVP Management Server\Client\PSModule" directory over to the desired system and then point the import cmdlet at the "PrnxCli.dll" file. Pointing the import cmdlet at the "PrnxCli.psd1" file produces an error stating it can't find the nested modules:
import-module prnxcli.dll

Second, connect to the PernixData Management server:
($creds variable is the result of the Get-Credential function used to store credentials)
connect-prnxserver

Since I already setup an FVP cluster, lets explore an existing FVP cluster by the name of "Home". The "Get-PrnxFVPClusterDetail" cmdlet shows all of the objects within the Home FVP cluster:
get-PrnxFVPClusterDetail

Displaying the current acceleration policy for a specific object via "Get-PrnxAccelerationPolicy" for the "probcosplx" VM:
Get-PrnxAccelerationPolicy

Some other cmdlets that can be used to explore the environment include: "Get-PrnxNFS", "Get-PrnxScsiLUN", "Get-PrnxVM", and "Get-PrnxVMFS". However if you're in a smaller environment, you can get a sum of all of those cmdlets by running the "Get-PrnxObject" cmdlet. It's also worth noting that all of the cmdlet responses have quite a bit more information under the covers such as auth level, support status, stats, policies, etc. Run the cmdlet with a " | select *" to see the rest of the information being returned.
Get-PrnxObject

The last thing that we haven't looked at in the exploratory phase would be statistics! Those are pulled by way of the "Get-PrnxObjectStats" cmdlet:
Get-PrnxObjectStats

Now that we have the exploration piece done, let's modify an object to change their Acceleration Policy. This is accomplished by way of the "Set-PrnxAccelerationPolicy" cmdlet:
Set-PrnxAccelerationPolicy

Overall, it's a pretty comprehensive module where anything you can do in the GUI can be done via Powershell. However there are some things, as minor as they are, that I wouldn't mind seeing added to the module in a future release:

  • Get-PrnxAccelerationPolicy - Show the name of the object information is received about, auto-population of the "Type" parameter, and a better way to decipher if an object is accelerated or not (currently an un-accelerated object shows up with an empty FlashCluster but still shows a policy of "Write Through")
  • Adding some functionality around piping output into new cmdlets.

Lastly, I figure I should show off some of the stats as they really are quite impressive. Here's what FVP did for me in just 3 days in my home lab:
Awesome Pernix Stats

29Dec/140

PowerCLI – View – Pool Health Check Report

I've been given the chance to work with View a little more here recently and focus in on some of the gaps that are missing, specifically around reporting and alerting. vC Ops and the View adapter are in use, however the alerts leave much to be desired. I'm glad to be able to say that the gaps are filled in with the new version, and new title, of vR Ops and the View adapter but this environment is not yet to that point.

Examples of the vR Ops alerts which are included by default:

vR Ops Default View Alerts

What gaps am I referring to? I'm aiming specifically at the View Pool state, provisioning state and the amount of available desktops compared to the headroom configuration.

To do this, I enlisted the help of the View PowerCLI cmdlets and the View Connection server ADAM database to create the script below that creates an output similar to this:
(Note: the asterics around the value that caused the report to be sent)

View Pool Report Output

Before getting to the script, lets cover some of the requirements of the script:

  • This script is to be run from a Connection server.
  • This script is currently formatted to have the report be consumed by way of email.
  • The email variables need to be filled in to match the environment it's being run in.
  • The email is sent only if the following criteria are met:
    • A Pool's state is false.
    • A Pool's provisioning state is false.
    • A Pool's available desktops are less than the headroom setting by the amount set in the desktopthreshold variable.
  • The default desktop threshold is meant to be a percentage and is set to a default of 90%, or 0.9. This is easily modified on line 22.

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.

19Dec/140

PowerCLI – Automate the vROps OVA Deployment

For those that haven't heard, vCenter Operations (known better as vC Ops) has been not only updated but renamed. It's new name is vRealize Operations (or, probably, vR Ops) and it is officially version 6.0. Previously the system was deployed in a vApp containing a UI VM and an Analytics VM. The new systems incorporates a roles for the VMs such as Master, Master Replica, Data and Remote Collecter.

However, this blog post isn't to focus on what's been updated. It's to take a look at making the deployment a little easier since most installs will have at least two nodes. If you would like some further information on the update, please check out VMware's website: http://www.vmware.com/products/vrealize-operations

After running the script below, you'll find an output similar to the following:

vROps-Deploy

Before getting to the script, lets cover some of the assumptions and requirements made in the script:

  • The OVA has already been downloaded and is placed somewhere available to the system running the script. (Example: local disk, SMB or DFS share, etc.)
  • The VM is being placed in a resource pool.
  • The local system is able to successfully run and resolve the VM name via Resolve-DnsName cmdlet which is available in PowerShell v4.
  • The subnet being used is a /24 or 255.255.255.0. This is easily modified on line 126.
  • The VLAN ID is based on the third octet of the system's IP address. This information is set on line 128 and the portgroup is set on line 133.
  • The gateway ends with '.254'. This is easily modified on line 129.
  • DNS should be modified to match your environment which is based on line 130.

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.

9Sep/140

PowerCLI – Process of Adding Notes to VMs

Documentation is a good thing. No matter how big or small. One of the easiest methods of documentation is to use the built in annotation section for "Notes".

Annotation Notes

What I've come up with is a fairly basic script to go through all the VM objects that do not contain notes and allow the user to insert notes on a line by line basis. Here's an example:

Running the script

Here's the script to accomplish it:

If a one-liner is more your speed, give this one a go... Note: you'll have to specify your own cluster, if that's a desired use.

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.

14Jul/142

PowerCLI – Removing and Re-creating Unknown and/or Orphaned VMs

Ran into an issue lately where I found a host had lost its storage. For whatever reason HA didn't kick in to bring all the VMs back to life and there was a need to recreate ~75 VMs whom were in an unknown and/or orphaned state. It looked a bit like this:
Unknown VMs

PowerCLI to the rescue!

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.

29Oct/130

PowerCLI – Reset NTP settings on VMHosts per Cluster

As daylight savings time is almost upon us, there are always questions revolving around what hosts use what NTP sources for time synchronization. To address this issue, I created a script to go through and remove the current NTP sources, add the desired NTP sources and then restart the NTP service on all of the hosts in the environment. However, to be safe, the preference was that it wasn't done all at the same time. To achieve this, I broke it down and applied it to hosts one by one in a specified cluster.

When running the script, it will ask for the cluster name and four NTP servers so you don't have to modify the code unless you want to add more or less NTP servers.


#Reset NTP settings on VM Hosts per Cluster

$InputCluster = Read-Host "Cluster Name:"
$InputNTP1 = Read-Host "First NTP Server:"
$InputNTP2 = Read-Host "Second NTP Server:"
$InputNTP3 = Read-Host "Third NTP Server:"
$InputNTP4 = Read-Host "Fourth NTP Server:"

#Select Cluster to change NTP Settings
$Cluster = Get-Cluster $InputCluster

#NTP servers to be changed to
$ntp1 = $InputNTP1
$ntp2 = $InputNTP2
$ntp3 = $InputNTP3
$ntp4 = $InputNTP4

#Grabbing VMHosts for desired Cluster
$allVMhost = $Cluster | Get-VMHost | sort Name

#Reseting NTP servers one by one
foreach ($vmhost in $allVMhost){

#Remove existing NTP servers
Write-Host "Removing all NTP Servers from $vmhost"
$allNTPList = Get-VMHostNtpServer -VMHost $vmhost
Remove-VMHostNtpServer -VMHost $vmhost -NtpServer $allNTPList -Confirm:$false | out-null
Write-Host "All NTP Servers from $vmhost have been removed"
Write-Host ""

#Setting NTP servers
Write-Host "Adding NTP servers to $vmhost"
Add-VmHostNtpServer -NtpServer $ntp1,$ntp2,$ntp3,$ntp4 -VMHost $vmhost -Confirm:$false | out-null
Write-Host "The following NTP servers have been added to $vmhost : $ntp1, $ntp2, $ntp3, $ntp4"
Write-Host ""

#Checking NTP Service on the ESXi host
$ntp = Get-VMHostService -vmhost $vmhost| ? {$_.Key -eq 'ntpd'}
Set-VMHostService $ntp -Policy on | out-null

if ($ntp.Running ){
Restart-VMHostService $ntp -confirm:$false
Write-Host "$ntp Service on $vmhost was On and was restarted"
}
Else{
Start-VMHostService $ntp -confirm:$false
Write-Host "$ntp Service on $vmhost was Off and has been started"
}

Write-Host ""

}

Click here to download a text file containing the script.

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.

24May/131

PowerCLI – Copying PortGroups from a Standard vSwitch to a Distributed vSwitch

Ran out of ports on a Standard vSwitch and could not reboot the host. Sounds like a good time to implement a Distributed vSwitch and copy the PortGroups over.

When you run the script, it will ask for the desired ESXi host name, desired Standard vSwitch name, and the desired Distributed vSwitch name so you don't have to modify the code.


#Take port groups from a specified vSwitch on a specified host and create all the same port groups on a specified Distributed vSwitch

$InputHost = Read-Host "Host Name"
$InputvSwitch = Read-Host "vSwitch Name"
$InputDvS = Read-Host "Distributed vSwitch Name"

$vmhost = Get-VMHost $InputHost
$vss = Get-VirtualSwitch -Name $InputvSwitch
$vssNumPorts = $vss.NumPorts
$standardpg = $vmhost | $vss | Get-VirtualPortGroup
$dvs = Get-VDSwitch $InputDvS

foreach ($i in $standardpg) {

$pvgname = $i.name.ToString()
$pvg = "dv-" + $pvgname
$vlan = $i.VLANID

#create a Static DvS PG with the same VLAN, number of ports and add a "dv-" to the name
Get-VDSwitch -Name $dvs | New-VDPortGroup -Name $pvg -VLanId $vlan -PortBinding "Static" -NumPorts $vssNumPorts

}

Click here to download a text file containing the script.

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.