VMUG Advantage: Its Not a Sales Pitch When You Love the Product

My final post of #Blogtober2018 is going to be about a program I love and a must have for anyone who works on VMware technology, VMUG Advantage. My transition to IT is almost entirely self taught. I depended extensively on my home lab as a method to generate experience. Looking for demos, NFR, free trials and home lab licensing became an art form for me. To this day I have never found a better source than VMUG Advantage.

VMUG Membership

Note the red arrow. EVALExperince gives you access to practically the entire VMware product line. You don’t have to signup for VMware Advantage to enjoy the benefits of VMUG itself. You can join the VMUG community for free here. This will get you access to meetings and UserCons which are invaluable for networking and just plain fun. But the icing on the cake is EVALExperience.

Financial benefits

The financial benefits for test takers cannot be understated. At the time of this writing the VCAP exam cost 450$. One test will almost pay for Advantage itself. If you currently do not have a VCP or greater, then you will most likely need a training class before you can sit for the exam. These classes can be thousands of dollars. The 20% discount that EVALExperience gives on training classes can quickly become no small sum.

Learning and Experience

But more to the point, I want to emphasize the main benefit of Advantage is not  financial. What was and still is important to me is experience. This is experience that you might never be able to gain access to on your own. When I started out in IT, I put experience gained by the EVALExperience program on my resume. When asked about it by potential employers, I explained that it was in my home lab. I would challenged the interviewer to put me in front of a console and see what I could do based solely on experience I gained from my home lab. “If I can do it, it really does not matter where I learned it from, ” I would say. I would never have been able to say that without EVALExperience.

I’ll leave you with a list of the benefits below. Save money. Get experience. Join VMUG Advantage.

EVALExperience

Discounts

20% Discount on VMware Training Classes
20% Discount on VMware Certification Exams
35% Discount on VMware Certification Exam Prep Workshops (VCP-NV)
35% Discount on VMware Lab Connect
$100 Discount on VMworld Attendance

Licensing

Data Center & Cloud Infrastructure
VMware vCenter Server v6.x Standard
VMware vSphere ESXi Enterprise Plus with Operations Management

Networking & Security
VMware NSX Enterprise Edition
VMware vRealize Network Insight

Storage and Availability
VMware vSAN
VMware Site Recovery Manager

Cloud Management
VMware vRealize Log Insight
VMware vRealize Operations
VMware vRealize Automation 7.3 Enterprise
VMware vRealize Orchestrator
VMware vCloud Suite Standard

Desktop & Application Virtualization
VMware Horizon Advanced Edition
VMware vRealize Operations for Horizon

Personal Desktop
VMware Fusion Pro 11
VMware Workstation Pro 15

Sources: Licensing Discounts Signup

 

Centralize ESXi Core Dumps

In my environment the majority of the hosts boot from SD cards, so persistent log storage is a big deal. I recently ran into a PSOD issue. VMWare requested the coredumps, which of course, I did not have. Thankfully we were able to sort out my issue via the PSOD screenshot I took from the console.

Obviously wanting to avoid this scenario in the future, I set off to find the best way to keep this from happening again. Interestingly, I found an easy way to do this. There is no direct way via GUI or even advanced host settings. Eventually I was able to get it setup. Below is my method. Enjoy.

Setup vCenter

Note: We are running VCSA 6.5 in my environment so the core dump location will be different than if you are using a windows based vCenter server.

First we setup the esxi dump collector on the vCenter server. While logged into the vCenter web interface with an administrator account, click on the Administration link in the vCenter home menu. Next under the Deployment section, click the System Configuration link. From here choose Services under the system configuration header on the left side of the screen. Finally choose “VMware vSphere ESXi Dump Collector.”

From here, click the Manage tab. Then click the pencil icon to change the startup type and set it to run automatically. Next hit the green play button. I can confirm this will not in anyway affect the vCenter server itself, so no worries about affecting production. I kept the defaults for port and size. As noted, if you try to change either of these two settings, it does require a vCenter reboot.

That’s it! Now the vCenter server is ready. Next we need to change the setting on the esxi hosts. I was surprised to find that this must be done at the command line via esxcli. There is no way via advanced settings on the host. The process is straight forward but heavy with administrative overhead. You must ssh to each host and run the following commands. You can also use Host Profiles but that is beyond the scope of this particular post.

Setup ESXi Hosts
### Gets the current coredump configuration ###
esxcli system coredump network get

