Posts

Showing posts from July, 2013

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 '04/1/09 02:00:00.000' AND '11/1/09 01:59:59.999'

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.  It then uses that li