View 5.0 not provisioning

Really short post
This can occur when an ESXi host that is not completely configured is introduced to the cluster even when in maintenance mode. i.e. it is still missing an NFS share.

Long story short, don't introduce ESXi hosts that haven't been completely configured yet.

vCenter Infrastructure Navigator Removal How to.

Summary:
A very cool little appliance that looks @ your VM's and everything they interact with.  Unfortunately, the installation can be fraught w/ issues.  I for one found a bug w/ vCenter 5.0 and VIN 1.1.1 (where VIN 2.0 might have been introduced before).  Specifically, I was unable to apply a VIN 1.0 license to my VIN 1.1.1 installation because I tried to introduce VIN 2.0 first.  Interestingly, my 2.0 key worked fine w/ the 1.1.1 version.

Long story short and to make it simple don't introduce VIN 2.0 unless you are on vCenter 5.1.

PreReqs for 5.0 users:
  1. vCenter 5.0
  2. VIN 1.1.1
  3. vCenter Web Client 5.0
Details:
If you have not deployed VIN ever to your 5.0 environment, then I recommend you deploy VIN 1.1.1 and save yourself some headaches.  Otherwise, here are some remediation steps you can take to deploy VIN if you did what I did or set it to auto-upgrade w/o knowing better.
Steps to Remove VIN extensions from vCenter
  1. Remove VIN appliance from vCenter
  2. Go to your vCenter's Managed Object Browser via your web browser
    • https://YourvCenterServerName/mob/?moid=ExtensionManager
  3. Your looking for this in your list:
    • extensionList["com.vmware.vadm"]
  4. To remove select UnregisterExtension and paste com.vmware.vadm into the box and select "Invoke Method.
    • You'll get a null return, this is fine.
  5. Now if you refresh your MOB page, you should no longer see com.vmware.vadm in the extension list.
    • https://YourvCenterServerName/mob/?moid=ExtensionManager
  6. Finally, you'll need to delete the related extension folder from your vCenter's file system.
    • I'm assuming Windows here, not sure where these would be on the vCenter appliance.
    • Delete the "com.vmware.vadm" folder
      • Normally located here: C:\Program Files\VMware\Infrastructure\VirtualCenter Server\Extensions
  7. Now you should be able to re-import the VIN vApp and it'll re-register all its components.

What does resetting the vCenter Inventory Service database do?

What does resetting the vCenter Inventory Service database mean exactly?

[Update: Additional Info added thanks to anonymous feedback]
  1. In 5.0, this simply is the search/index function in the vSphere Client, previously handled by the Tomcat service.  So going through the reset steps outlined here, should cause little to no grief.
    • You could attempt the restore steps, but I don't really see a point in doing so in 5.0
    • You usually need to go through the reset steps if the client's search begin to slow down and you get "Operation Timed Out Errors"
  2. In 5.1, this database seems to now house the 'tags' info feature.
    1. This is where it's now important that you have backups because resetting the database effectively wipes out all your entered 'tags' from existence.
Things affected by resetting inventory service database:
o vCenter tags (version 5.1+ only)
o Storage Profiles
o Storage Capabilities
o Index of which VMs have which Storage Profile assigned

This particular service was introduced in vSphere 5.0.
In 5.1 one you are able to separate it from the vCenter server.

Bottom line:
It becomes very important to begin backing up the Inventory Service database in 5.1.  If you are using Storage Profiles in 5.0, then the Inventory Service is equally important for backups.

Automating Registration of PowerPath Licenses using Powershell/PowerCLI

Summary:
EMC documentation is atrocious.  Needless to say, their 'auto-registration' capability is poorly named and represented in my opinion.  It makes you think, deploy a vApp, copy license file, and you're done.  SOOOO NOT the case.  So here is my attempt to hopefully help make the license application portion 'automated' using PowerShell and PowerCLI cmdlets.

PreReq:
  1. PowerPath 5.8 License vApp
  2. PowerPath License File
  3. RTools for Windows
Details:
  1. Deploy the vApp
    • Generate a license file from EMC's website, you'll need the IP and DNS name of the vApp.
    • or contact your EMC support team to have them do it for you.
  2. Copy the license file to the vApp's /etc/emc/licenses/ directory
  3. Install RTools on a Windows server or your workstation
    • I prefer to have my tools on a shared general purpose system.  This allows me to run scheduled scripts from one location.
  4. Copy the same license file to C:\ProgramData\My Documents\emc\PowerPath\rpowermt
    • The rpowermt tool reads this location to find out the license server IP address and name.
  5. Now onto the Powershell portion of this post (Apologies for the formatting, I've been lazy in finding a new editor for Blogger):

#Connecting to vCenter
Connect-VIServer YourvCenterServerName

#Gather hosts in previously connected vCenter
$VMHosts = Get-VMHost

#Getting saved root credentials for esx hosts
#To generate this, you can use the New-VICredentialStore cmdlet
$VICreds = Get-VICredentialStoreItem -File D:\SomePath\RootCreds.xml

#This is where we begin working w/ each individual VM host.
Foreach ($VMHost in $VMHosts)
{
#Here we call the rpowermt executible, inserting the VM host name, and its root credentials
#We are capturing the output of this command into the $LicenseChk variable
$LicenseChk = & 'C:\Program Files (x86)\EMC\PowerPath\rpowermt\rpowermt.exe' check_registration host=$($VMHost.name) username=$($VICreds.User) password=$($VICreds.Password)
#Here we call a switch and do a regex check of the contents of $LicenseChk
    switch -regex ($LicenseChk)
    {
    #If $LicenseChk contains the word unlicensed, we then attempt to register the VM host w/ the license server.
    #A check is made again, if the host is still unlicensed, we output the contents of $LicenseChk to a file and e-mail ourselves to investigate and attempt manual remediation
    #If licensed successfully, we check if a file denoting that has already been generated, if not we output the contents of $LicenseChk to a file.
    #This is simply for record keeping.
    "unlicensed" 
        {
        & 'C:\Program Files (x86)\EMC\PowerPath\rpowermt\rpowermt.exe' register host=$($VMHost.name) username=$($VICreds.User) password=$($VICreds.Password)
        $LicenseChk = & 'C:\Program Files (x86)\EMC\PowerPath\rpowermt\rpowermt.exe' check_registration host=$($VMHost.name) username=$($VICreds.User) password=$($VICreds.Password)
            switch -regex ($LicenseChk)
            {
            "unlicensed" 
                {
                $LicenseChk | Out-File -FilePath C:\SomePath\PowerPathRegistrationFailure$($VMHost.name).txt 
                Send-MailMessage -SmtpServer yoursmtpserver.localdomain -To "AnEmailAddressyouOwn@somewhere.com" -From "ILikeDLs@somewhere.com"  -subject "$($VMHost.Name) PowerPath License Failure" -Body "$($VMHost.Name) failed to register a powerpath license.  Please attempt manually from someserveryourunthisfrom.localdomain"
                }
            "licensed" 
                {
                If (Test-Path C:\SomePath\$($VMHost.name).txt ){}
                Else{$LicenseChk | Out-File -FilePath C:\SomePath\$($VMHost.name).txt }
                }
            }
        }
    "licensed" 
        {
        If (Test-Path C:\SomePath\$($VMHost.name).txt ){}
        Else{$LicenseChk | Out-File -FilePath C:\SomePath\$($VMHost.name).txt }
        }
    }
}

#Once the loop completes, we disconnect from vCenter
Disconnect-VIServer YourvCenterServerName -Confirm:$false