12-27-2016 12:00 AM
Hello,
I read the blog Cisco UCS Custom Resource for the Microsoft Windows PowerShell Desired State Configuration (DSC) and I'm pretty exited about it. However, before I start to configure my UCS Manager using Desired State Configuration I would like to know how to get and set the configuration of the Local Configuration Manager Agent (Get-DscLocalConfigurationManager/Set-DscLocalConfigurationManager) and how to remove a configuration document (Remove-DscConfigurationDocument). If the target Systems ran Windows I would open a CimSession, but the usual PowerShell commands do not accept a UCS Session as CimSession:
$UcsSession = Connect-Ucs -Name MyUcsManager -Credential MyCredential
$Get-DscLocalConfigurationManager -CimSession $UcsSession # does not work
New-CimSession seems not to work with UCS Manager
Kind regards,
Stephan
Solved! Go to Solution.
01-10-2017 12:34 AM
Hi Stephan,
Yes your understanding is correct. Intermediate server will receive the MOF file and then applies the configuration specified in the MOF to the UCS Manager specified using the PowerTool cmdlets.
In the example you have mentioned above here is what each input refers to
<IP address of node> is the hostname/IP address of the intermediate Windows Server machine
<IP address of UCS> is where you specify the UCS Manager IP/Hostname
If there are further questions on this we can have a meeting to go through the use case.
Thanks,
Sumanth B R
01-01-2017 10:09 PM
Hi Stephan,
You don't need a UCS Session for for managing Local Configuration Manager settings you can use the standard DSC configuration cmdlets. UCS DSC Resources needs an intermediate server (Windows Server) for deploying the configuration on to the UCS so UCS Session details are needed only inside the configuration document. It is not needed for managing your LCM settings.
Hope this clarifies your question. Let us know if you need more information on the UCS DSC Resources.
Thanks,
Sumanth
01-09-2017 11:45 PM
Hi Sumanth,
Thank you for your reply.
I'm still not quite sure I understood the concepts correctly. What I learned from your message is there is no Local Configuration Manager Agent running on UCSM. Therefore an intermediate Windows Server is required. The MOF will be send to the intermediate Server and this box will then take care for the configuration of the UCSM Hosts defined by the connect string.
Example:
Configuration AutoGeneratedDSCConfig
{
param(
[Parameter(Mandatory=$true)]
[PsCredential] $ucsCredential,
[Parameter(Mandatory=$true)]
[string] $ucsConnectionString
)
Import-DSCResource -ModuleName Cisco.Ucs.DesiredStateConfiguration
Node "<IP address of node>"
{
UcsManagedObject Resource_1
{
Ensure = "Present"
ModifyPresent = $false
ClassId= "computeScrubPolicy"
Dn = "org-root/org-test/scrub-myScrubPolicy"
PropertyMap= "DiskScrub = yes `nPolicyOwner = local `nDescr = myScrubPolicy `nBiosSettingsScrub = no `nFlexFlashScrub = yes `nName = myScrubPolicy"
UcsCredentials = $ucsCredential
UcsConnectionString = $ucsConnectionString
Identifier = "Resource_1"
}
}
}
#$connectionString = "Name=<IP address of UCS> `nPort=443 'nNoSsl=False"
#AutoGeneratedDSCConfig -UcsConnectionString $connectionString
In this example <IP address of node> will the address of my intermediate Windows Server and <IP address of UCS> the IP address of my UCSM.
I'm looking forward to your answer.
Kind regards,
Stephan
01-10-2017 12:34 AM
Hi Stephan,
Yes your understanding is correct. Intermediate server will receive the MOF file and then applies the configuration specified in the MOF to the UCS Manager specified using the PowerTool cmdlets.
In the example you have mentioned above here is what each input refers to
<IP address of node> is the hostname/IP address of the intermediate Windows Server machine
<IP address of UCS> is where you specify the UCS Manager IP/Hostname
If there are further questions on this we can have a meeting to go through the use case.
Thanks,
Sumanth B R
01-10-2017 12:43 AM
Hello Sumanth,
Thank you for clearifiying this. Now I've got the picture.
Kind regards,
Stephan
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide