Get current RDS-CAL details via PowerShell. Run this from your 2008 RDS Licensing server.

# Filename of the export
$filename = "RDS-CAL-Report.csv"
# Import RDS PowerShell Module
import-module remotedesktopservices

# Open RDS Location
Set-Location -path rds:

# Remove previous reports (Optional)
remove-item RDS:\LicenseServer\IssuedLicenses\PerUserLicenseReports\* -Recurse

# Create new RDS report
$NewReport = new-item -path RDS:\LicenseServer\IssuedLicenses\PerUserLicenseReports -Scope DOM -Name Report

# Name is automatically generated
$NewReportName = $NewReport.name

# Get issued licenses
$IssuedLicenseCount = get-item RDS:\LicenseServer\IssuedLicenses\PerUserLicenseReports\$NewReportName\Win2K8-Win2K8R2\IssuedCount
# Count issued licenses
$IssuedLicenseCountValue = $IssuedLicenseCount.CurrentValue

# Get installed licenses
$InstalledLicenseCount = get-item RDS:\LicenseServer\IssuedLicenses\PerUserLicenseReports\$NewReportName\Win2K8-Win2K8R2\InstalledCount
# Count installed licenses
$InstalledLicenseCountValue = $InstalledLicenseCount.CurrentValue

# Installed - Issued
$Available = $InstalledLicenseCount.CurrentValue - $IssuedLicenseCount.CurrentValue
# Show percentage available
$AvailablePercent = ($Available /$InstalledLicenseCount.CurrentValue)*100
$AvailablePercent = "{0:N0}" -f $AvailablePercent

# Display info

Write-host "Installed: $InstalledLicenseCountValue"
Write-host "Issued: $IssuedLicenseCountValue"
Write-host "Available: $Available [ $AvailablePercent % ]"

# Add the information into an Array

[System.Collections.ArrayList]$collection = New-Object System.Collections.ArrayList($null)
$obj = @{
Installed = $InstalledLicenseCountValue
Available = $Available
AvailablePercent = $AvailablePercent
Issued = $IssuedLicenseCountValue
Date = get-date
}

# Exit RDS location
set-location c:

# Create PSO Object with the data
$collection.Add((New-Object PSObject -Property $obj));

# Export Data into a file
$collection | export-csv $filename -NoTypeInformation -Encoding UTF8

During datastore creation in vSphere using the Nimble vCenter plugin, I get the following error:

A general system error occurred: esxi1: CHAP setting not compatible. hba=vmhba33

In vSphere Client I went to my ESXi host then Configuration, Storage Adapters, iSCSI Software Adapter.  Taking a look at vmhba33 Properties then CHAP… I see that there was a CHAP setting in there for an old Drobo system I had connected at one point.

Changing the option to Do not use CHAP resolved my issue.  I’m not using CHAP on my lab setup.

Recently I’ve been dealing with CPU RDY of about 5% across two ESXi hosts. I’ve load balanced the best I could given necessary workloads and was able to get CPU RDY down to about 3-4% which still isn’t great. I made the decision to grab a few Intel Xeon X7560 processors to replace the existing Intel Xeon E7540 processors to help alleviate some pressure. The main reason was moving from 6 core E7540 to 8 core X7560.

The specs are pretty close, including same Nehalem family for my EVC needs. The clock speed is a bit faster on the X7560 at 2.27GHz vs the E7540 at 2.0GHz.

I swapped out 4 in total; each ESXi host is currently licensed for 2 socket VMware vSphere Enterprise Plus.

Here’s to hoping this gets me under 2% CPU RDY! I’ll attach a graph next week after I’ve had time to let things run and show a (hopeful) improvement.

Here’s an ESXi console script to loop through each Nimble eui.* adapter and set IOPS=0 and BYTES=0 (per Nimble recommendations).

for x in `esxcli storage nmp device list | awk '/Nimble iSCSI Disk/{print $7}' | sed -e 's/(//' -e 's/)//'`; do
echo $x 
esxcli storage nmp psp roundrobin deviceconfig set -d $x -t bytes -B 0;
esxcli storage nmp psp roundrobin deviceconfig set -d $x -t iops -I 0 ;
esxcli storage nmp psp roundrobin deviceconfig get -d $x;
done

Note: If you change the order above and set bytes after iops, then the policy will be based on bytes and not IOPS.

To reset defaults, use the following script on the ESXi host console:

