cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4996
Views
2
Helpful
6
Replies

Change boot order in BIOS for C-Server

pknoll
Level 1
Level 1

Hello!

I am trying to Make a PS Skript to change the boot order for a C-Server (standalone).

In fact i would like to "press" F6 "automatically", so in fact change the boot order on the rackserver

I have server with usb stick on it with the boot image. Normaly the boot from RAID Controller, but when I have to set up the server newly I press F6 during the boot phase and then I choose the image on the USB Stick. This takes always a long time, waiting for the boot, pressing F6 etc.

I am tring to figure, out if I could automate this using PS IMC. I wrote code to start/stop the Rackserver, opening KVM Console etc.

What I am searing for, is the possibility to change the boot order in the Bios. I tried a few Set commands but I was not lucky..

Again: I do not have the Rack Server attached to an FI, the are standaloe Rack Servers.

Thanks for any hint!

Best regards


Paul Knoll

6 Replies 6

Greg Wilkinson
Cisco Employee
Cisco Employee

I highly recommend taking a look at our UCS Power Tool Suite page on Communities here: Cisco UCS PowerTool Suite - PowerShell Modules for Cisco UCS Manager, Cisco IMC, UCS Central

Take a look at the IMC Power Tool User Guide for various examples and how to make use of the cmdlets. A few examples of setting boot order are seen below:


Get-ImcLsbootDevPrecision -h | convertto-imccmdlet

$mo_1  = Get-ImcRackUnit -ServerId "1" | Get-ImcLsbootDevPrecision | Set-ImcLsbootDevPrecision -ConfiguredBootMode "Legacy" -Reapply "no" -RebootOnUpdate "no" -Force

Start-ImcTransaction

$mo_2  = $mo_1 | Add-ImcLsbootHdd -Name "RAID1_12" -Order 1 -State "Enabled" -Type "LOCALHDD"

$mo_3  = $mo_1 | Add-ImcLsbootVMedia -Name "CIMCDVD" -Order 2 -State "Enabled" -Type "VMEDIA"

Complete-ImcTransaction -Force

Get-ImcLsbootDevPrecision | Add-ImcLsbootHdd -Name "RAID1_12" -Order 1 -State "Enabled" -Type "LOCALHDD"

Get-ImcLsbootDevPrecision | Add-ImcLsbootVMedia -Name "CIMCDVD" -Order 2 -State "Enabled" -Type "VMEDIA"

 

Starting with an empty boot set: Get-ImcLsbootDevPrecision | Add-ImcLsbootUsb -Name USB1 -Order 1 -State enabled

**This will add the first boot device for precision boot as USB.

Thany you very much!

I wll try it

Best regards

Paul Knoll

Hi again!

I did some coding and it works good. Thank you very much!

I would have another question

Is there a way to bring up the F6 boot menu via PS when starting the server? This would be even better for my problem.

The solution you gave me does change the boot order, so I do have to change it back…

Even better would be, just to boot the server and bring up the F6 Boot Menu , always done by powershell, if there is a possibility

Starting the server is easy via PS, but bringing up the Boot Menu on the KVM Console…?

Thanks in advance!!

Paul

Hi Gregory,

Is it possible to set onetime boot device using Cisco-IMC module?

I've added PXE Boot device as below and would like to add that as one time boot device

Get-ImcLsbootDevPrecision | Add-ImcLsbootPxe -Name "VICPXE" -Order 1 -State "Enabled" -Slot 1 -Port 0

Any help would be greatly appreciated

Thanks

Sam

rrawal
Cisco Employee
Cisco Employee

Hi Sam,

You can use the below command for setting onetime boot device.

Get-ImcOneTimePrecisionBootDevice | Set-ImcOneTimePrecisionBootDevice -Device "VICPXE" -Force

Thanks,

Rishi

Thanks Rishi,

That works for our C24 M3 but not for C220 M4, both are running 3.0(4d).

On the C220 M4 it tries to boot off On Board NICs instead of the VIC eth0. Below is what I'm trying.

Get-ImcLsbootDevPrecision | Add-ImcLsbootPxe -Name "VICPXE" -Order 1 -State "Enabled" -Slot MLOM -Port 0

Get-ImcOneTimePrecisionBootDevice | Set-ImcOneTimePrecisionBootDevice -Device "VICPXE" -Force

Is there a way to change boot-device order from Get-ImcBiosbootdevPrecision?

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