Adding and Configuring PXE Boot Requests

This chapter contains the following sections:

Setup and Configuration for PXE Boot Requests

You can use Cisco UCS Director Baremetal Agent (Baremetal Agent) to create and send a request through the DHCP server for a PXE boot for a specified operating system (OS).

Before you can create and send a PXE boot request, the OS image that you want to use in a given PXE boot request must be configured correctly and be available in Baremetal Agent. If the OS image that you want to PXE boot is not listed as an available OS type, you must first create the OS image template in Baremetal Agent,


Note


Although you can perform all the OS image setup procedures manually, we recommend that you use Baremetal Agent to set up your OS images.


You can also automate one or more PXE boot requests with workflow tasks in the Cisco UCS Director Workflow Designer. For more information, see Orchestration Workflow Tasks for PXE Boot.

PXE Boot States

The following are the PXE boot states for PXE boot requests in Cisco UCS Director:

  • Submitted—The PXE boot request has been submitted to Cisco UCS Director.

  • Environment Setup—A Submitted PXE boot request has been transferred to Baremetal Agent and that the environment required to perform a PXE boot is ready in Baremetal Agent.

  • In Progress—The baremetal server has communicated with Baremetal Agent and the PXE configuration files and image files are being downloaded.

  • Ready—The PXE boot process is complete. The server has booted with the newly installed operating system and Baremetal Agent received a success notification from the server that it is ready.

  • Failed—The PXE boot process started, but Baremetal Agent did not receive a success notification from the server after the defined wait period expired.

  • Archived—The PXE Request task included a rollback or delete.

Creating a Non-Windows Operating System Image in Baremetal Agent

This procedure creates a Non-Windows OS image template in Baremetal Agent. You must add the OS image template before you can request a PXE boot for the OS image.


Note


You cannot use this procedure to create supported Windows operating systems images. For more information about how to set up Windows OS images, see Adding Windows Operating System Images.


Before You Begin

You must have all resources and requirements in place for each operating system image that you want to install through a Baremetal Agent PXE boot request.

