cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
140
Views
0
Helpful
5
Replies

boot oprder policy add PXE boot

tdubb123
Level 1
Level 1

hello

 

any idea how top add PXE boot into this policy? not sure what Slot and Interface name mean

 

 

---
- name: "Boot Order Policy for FC"
  vars:
    api_info: &api_info_fc
      api_private_key: "{{ api_private_key }}"
      api_key_id: "{{ api_key_id }}"
      api_uri: "{{ api_uri | default(omit) }}"
      validate_certs: "{{ validate_certs | default(omit) }}"
      state: "{{ state | default(omit) }}"
  block:
  -    cisco.intersight.intersight_rest_api:
          <<: *api_info_fc
          resource_path: /boot/PrecisionPolicies
          query_params:
             $filter: "Name eq '{{ fc_boot_order_policy_name }}'"
          api_body: {
            "Name": "{{ fc_boot_order_policy_name }}",
            "Description": "{{ fc_boot_order_policy_description }}",

            "Organization": {
               "Moid": "{{ intersight_org.api_response.Moid }}"
             },
            Tags: [{Key: "configmode", Value: "ansible"},{Key: "prefix", Value: "{{ prefix }}"}],

             "ConfiguredBootMode": "{{ boot_mode }}",
             "EnforceUefiSecureBoot": "{{ enable_uefi_secureboot|bool }}",
             "BootDevices": [
                {
                   "Name": "KVM-Mapped-ISO",
                   "Subtype": "kvm-mapped-dvd",
                   "Enabled": true,
                   "ObjectType": "boot.VirtualMedia"
                },
                {
                   "Name": "{{ san_boot_device_1a_name }}",
                   "Lun": "{{ lun_id }}",
                   "InterfaceName": "{{ name_of_vhba_a }}",
                   "Wwpn": "{{ san_boot_target_1a_wwpn }}",
                   "Enabled": true,
                   "ObjectType": "boot.San"
                },
                {
                   "Name": "{{ san_boot_device_2a_name }}",
                   "Lun": "{{ lun_id }}",
                   "InterfaceName": "{{ name_of_vhba_a }}",
                   "Wwpn": "{{ san_boot_target_2a_wwpn }}",
                   "Enabled": true,
                   "ObjectType": "boot.San"
                },
                {
                   "Name": "{{ san_boot_device_1b_name }}",
                   "Lun": "{{ lun_id }}",
                   "InterfaceName": "{{ name_of_vhba_b }}",
                   "Wwpn": "{{ san_boot_target_1b_wwpn }}",
                   "Enabled": true,
                   "ObjectType": "boot.San"
                },
                {
                   "Name": "{{ san_boot_device_2b_name }}",
                   "Lun": "{{ lun_id }}",
                   "InterfaceName": "{{ name_of_vhba_b }}",
                   "Wwpn": "{{ san_boot_target_2b_wwpn }}",
                   "Enabled": true,
                   "ObjectType": "boot.San"
                }
             ]

            }
       register: fc_boot_policy
  when: configure_fc == 'true'

 

  

5 Replies 5

Sandeep Kumar
Cisco Employee
Cisco Employee
For PXE Boot, you need to add the following under BootDevices:
        {
            "Name": "demo",
            "IpType": "IPv4",
            "Slot": "MLOM",
            "InterfaceName": "eth0",
            "Enabled": true,
            "ObjectType": "boot.Pxe",
            "InterfaceSource": "name",
            "Port": -1
        }
 
You can find the Slot ID value under your Server > Inventory > Network Adapters, when you select the Adapter, you will find a parameter "Connection" where you can see the Slot value. 
Slot:  The slot ID of the adapter on which the underlying virtual ethernet interface is present. Supported values are ( 1 - 255, "MLOM", "L", "L1", "L2", "OCP").
 
Interface Name: The name of the underlying virtual ethernet interface used by the PXE boot device.  You will find the vNIC name under your LAN Connectivity Policy. 
 

hi

but currently i dont have any servers yet. only policies and templates

also what is INterfaceSource?

InterfaceSource value is based on what option you have selected: Interface Name or Port or MAC Address under PXE Boot device

For Interface Name, the value is "name"

For Port, the value is "port"

For MAC Address, the value is "mac" 

Sandeep Kumar
Cisco Employee
Cisco Employee

For now, you can set it to MLOM and once you have the Servers, you can identify the Slot ID and update it accordingly.