for x in `esxcli storage nmp device list | awk '/Nimble iSCSI Disk/{print $7}' | sed -e 's/(//' -e 's/)//'`; do
echo $x 
esxcli storage nmp psp roundrobin deviceconfig set -d $x -t bytes -B 10485760;
esxcli storage nmp psp roundrobin deviceconfig set -d $x -t iops -I 1000 ;
esxcli storage nmp psp roundrobin deviceconfig set -d $x -t default;
esxcli storage nmp psp roundrobin deviceconfig get -d $x;
done

To make sure this survives a reboot, you can set a policy:

esxcli storage nmp satp rule add --psp=VMW_PSP_RR --satp=VMW_SATP_ALUA --vendor=Nimble --psp-option="policy=iops;iops=0"

Note that if you previously configured a user-defined SATP rule for Nimble volumes to simply use the Round Robin PSP (per the Nimble VMware best practices guide), you will first need to remove that simpler rule, before you can add the above rule, or else you will get an error message that a duplicate user-defined rule exists. The command to remove the simpler rule is: –Bill

esxcli storage nmp satp rule remove --psp=VMW_PSP_RR --satp=VMW_SATP_ALUA --vendor=Nimble

In order to work around the issue processor power management has to be disabled in system UEFI and vSphere Client.

To change power policies using server UEFI settings:

  1. Turn on the server.
    Note: If necessary, connect a keyboard, monitor, and mouse to the console breakout cable and connect the console breakout cable to the compute node.
  2. When the prompt ‘Press <F1> Setup’ is displayed, press F1 and enter UEFI setup. Follow the instructions on the screen.
  3. Select System Settings –> Operating Modes and set it to ‘Custom Mode’ as shown in ‘Custom Mode’ figure, then set UEFI settings as follows:
    Choose Operating Mode <Custom>
    Memory Speed <Max Performance>
    Memory Power Management <Disabled>
    Proc Performance States <Disabled>
    C1 Enhanced Mode <Disabled>
    QPI Link Frequency <Max Performance>
    QPI Link Disable <Enable All Links>
    Turbo Mode <Enable>
    CPU C-States <Disable>
    Power/Performance Bias <Platform Controlled>
    Platform Controlled Type <Maximum Performance>
    Uncore Frequency Scaling <Disable>

  4. Press Escape key 3 times, and Save Settings.
  5. Exit Setup and restart the server so that UEFI changes take effect.

Next, change power policies using the vSphere Client:

  1. Select the host from the inventory and click the Manage tab and then the Settings tab as shown in ‘Power Management view from the vSphere Web Client’ figure.
  2. In the left pane under Hardware, select Power Management.
  3. Click Edit on the right side of the screen.
  4. The Edit Power Policy Settings dialog box appears as shown in ‘Power policy settings’ figure.
  5. Choose ‘High performance’ and confirm selection by pressing ‘OK’ radio button.

A quick Powershell script I hacked together that will enumerate all Active Directory users, and build an XML file for an application I wrote that generates user reports for a specific application.

The output file format is similar to:

<quickreports>
  <report name="Organizational Unit">
  <database name="v001"/>
  <usrlogin name="jdoe01"/>
</report>
<quickreports>
$ErrorActionPreference= 'silentlycontinue'
$arr=@{}

foreach ($usr in Get-ADUser -Filter *  | select samaccountname) {

$user = get-aduser -identity $usr.samaccountname -ErrorAction SilentlyContinue
$userou = (($user.DistinguishedName -split "=",2)[-1].split(",")[1] -split "=",2)[-1]

$key = $userou
$value = $usr.samaccountname

if ($arr.ContainsKey("$userou")) {
$arr["$userou"] += $usr.samaccountname 
} else {
$arr["$userou"] = @()
$arr.add($key,$value)
}

}
$foo = "<?xml version=""1.0"" encoding=""utf-8""?>`r`n"
$foo += "<quickreports>`r`n"

$foo += foreach ($ou in $arr.keys) {

    write-output "  <report name=""$ou"">`r`n"

    foreach ($u in $arr["$ou"]) {
                if ($u.contains("01")) {
                    write-output "<database name=""v001""/>`r`n"
                } elseif ($u.contains("04")) {
                    write-output "<database name=""v004""/>`r`n"
                } else { 
                    write-output "<database name=""""/>`r`n"
                }
        write-output "<usrlogin name=""$u""/>`r`n"
}
    write-output "</report>`r`n"
}

$foo += "</quickreports>"

$foo | out-file quickreport.xml

# for some reason the outputted file was dumping 0x00 into the file.  Eventually
# I'll clean all this up and just write all the attributes and elements from up above
# but now is not the time as this is just a quick and dirty POC

$fn = "quickreport.xml"
$xmlDoc = [system.xml.xmldocument](get-content $fn)

$xmlDoc.save($fn)