Procedure
    Step 1   Copy the OS image(s) to one of the following locations:
    • An appropriate location in the Baremetal Agent directory structure
    • An NFS mount point that you have added to Baremetal Agent
    Step 2   Navigate to /opt/infra and run isoExtractor.sh.

    Example:

    The following sample isoExtractor.sh file shows a scenario for an OS image in the Baremetal Agent directory structure. The image path field contains the location of the VMware image in the /opt/image/ folder.

    If you have added an NFS mount point, the image path field would contain the location of the image in the /mnt/external folder. For example, if you want to create a CentOS image that is located in a CentOS folder in an NFS mount point, the image path field would contain /mnt/external/CentOS/image.iso.

    root@localhost infra]# pwd
    /opt/infra
    root@localhost infra]# ./isoExtractor.sh
         Please select the OS Type
    
            1)  ESXi 4.1
            2)  ESXi 5.0
            3)  ESXi 5.1
            4)  ESXi 5.5
            5)  ESXi 6.0
            6)  ESXi 5.5 VSAN
            7)  ESXi 6.0 VSAN
            8)  CentOS or RHEL [Pre 7.0]
            9)  CentOS 7.x or RHEL 7.x
            10)  SUSE Linux
            11)  Other
    
    
           SELECT> 4
         Image path : /opt/image/VMWare-VMvisor-Installer-5.5.0-1111111.x86_64.iso
         
         OS catalog name : BMA-184-ESXi5.5
    Input file being used: /opt/images/VMware-VMvisor-Installer-5.5.0-1111111.x86_64.iso
    OS catalog name being used: BMA-184-ESXi5.5
    Mounting the image....
    Preparing the image....
    Creating catalog directory /opt/cnsaroot/templates/BMA-184-ESXi5.5
    Creating configuration files for ESXi 5.5 ...
    Copied the image and created the configuration files...
    is /opt/cnsaroot/images/
    BMA-184-ESXi5.5 centos60-small
    is /opt/cnsaroot/templates/
    BMA-184-ESXi5.5 CentOS60 Win2k12R2x64 Win2k12x64 Win2k8R2x64 
    is /opt/cnsaroot/templates/BMA-184-ESXi5.5
    boot.cfg ks.cfg pxe.cfg
    [root@localhost infra]#
    
    
    Step 3   When prompted, choose the image category and provide the image location and catalog name.
    Step 4   After the script execution is completed, navigate to /opt/cnsaroot/images/catalogname and confirm that the image is available in that location.
    Step 5   Navigate to /opt/cnsaroot/templates/catalogname and confirm that the PXE configuration templates are available in that location.
    Step 6   To verify that the OS image is created, do the following:
    1. In Cisco UCS Director, choose Physical > Compute.
    2. In the left pane, navigate to the pod that contains the Baremetal Agent.
    3. In the right pane, click the PXE Boot Requests tab.
    4. Click Add PXE Boot Request and verify that the OS image is included in the OS Type drop-down list.

    Injecting Drivers When Installing RHEL 7 or CentOS 7 on UCS Modular Servers

    When you install RHEL 7 or CentOS 7 on the UCS servers, manually inject drivers through the PXE.cfg file. The PXE.cfg file is available in the following location: /opt/cnsaroot/templates/(RHEL 7/CentOS 7 OS Catalog name).

    The default PXE.cfg file contains the following line:
    append initrd=images/(RHEL 7/CentOS 7 OS Catalog name)/isolinux/initrd.img ramdisk_size=9216 noapic acpi=off ip=dhcp ks=$PXE_KS_URL 
    ksdevice= inst.repo=http://$PXE_NATIVE_WEBSERVER/(RHEL 7/CentOS 7 OS Catalog name) net.ifnames=0 biosdevname=0
    

    Note


    Here RHEL 7/CentOS 7 OS Catalog name is the name of the OS image provided in the ISO extractor script while creating the RHEL 7 or CentOS 7 OS image template in Baremetal Agent.


    To inject the drivers, update the location of the drivers in the PXE.cfg file by updating the line as shown below:
    append initrd=images/(RHEL 7/CentOS 7 OS Catalog name)/isolinux/initrd.img ramdisk_size=9216 noapic acpi=off ip=dhcp ks=$PXE_KS_URL 
    ksdevice= inst.repo=http://$PXE_NATIVE_WEBSERVER/(RHEL 7/CentOS 7 OS Catalog name) inst.dd=http://$PXE_NATIVE_WEBSERVER/ 
    (RHEL 7/CentOS 7 OS Catalog name )/(name of the driver disk) net.ifnames=0 biosdevname=0
    

    The driver disk should be in the ISO image format and placed in the following location: /opt/cnsa/images/(RHEL 7/CentOS 7 OS Catalog name)/


    Note


    • Download the driver ISO image from the UCS Servers download page on the Cisco website.

    • The parameter inst.dd helps load the driver images during PXE install.


    Creating a PXE Boot Request in Cisco UCS Director

    Before You Begin

    Create the OS image template that you want to use for the PXE boot in Baremetal Agent.

    Procedure
      Step 1   On the menu bar, choose Physical > Compute.
      Step 2   In the left pane, navigate to the pod for which you want to set up the PXE boot request.
      Step 3   In the right pane, click the PXE Boot Requests tab.
      Step 4   Click Add PXE Request.
      Step 5   In the Add PXE Boot Request dialog box, complete the following fields:
      Name Description

      Server MAC Address field

      The MAC address of the server that requires the PXE installation.

      Host Name field

      The hostname to be assigned to the server after the PXE installation process is complete.

      Root Password field

      The password that you want to assign to the root user on the server. You need to re-enter this password in the next field to confirm it.

      Note   

      Apply your organization's guidelines for maintaining the security of this password.

      PXE Request for Windows check box

      Check this check box if the PXE boot request is for a Windows OS.

      After you check this check box, a set of Windows-specific fields appears in this dialog box.

      OS Type drop-down list

      Choose the OS image that you want this PXE boot request to install on the server. The drop-down list includes all OS image templates that have been created and are available for PXE installation.

      This drop-down list displays in a different location in the dialog box, depending upon whether you check the PXE Request for Windows check box.

      Management VLAN field

      (Optional) The VLAN ID that you want to assign to the management interface on the server after the PXE installation process is complete.

      This setting is used in ESX/ESXi deployments where VLAN tagging is implemented on the virtual switch. It sets the VLAN ID for tagging on the management vmkernel port.

      OS Flavor Name field

      (Required for a Windows OS only) The flavor name is required for successful PXE boot of a Windows Server image. You must enter the exact character string used by Windows PE (WinPE). This string is case sensitive. For example, enter SERVERSTANDARD or SERVERENTERPRISE. For more information, see Determining the Windows OS Flavor Name.

      This value is used in the Windows answer file, which requires the correct name of the edition for the image installation process. The OS flavor name might be different for each type of Windows OS image.

      Organization Name field

      (Required for a Windows OS only) The name of the organization that is associated with the OS product key.

      This value is used by the Windows answer file. It could be a division within your company or the company name.

      Product Key field

      (Required for a Windows OS only) The product key (sometimes called the license key or software key) for the OS.

      Timezone drop-down list

      Choose the time zone in which you want to configure the server.

      Disk Partition Size (GB) field

      (Required for a Windows OS only) The size, in GB, of the partition designated for the OS.

      Additional Parameters interface

      Interface to add, edit, or delete single-line parameters that are used additionally for the PXE boot request. You can add multiple parameters using this interface.

      To add a parameter, click (+). In the Add Additional Parameter box that appears, enter the parameter name and the value for the parameter. Use the Edit button to modify the parameter name or its value. Use the Delete button to delete a parameter.

      For example, for a Windows OS, you can use parameters to provide the minimum requirements for the Windows answer file. You can define parameters and their values to enhance the answer file to meet the requirements of your environment. These parameters are updated with the appropriate values in the Answer file template.

      The answer file templates used by Baremetal Agent are available in the following locations:

      • Windows 2012 R2 x64—/opt/cnsaroot/templates/Win2k12R2x64/autounattend.xml

      • Windows 2012 x64—/opt/cnsaroot/templates/Win2k12x64/autounattend.xml

      • Windows 2008 R2 x64—/opt/cnsaroot/templates/Win2k8R2x64/autounattend.xml

      Server IP Address field

      The static IP address that you want to assign to the server. This IP address is given to the server after the PXE installation process is complete, and is the final IP address for the server.

      This IP address can be on a different network or subnet than the PXE network or Management network that you configured for Baremetal Agent.

      Network Mask field

      The subnet mask that you want to assign to the server after the PXE installation process is complete.

      Gateway field

      The default gateway IP address that you want to assign to the server after the PXE installation process is complete.

      Server Name Server field

      The DNS server that you want the server to use.

      If no DNS server is required, leave this field blank.

      Target BMA drop-down list

      Choose the Baremetal Agent that you want to use for this PXE boot request. The Baremetal Agent that you choose determines which OS images are available for the PXE boot request.

      Step 6   Click Submit.

      Information about the new PXE Boot Request will appear as a new row in the PXE Boot Request tab, displaying the ID assigned to this request. The information includes the current Status of this request.

      What to Do Next

      After the PXE boot request is in the Submitted state, you must set up the PXE environment to create the Cisco UCS Director configuration files. You can activate a PXE boot request that has a status of Submitted by selecting it and clicking Setup PXE Environment.

      Adding an NFS Mount Point

      Procedure
        Step 1   On the menu bar, choose Administration > Physical Accounts.
        Step 2   Click the Bare Metal Agents tab.
        Step 3   Click the row for the Baremetal Agent account for which you want to view PXE service requests.
        Step 4   Click View Details.
        Step 5   Click the NFS Mount Point tab.
        Step 6   Click Add.
        Step 7   In the Add NFS Mount Point dialog box, do the following:
        1. In the NFS Server IP Address field, enter the IP address of the NFS server where you plan to store the OS images for Baremetal Agent to use.
        2. In the NFS Server Path field, enter the location on the NFS server where the OS images are stored.
        3. Click Submit.

        After you add the NFS mount point, all content in the imageRepository folder in the NFS server is available under the /mnt/external folder. You include this path in the isoExtractor.sh file when you create a non-Windows image template.


        Determining the Windows OS Flavor Name

        The flavor name is required for successful PXE boot of a Windows Server image. You must enter the exact character string used by Windows PE (WinPE). This string is case sensitive. The OS flavor name follows a consistent naming convention. Some examples of OS flavor names are as follows:

        Windows Server 2008 R2 SERVERSTANDARD
        Windows Server 2008 R2 SERVERSTANDARDCORE
        Windows Server 2008 R2 SERVERENTERPRISE
        Windows Server 2008 R2 SERVERENTERPRISECORE
        Windows Server 2008 R2 SERVERDATACENTER
        Windows Server 2008 R2 SERVERDATACENTERCORE
        Windows Server 2008 R2 SERVERWEB
        Windows Server 2008 R2 SERVERWEBCORE
        Windows Server 2012 SERVERSTANDARD
        Windows Server 2012 SERVERSTANDARDCORE
        Windows Server 2012 R2 SERVERSTANDARD
        Windows Server 2012 R2 SERVERSTANDARDCORE
        Windows Server 2012 R2 SERVERDATACENTER
        Windows Server 2012 R2 SERVERDATACENTERCORE
        
        Procedure
          Step 1   Navigate to the extracted ISO files for the Windows OS image.
          Step 2   For a Windows 2012 R2 image, navigate to C:\win2k12r2\sources\install.wim and use a PowerShell cmdlet to find the flavor name.

          An example of the use of this cmdlet is as follows:

           
          PS C:\Windows\system32> Get-WindowsImage -ImagePath 
          C:\win2k12r2\sources\install.wim
          Index       : 1
          Name        : Windows Server 2012 R2 SERVERSTANDARDCORE
          Description : Windows Server 2012 R2 SERVERSTANDARDCORE
          Size        : 6,653,342,051 bytes
          Index       : 2
          Name        : Windows Server 2012 R2 SERVERSTANDARD
          Description : Windows Server 2012 R2 SERVERSTANDARD
          Size        : 11,807,528,410 bytes
          Index       : 3
          Name        : Windows Server 2012 R2 SERVERDATACENTERCORE
          Description : Windows Server 2012 R2 SERVERDATACENTERCORE
          Size        : 6,653,031,430 bytes
          <etcetera>
           
          Step 3   For a Windows 2008 image, use the DISM.EXE syntax from the machine on which you installed the WAIK tools.

          An example of the use of this syntax is as follows:

           
          C:\Program Files\Windows AIK\Tools\>dism 
          /get-wiminfo /wimfile:e:\\Win2k8r2x64\sources\install.wim
          Deployment Image Servicing and Management tool
          Version: 6.1.7600.16385
          Details for image : e:\Username_Windowsbits\Win2k8r2x64\sources\install.wim
          Index : 1
          Name : Windows Server 2008 R2 SERVERSTANDARD
          Description : Windows Server 2008 R2 SERVERSTANDARD
          Size : 10,510,503,883 bytes
          Index : 2
          Name : Windows Server 2008 R2 SERVERSTANDARDCORE
          Description : Windows Server 2008 R2 SERVERSTANDARDCORE
          Size : 3,563,695,852 bytes
          <etcetera>
           

          Viewing PXE Service Requests

          You can view information about PXE requests made through a workflow that have an associated service request. You cannot view details of PXE requests that are not made through a workflow, as those requests are not associated with a service request.

          The information provided about each PXE request includes the following:

          • Service request ID

          • Request type

          • User who initiated the request

          • Name of the catalog or workflow that was used to create the request

          • Any comments provided by the user who initiated the request

          • Time of the request

          • Status of the request

          • Rollback type, if applicable

          Procedure
            Step 1   On the menu bar, choose Administration > Physical Accounts.
            Step 2   Click the Bare Metal Agents tab.
            Step 3   Click the row for the Baremetal Agent account for which you want to view PXE service requests.
            Step 4   Click View Details.
            Step 5   Click the PXE Service Requests tab.

            Viewing Operating System Images

            You can view a list of the operating system (OS) images that have been created and are available for a Baremetal Agent account.

            Procedure
              Step 1   On the menu bar, choose Administration > Physical Accounts.
              Step 2   Click the Bare Metal Agents tab.
              Step 3   Click the row for the Baremetal Agent account for which you want to view OS images.
              Step 4   Click View Details.
              Step 5   Click the BMA OS List tab.