cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3459
Views
0
Helpful
4
Replies

Desired State Configuration

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

1 Accepted Solution

Accepted Solutions

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

View solution in original post

4 Replies 4

sumbr
Level 4
Level 4

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

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

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

Hello Sumanth,

Thank you for clearifiying this. Now I've got the picture.

Kind regards,

Stephan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Cisco UCS X-Series Energy Efficiency Offer