cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1019
Views
1
Helpful
0
Comments
markpsmi
Cisco Employee
Cisco Employee

Attached workflow uses UCS Central Tasks to provision bare metal server with CentOS 7.3 and 2 Management NICs. Each with different IP addresses. Workflow creates Global Service Profile from Template and then adds PXE Nics for the PXE boot process. The PXE NICs are defined as vNIC Templates. The Global Service Profile uses Update Template so it is it's Unbound before the Add Vlans Task adds the PXE Nics.Then Global Service Profile is Rebound to the Template after PXE process so the Management NICs can use the native vlans. Included in the zip file for the workflow is also the ks.cfg and pxe.cfg files.

The IP configuration is done with variables in the Workflow that update in the ks.cfg. See lines below from the kickstart script (ks.cfg).

%post

## Notifying back to Cisco UCS Director once the blade is up ##

wget http://$PXE_WEBSERVER/$PXEID/notify.html

# Configure IP on ETH0

echo DEVICE=eth0 > /etc/sysconfig/network-scripts/ifcfg-eth0

echo HWADDR=$HWADDR1 >> /etc/sysconfig/network-scripts/ifcfg-eth0

echo BOOTPROTO=static >> /etc/sysconfig/network-scripts/ifcfg-eth0

echo ONBOOT=yes >> /etc/sysconfig/network-scripts/ifcfg-eth0

echo IPADDR=$PXE_IP >> /etc/sysconfig/network-scripts/ifcfg-eth0

echo NETMASK=$PXE_NETMASK >> /etc/sysconfig/network-scripts/ifcfg-eth0

echo GATEWAY=$PXE_GATEWAY >> /etc/sysconfig/network-scripts/ifcfg-eth0

echo DNS1=$PXE_NS >> /etc/sysconfig/network-scripts/ifcfg-eth0

# Configure IP on ETH1

echo DEVICE=eth1 > /etc/sysconfig/network-scripts/ifcfg-eth1

#echo HWADDR=$HWADDR2 >> /etc/sysconfig/network-scripts/ifcfg-eth1

echo BOOTPROTO=static >> /etc/sysconfig/network-scripts/ifcfg-eth1

echo ONBOOT=yes >> /etc/sysconfig/network-scripts/ifcfg-eth1

echo IPADDR=$NET_PXE_IP2 >> /etc/sysconfig/network-scripts/ifcfg-eth1

echo NETMASK=$NET_PXE_NETMASK2 >> /etc/sysconfig/network-scripts/ifcfg-eth1

# Configure Hostname

echo NETWORKING=yes > /etc/sysconfig/network

echo HOSTNAME=$PXE_NAME >> /etc/sysconfig/network

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:

Quick Links

Review Cisco Networking for a $25 gift card