### Sets server address and port to send kernel dump to ###
### vmk0 is management network in my environment
esxcli system coredump network set -v vmk0 -i vCenter IP -o 6500

### Enables sending of coredumps to vCenter server ###
esxcli system coredump network set -e true

### Shows new core dump configuration ###
esxcli system coredump network get

It now lists the settings compared to the first time we ran it.

 ### Sends test coredump to vCenter Server ###
esxcli system coredump network check

OK, we are done with the host setup. Now to confirm the last step on the vCenter server. Ssh to the vCenter server and check the following log file:

/var/log/vmware/netdumper/netdumper.log

You should see similar entries:

“Posting back a status check reply to…”    SUCCESS!!!

Quick credit to @lamw for this https://blogs.vmware.com/vsphere/2012/12/network-core-dump-collector-check-with-esxcli-5-1.html. This article lays out the steps of this setup in great detail.

Automate it

Having gotten it to work on one host, I now had to figure out how to get it working on the rest of my hosts with less typing and less time. Enter powercli. Borrowing a lot from this guy’s technique, I used the Get-EsxCli and a foreach loop to apply the above settings to each host. At the same time, I did a tail -f on the log file to witness the fruits of my labor. It was a good feeling knowing I had saved myself so much work. So without further adieu:

 

 

 

 

 

VMware PowerCLI to enable management services

I wrote this once when I needed to pull as much information as possible about the vmware environment I found myself in that day. It enables ssh and sets it to start at boot. It also enables SNMP, sets it to star at boot and sets the community string you define. I split it up into multiple for loops so I could easily track what I was doing with on screen commentary via write-host. I used it in a vSphere 5.5 environment. Beware results might vary by version.

<#####################################################################
I begin by letting you define your vCenter server, your datacenter object and your snmp community string
Next this script starts SSH, makes SSH start on boot, hides SSH warnings, starts SNMP, makes SNMP start on boot,
and sets the SNMP community string on each host in your defined data center.
######################################################################>

#Your Datacenter specific variables
$vCenter = "FQDN of vcenter server"
$datacenter = "datacenter object name"
$community = "SNMP Community String"

#Load VMware Cmdlets and connect to vCenter
Add-PSSnapin vmware*
Connect-VIServer -Server $vCenter

#Set VMHosts variable
$VMHosts = Get-VMhost -Location $datacenter | Sort-Object
  
# Start SSH on each host in the datacenter
ForEach ($HostMachine in $VMHosts) {
    Write-Host "Starting the SSH Service on $HostMachine " 
    $HostMachine | Get-VMHostService | Where-Object {($_.Key -eq "TSM-SSH") -and ($_.Running -eq $False)} | Start-VMHostService
}
  
# Change SSH to start on boot
ForEach ($HostMachine in $VMHosts) {
    Write-Host "Changing SSH to start on boot for $HostMachine " 
    $HostMachine | Get-VMHostService | where { $_.key -eq "TSM-SSH" } | Set-VMHostService -Policy "On" -Confirm:$false -ea 1
}
  
# Supress SSH warning
ForEach ($HostMachine in $VMHosts) {
    Write-Host "Hiding SSH Warning on $HostMachine "
    $HostMachine | Get-AdvancedSetting | Where-Object {$_.Name -eq "UserVars.SuppressShellWarning"} | Set-AdvancedSetting -Value "1" -Confirm:$false
}

#Start SNMP service on hosts
ForEach ($HostMachine in $VMHosts) {
    Write-Host "Starting SNMP on $HostMachine " 
    $HostMachine | Get-VMHostService | Where-Object {($_.Key -eq "snmpd") -and ($_.Running -eq $false)} | Start-VMHostService | Out-Null
}

#Change SNMP to start on boot
ForEach ($HostMachine in $VMHosts) {
    Write-Host "Changing SNMP to start with $HostMachine " 
    Get-VMHostService $HostMachine  | Where-Object { $_.key -eq "snmpd" } | Set-VMHostService -Policy "On" -Confirm:$false -ea 1 | Out-Null
}

#Set snmp community string and opens firewall for snmp
ForEach ($HostMachine in $VMHosts) {
    Write-Host "Setting snmp community string and opening firewall for $HostMachine"
    $esxcli = Get-EsxCli -VMHost $HostMachine
    $esxcli.system.snmp.set($null,$community,$true,$null,$null,$null,$null,$null,$null,$null,$null,$null,$null,$null,$null,$null,$null)
    $esxcli.network.firewall.ruleset.set($true, $true, "snmp")
}

Write-Host "Good Job"