cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2129
Views
6
Helpful
5
Replies

Acknowledge UCS blade using Power Tool

Arjun reddy
Level 1
Level 1

Hi,

Which of the below commands works better for automating the server acknowledge via Power Tool.

Set-UcsBlade

or

Confirm-UcsServer


what would be the exact syntax for these commands?

Thanks in advance.



5 Replies 5

joehoughes
Level 1
Level 1

You'd want to use Set-UcsBlade cmdlet with the LC parameter and specify 'rediscover'.

You could run Get-UcsBlade to get your blade object and then pipe to the Set-UcsBlade similar to this example:

     Get-UcsBlade -Chassis 1 -SlotId 1 | Set-UcsBlade -Lc rediscover

Husband, Father, Solutions Architect, Geek Extraordinaire | @AustinVMUG & @ATXPowerShell leader | vExpert | Cisco Champion | Tech Field Day Delegate | VCP 4/5/6 | VCP6-NV | VMware/Cisco UCS/Powershell/VEEAM Enthusiast

Thank you Joseph.

But it is not working, the Get command cannot get the blade details because it is not acknowledged, I also tried just the set command with -Blade parameter but it also returned error "object not found".

I would like to try the Confirm-UcsServer command, but not sure how the parameter -ManagedObject is passed. I have tried both "1/2" and "sys/chassis-1/blade-2" as input to this parameter but I get the following error "cannot convert the <1/2> value of type system.string to type cisco.ucs.core.ManagedObject". Can you help me with the exact value to be passed to this parameter or with any other commands that can be used to re-acknowledge the blade.

Hi Arjun,

Acknowledging the slot may work for you. Try this chain of Cmdlets replacing the chassis id and slot id with the correct numbers for your environment.

Get-UcsFabricChassisEp -ChassisId 6 | Get-UcsFabricComputeSlotEp -SlotId 1 | SetUcsFabricComputeSlotEp -AdminState acknowledged

This may work as it does not require the blade to be known.

Regards,

John

Sorry for the late reply Arjun, I wasn't watching the thread for a reply.

You are correct, with the blade not in an acknowledged state, the Get-UcsBlade will not return any results.

My apologies on that misinformation.  Unfortunately, the Get-UcsServer cmdlet will run into this same issue, so the Confirm-UcsServer will have the same failure of not having any accessible object being passed in the pipeline.

John is correct on the easiest way to get the slot and set the admin state to acknowledge the blade and then begin discovery.

There would be 2 methods of doing this, which would differ if this is a new blade being acknowledged/discovered versus a blade that was decommissioned and is being re-acknowledged.

If you want to follow the full path of passing the objects in the pipeline to see how the objects travel, it can be done by specifying the chassis then slot, followed by setting the state.

New blade and initial acknowledgement for discovery:

    Get-UcsFabricChassisEp -ChassisId 1 | Get-UcsFabricComputeSlotEp -SlotId 2 | Set-UcsFabricComputeSlotEp -AdminState acknowledged

Decommissioned blade that is being re-acknowledged for discovery:

    Get-UcsFabricChassisEp -ChassisId 1 | Get-UcsFabricComputeSlotEp -SlotId 2 | Set-UcsFabricComputeSlotEp -AdminState reacknowledge

If you want the shorthand of just getting/setting the slot, here's the concise method which also doesn't ask for confirmation:

Initial ack:

    Get-UcsFabricComputeSlotEp -ChassisId 1 -SlotId 2 | Set-UcsFabricComputeSlotEp -AdminState acknowledged -Force

Re-ack:

    Get-UcsFabricComputeSlotEp -ChassisId 1 -SlotId 2 | Set-UcsFabricComputeSlotEp -AdminState reacknowledge -Force

Hope this helps to explain how to pass the objects in the pipeline, since I sent you down a bad path with the Get-UcsBlade cmdlet to start.

Another way to actually see what PowerShell is doing under the covers with parameter binding is to use Trace-Command, so that would help you to determine how it is making the decisions for the the paremeter binding ByValue.

If you're interested in a deeper understanding, there is a pretty good slideshare from Manning available here:  Learn PowerShell Scripting in a Month of Lunches: use PowerShell how …

Husband, Father, Solutions Architect, Geek Extraordinaire | @AustinVMUG & @ATXPowerShell leader | vExpert | Cisco Champion | Tech Field Day Delegate | VCP 4/5/6 | VCP6-NV | VMware/Cisco UCS/Powershell/VEEAM Enthusiast

Arjun reddy
Level 1
Level 1

Hi Joseph,

Thank you so much for your reply, really appreciate that.

I have not tried this yet, as we decided to do this manually for now. But I will definitely try this and let you know.

Thanks again.

Not sure if this is the right way, but I have another question that is currently blocking one of my action items, it would be great if you could help.

Is there a command to get the hostname(servername) of a service profile?

Currently we have a service profile in UCS named as "spapp-10", but on the server itself the hostname is app

Review Cisco Networking for a $25 gift card

Review Cisco Networking for a $25 gift card