Posts

vMotion SQL Report

Image
I created this report a long time ago when vMotion was viewed w/ much skepticism.  It's proved quite useful even to this day not to only prove that vMotion works, but as a troubleshooting tool to make sure vMotion wasn't the 'cause' of problems. As unlikely as it may be the 'cause' of issues, transparency helps and 'knowing' the root cause of issues only strengthens the case for a software defined datacenter.  <stepping off soapbox> Anyway, here are the meat and potatoes: Query is set to EST and implements daylight savings time on appropriate dates.  You can change the numbers highlight in red to match your time zone. SQL Query for the Dataset: SELECT        ENTITY_NAME AS [VM Name], COMPLETE_STATE AS Status, CANCELLED AS Cancelled, CASE WHEN START_TIME >= '11/1/09 02:00:000' THEN DATEADD(hour, - 4 ,                           START_TIME) WHEN START_TIME BETWEEN '0...

Add Portgroups/VLANs to vmware standard switches via PowerCLI

Summary: Wrote a simple little script to insert a portgroup into a targeted vSwitch of all VM hosts in a targeted cluster.  This is not an issue if you use distributed vSwitches. Script: $vCenterName = Read-Host -Prompt " Please provide name of vCenter server " $vCenter = Connect-VIServer $vCenterName If ( $? -ne $true ){ Write-Host " $($vCenterName) appears to be invalid, please rerun script w/ correct vCenter name. " Exit } $ClusterName = Read-Host -Prompt " Provide name of cluster you'd like to add a new portgroup to " $Cluster = Get-Cluster $ClusterName If ( $? -ne $true ){ Write-Host " $($ClusterName) appears to be invalid, please rerun script w/ correct cluster name. " Exit } $VLAN = Read-Host -Prompt " Please provide VLAN ID: (0-4094 are valid values) " $PGName = Read-Host -Prompt " Please provide name of port group: (i.e. 10.64.120.x) " $vSwitchName = Read-Host -Prom...

LDAP UCS Group Maps w/ AD groups more than 1000 members bug?

Image
[SHORT UPDATE: My hypothesis was wrong] [FULL UPDATE: Click here] Summary: Seems like I always run into bugs w/ UCS's LDAP and AD integration.  This time it appears that UCS has issues w/ associating users that are members of AD groups that contain more than 1000 members.  I say 1000 members because in all likelyhood UCS's programming is calling this method: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366953%28v=vs.85%29.aspx Details: In my case, I was referencing 'domain users' and granting read-only.  Testing the users from the CLI interface would show that the user account would authenticate just fine like as follows: connect nxos test aaa server ldap nameofADserver usernametoTest cleartextpassword user has been authenticated Screenshot: In the end, the problem seems to be that UCS is unable to map the user to the group that grants the UCS role access because of the 1000 member limit. Workaround: Quite simply, map an AD group that ha...

Get Dell ESX host warranty info via PowerCLI version 2

Image
Summary: Originally made to quickly see which ESX hosts are in or out of warranty .  The Dell Management plugin still doesn't seem to give this information interestingly enough.  Anyway, my old script doesn't work these days because the property for service tag doesn't exist @ the vCenter level.  It does exist @ the host level though, so I had to work a little magic. Here is an screenshot example of you can end up with: Caveats: Dell changed their warranty site so the ShipDate field is incorrect.  Pulling the site string down only faithfully pulls down the warranty end date.  If that field is important to you, then feel free to share w/ me how I can pull that info along w/ the end date. The script also assumes you have the same root password on all your hosts.  If you have a different password, then you'll need to generate an xml credential file for each. It's designed to grab data from your vCenter server for your list of ESX hosts. ...

vCenter Log Insight release

Image
vCenter Log Insight is a new log aggregator from VMware. As a new tool that is integrated with vCenter Operations Manager, Log Insight has great potential. The ability to tie in directly with VMware's knowledge base, vCenter and vCenter Operations gives Log Insight a true strength in combining analytics with logging. We started using Log Insight (project Strata) at Tech Preview 2. We had a need for log aggregation solution and thought we'd give it a try on our lower environments. We have used it for different purposes. 1st time was with analytics. when we deployed it, I had setup a dashboard to see "warning" level alerts. 3 of our 120 hosts were far surpassing the others in errors.  After clicking down into the bar graphs we saw a high number of Active Directory related errors.  After rejoining 2 of those hosts to the domain the errors had cleared. The third box we needed to reinstall to clear the errors. Since we've done this all the servers have ...

vCenter/vSphere Web Client SSL Certificate Requests (PFX vs JKS)

I was working to get certs for the vsphere web client.  Needless to say, I had worked w/ JKS (Java Keystore) before so I figured the process was the same for PFX (PKCS12 keystore) files, but I was dead wrong.  I'd highly recommend looking into the VMware SSL Certificate Automation Tool .  What follows is mainly a learning exercise for me. For starters, if you have a mac, good for you, cause openssl is likely already installed and accessible via terminal which makes things much easier from the get go.  If you run Windows, download the windows binaries and install.  If you go to the openssl.org site like listed in VMware's docs as a Windows admin, lord help you.  When you install the openssl windows binaries w/ all defaults selected, openssl installs on C:\OpenSSL-Win32\bin. Open a command prompt to that directory, then you can pretty much follow the instructions from VMware . To read more about my trials and tribulations, click the link to continue ...

Replacing vCenter Operations Manager Certificate (vApp)

Refer to this post for openssl info , then follow the steps here: Generate a certificate signing request openssl req -out vcops.csr -new -newkey rsa:2048 -nodes -keyout vcops.key Answer the wizard questions appropriately for your environment. This creates your Certificate request and generates the associated private key. When you receive your signed cert from the CA if not already in pem format (with private key): Assuming CER or CRT we need to convert it to PKCS12 first. openssl pkcs12 -export -in vcops.cer -inkey vcops.key -name vcops -passout pass:password -out vcops.pfx Convert to PEM w/ private key openssl pkcs12 -in vcops.pfx -out vcops.pem -nodes It will prompt for password, if you used my example under step 2, then that would be password. Log into vcop's admin console (https://vcopsServername/admin), select the SSL tab, and upload your newly created pem file. Additional Steps: These steps were helpful in updating vCOPs registration info in vCe...