VMware Cloud Community
vFantastic
Enthusiast
Enthusiast
Jump to solution

DefaultPSP Change Through PowerCLI/Host Profiles doesn't stick...

ESXi 5.0u2

$vH = Get-Cluster "Test" | Get-VMHost "Test1"

$vHcli = Get-EsxCli -VMHost $vH

$vHcli.storage.nmp.satp.list()

$vHcli.storage.nmp.satp.set($true,"VMW_PSP_RR","VMW_SATP_DEFAULT_AA")

$vHcli.storage.nmp.satp.set($true,"VMW_PSP_RR","VMW_SATP_ALUA")

$vHcli.storage.nmp.satp.list()

Shows that the DefaultPSP has changed correctly.

However, after a the Host is Rebooted, the settings revert! If I SSH as ROOT and change the setting it takes and stays!

On a side note, Host Profile NMP settings have the same behavior it applies but doesn't stick after a reboot.

Anyone know why this behavior occurs or how to resolve so I can perform PSP audits and Remediation through PowerCLI instead of going to each Host as Root to Set the proper configs?

-vFantastic

Reply
0 Kudos
1 Solution

Accepted Solutions
vFantastic
Enthusiast
Enthusiast
Jump to solution

Well I found Set Default PSP Round Robin ESXi 5.0U1, and it resolved my issue. by the following.....

$vHs = Get-VMHost

ForEach($vH in $vHs){

    #Getting ESX CLI for each Host

    $vHcli = Get-EsxCli -VMHost $vH

  

    #Does it have the correct PSP for IBM SVC

    $SVC = $vHcli.storage.nmp.satp.list() | Where {$_.Name -eq "VMW_SATP_SVC" -and $_.DefaultPSP -ne "VMW_PSP_RR"} | Select @{N="Cluster";E={$vH.Parent.Name}},@{N="VMHost";E={$vH.Name}},DefaultPSP,Name

  

    If($SVC.Name -eq "VMW_SATP_SVC" -and $SVC.DefaultPSP -ne "VMW_PSP_RR"){

        #Create a low level object that points to the satp namespace:

        $LowLevel = $vHcli.TypeManager.CreateDynamicManagedObject( $vHcli.storage.nmp.satp.id )

        #Create a hashtable holding parameter values. Note that here we do not specify value for boot parameter:

        $Params = @{"DefaultPSP" = "VMW_PSP_RR"; satp = "VMW_SATP_SVC"}

        #Invoke set operation on the $LowLevel object:

        $LowLevel.InvokeOperation("set",$Params)

    }

  

    #Does it have the correct PSP for Defaults

    $DAA = $vHcli.storage.nmp.satp.list() | Where {$_.Name -eq "VMW_SATP_DEFAULT_AA" -and $_.DefaultPSP -ne "VMW_PSP_RR"} | Select @{N="Cluster";E={$vH.Parent.Name}},@{N="VMHost";E={$vH.Name}},DefaultPSP,Name

  

    If($DAA.Name -eq "VMW_SATP_DEFAULT_AA" -and $DAA.DefaultPSP -ne "VMW_PSP_RR"){

        #Create a low level object that points to the satp namespace:

        $LowLevel = $vHcli.TypeManager.CreateDynamicManagedObject( $vHcli.storage.nmp.satp.id )

        #Create a hashtable holding parameter values. Note that here we do not specify value for boot parameter:

        $Params = @{"DefaultPSP" = "VMW_PSP_RR"; satp = "VMW_SATP_DEFAULT_AA"}

        #Invoke set operation on the $LowLevel object:

        $LowLevel.InvokeOperation("set",$Params)

    }

}

View solution in original post

Reply
0 Kudos
2 Replies
vFantastic
Enthusiast
Enthusiast
Jump to solution

This is happening on over all Hosts >80...

Reply
0 Kudos
vFantastic
Enthusiast
Enthusiast
Jump to solution

Well I found Set Default PSP Round Robin ESXi 5.0U1, and it resolved my issue. by the following.....

$vHs = Get-VMHost

ForEach($vH in $vHs){

    #Getting ESX CLI for each Host

    $vHcli = Get-EsxCli -VMHost $vH

  

    #Does it have the correct PSP for IBM SVC

    $SVC = $vHcli.storage.nmp.satp.list() | Where {$_.Name -eq "VMW_SATP_SVC" -and $_.DefaultPSP -ne "VMW_PSP_RR"} | Select @{N="Cluster";E={$vH.Parent.Name}},@{N="VMHost";E={$vH.Name}},DefaultPSP,Name

  

    If($SVC.Name -eq "VMW_SATP_SVC" -and $SVC.DefaultPSP -ne "VMW_PSP_RR"){

        #Create a low level object that points to the satp namespace:

        $LowLevel = $vHcli.TypeManager.CreateDynamicManagedObject( $vHcli.storage.nmp.satp.id )

        #Create a hashtable holding parameter values. Note that here we do not specify value for boot parameter:

        $Params = @{"DefaultPSP" = "VMW_PSP_RR"; satp = "VMW_SATP_SVC"}

        #Invoke set operation on the $LowLevel object:

        $LowLevel.InvokeOperation("set",$Params)

    }

  

    #Does it have the correct PSP for Defaults

    $DAA = $vHcli.storage.nmp.satp.list() | Where {$_.Name -eq "VMW_SATP_DEFAULT_AA" -and $_.DefaultPSP -ne "VMW_PSP_RR"} | Select @{N="Cluster";E={$vH.Parent.Name}},@{N="VMHost";E={$vH.Name}},DefaultPSP,Name

  

    If($DAA.Name -eq "VMW_SATP_DEFAULT_AA" -and $DAA.DefaultPSP -ne "VMW_PSP_RR"){

        #Create a low level object that points to the satp namespace:

        $LowLevel = $vHcli.TypeManager.CreateDynamicManagedObject( $vHcli.storage.nmp.satp.id )

        #Create a hashtable holding parameter values. Note that here we do not specify value for boot parameter:

        $Params = @{"DefaultPSP" = "VMW_PSP_RR"; satp = "VMW_SATP_DEFAULT_AA"}

        #Invoke set operation on the $LowLevel object:

        $LowLevel.InvokeOperation("set",$Params)

    }

}

Reply
0 Kudos