cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
898
Views
0
Helpful
2
Replies

powertool to boot from ISO

fernGO
Level 1
Level 1

Hello,

 

I'm trying to automate the install of Esxi servers in Cisco Blades, using powertools and I'm struggling to:

- attach a remote media ISO

- force the blade on next reboot to boot from the ISO

 

I'm able to achieve the first point by doing all of this:

# 1. Create Media policy

$mo = Add-UcsVmediaPolicy -Descr "Mounts Cisco Custom ISO for ESXi 7" -Name "ESXi-7-HTTP" -Ucs $ucs_connection

 

# 2. Create Media Entry and assign it to the Media policy

$mo1 = $mo | Add-UcsVmediaMountEntry -DeviceType "cdd" -ImageFileName "VMware_ESXi_7.0.2_17867351_Custom_Cisco_4.1.3_a.iso" -ImagePath "/packages" -MountProtocol "http" -RemoteIpAddress "10.10.10.10" -MappingName "Esxi7"

 

# 3. Assign Media Policy to the Service Profile

$serviceprofile | Set-UcsServiceProfile -VmediaPolicyName ESXi-7-HTTP

 

# check if t's mounted and seems it is:

$serviceprofile = Get-UcsServiceProfile -Ucs $ucs_connection |? UsrLbl -like EsxiName

Get-UcsBlade -dn $serviceprofile.PnDn -ucs $ucs_connection | Get-UcsMgmtController -LimitScope | Get-UcsCimcvmediaActualMountList | get-UcsCimcvmediaActualMountEntry

 

To force the blade on next reboot to boot from the ISO, I'm trying this:

# 1. Create boot policy to boot from CD

$BootPolicy = Add-UcsBootPolicy -Ucs $ucs_connection -Name "ESXi_Install" -ModifyPresent -EnforceVnicName yes -Org org-root

(here I assign manually the virtual media as the first boot option of this policy)

 

# 2. assign boot policy to service profile

$serviceprofile | Set-UcsServiceProfile -BootPolicyName "ESXi_Install" -force

 

Result:

When the server boots, it can't find the "cdd" or virtual media booting option

 

Any ideas what am I missing and if there is an easier way of accomplish this?

 

This seems to me a quite complex process compared to other systems like HP, where you connect to the ilo IP and then run a couple of commands to create the media point and to change the boot option. Literally 3 lines

In Cisco it seems like you have to change profile settings just to do a one off booting setting change, of course I may be wrong (and I hope I am)

 

Thanks for your help

2 Replies 2

Mark Elsen
Hall of Fame
Hall of Fame

 

              - FYIhttps://developer.cisco.com/codeexchange/github/repo/CiscoDevNet/esxi-auto-installer/

 M.



-- Let everything happen to you  
       Beauty and terror
      Just keep going    
       No feeling is final
Reiner Maria Rilke (1899)

Thanks,

 

The project looks interesting, but we're trying to have everything automated. And it looks like you have to select manually the ISO to upload.

So we have a jenkins job where it prompts basic data, like ESXi name, IP settings, etc, and a yml file that is read from the script with the custom iso to install, baseline to be applied and a few other things.

Thanks again 

 

F.

Review Cisco Networking for a $25 gift card

Review Cisco Networking for a $25 gift card