PXE Boot

Overview

Morpheus includes a built in PXE Server to enable easy and rapid bare metal provisioning.

Prerequisites

  • DHCP server with following config added to dhcpd.conf
allow booting;
allow bootp;
option option-128 code 128 = string;
option option-129 code 129 = text;
next-server morpheus-appliance-ip;
filename "pxelinux.0";

Note

Replace morpheus-appliance-ip in the dhcpd.conf file with your Morpheus appliance IP address.

  • Internal Appliance URL (PXE) set in Administration - Settings. For PXE-Boot your appliance needs to be routable directly with minimal NAT masquerading. This allows one to override the default appliance url endpoint for use by the PXE Server. If this is unset, the default appliance url will be used instead.
  • Mac or IP addresses of PXE target mapped in {morpheus} Infrastructure -> Boot - Mapping
  • Target host configured for Network boot in BIOS

Note

On the Morpheus Appliance, PXE is enabled by default and port 69 is forwarded to the Internal PXE port 6969. These settings are configurable in in the pxe: section of /opt/morpheus/conf/application.yml.

Mapping

Add Mapping

  1. Select the Mapping tab then click the Add Mapping button.

  2. From the New Mapping Wizard input the following information:

    Match Pattern

    Mac address separated by ‘:’ or an ip address filter

    Description(optional)

    Description of the new mapping.

    Active

    Flag to denote the mapping as active or disabled.

    Operating System

    List of operating systems for the mapping.

    Boot Image

    Lists available PXE boot images.

    Answer File

    Lists available answer files.

    Cloud

    Lists the available clouds.

    Server Mode

    List of server modes:: unmanaged, Managed, Bare metal host, Container host, VM host, and Container & VM host.

  3. Save

Once the mapping is added, and the target host is powered on, the {morpheus} PXE menu will load and PXE boot will start.

Edit Mapping

  1. Click the edit icon on the row of the mapping you wish to edit.
  2. Modify information as needed.
  3. Click the Save Changes button to save.

Delete Mapping

  1. Click the delete icon on the row of the mapping you wish to delete.

Answer Files

Answer files are like lists of answers for questions that you know the setup program is going to ask but the user is not prepared to answer. They contain one or more sections, and each section contains one or more properties in the form name=value. Morpheus provides Answer Files for ESXi, CentOS, Ubuntu and XenServer, and user can add their own.

Add Answer Files

  1. Click the Infrastructure link in the navigation bar.

  2. Click the Boot link in the sub navigation bar

  3. Select the Answer Files tab then click the Add Answer File button.

  4. From the New Answer File Wizard input the following information

    Name

    Name of the answer file.

    Description(optional)

    Description of the new answer file.

    Active

    Flag to denote the mapping as active or disabled.

    Script Name

    Name of the new answer file.

    Script Version

    Version of the new answer file.

    Script

    The script for the new answer file.

  5. Save

Edit Answer File

  1. Click the Infrastructure link in the navigation bar.
  2. Click the Boot link in the sub navigation bar
  3. Select the Answer Files tab
  4. Click the edit icon on the row of the answer file you wish to edit.
  5. Modify information as needed.
  6. Save Changes

Delete Answer File

  1. Click the Infrastructure link in the navigation bar.
  2. Click the Boot link in the sub navigation bar
  3. Select the Answer Files tab.
  4. Click the delete icon on the row of the answer file you wish to delete.

Images

Morpheus provides Images for ESXi, CentOS, Ubuntu and XenServer, and user can add their own Images.

Add Images

  1. Click the Infrastructure link in the navigation bar.

  2. Click the Boot link in the sub navigation bar

  3. Select the Images tab then click the Add Image button.

  4. From the Upload Virtual Image Wizard input the following information

    Name

    Name of the Image.

    Operating System

    List of available operating systems.

    MENU
    Paste in PXE Menu

    Example PXE 6.5.0 Menu:

    Important

    Ensure the case of file references match actual file names.

    DEFAULT vesamenu.c32
    TIMEOUT 300
    ONTIMEOUT esxi
    PROMPT 0
    MENU INCLUDE pxelinux.cfg/pxe.conf
    NO ESCAPE 1
    LABEL local
      menu LABEL Boot to local disk
      localboot 0
      TEXT HELP
      Boot to local hard disk
      ENDTEXT
    LABEL esxi
      menu LABEL ESXI 6.5.0 u1
      kernel tftp://${bootUrl}/image/${imageId}/MBOOT.C32
      append -c tftp://${bootUrl}/image/${imageId}/BOOT.CFG ks=${answerFile}
      TEXT HELP
        Boot the ESXI 6.5.0 u1 install
      ENDTEXT
    MENU END
    
    Bucket

    Select Bucket or File Share where PXE Image files exist

    Image Path

    Path of the image relative to the selected Bucket or Storage Provider

  5. Save Changes

Edit Image

  1. Click the Infrastructure link in the navigation bar.
  2. Click the Boot link in the sub navigation bar
  3. Select the Images tab
  4. Click the actions drop down and select edit.
  5. Modify information as needed.
  6. Click the Save Changes button to save.

Remove Image

  1. Click the Infrastructure link in the navigation bar.
  2. Click the Boot link in the sub navigation bar.
  3. Select the Image tab.
  4. Click the Actions drop and select Remove.

Adding ESXi 6.5 PXE Image

When adding a PXE Image for ESXi 6.5, a few requirements must be met for a successful PXE Boot:

  • Image/iso must be expanded and added to a Bucket or File Share in Morpheus
  • The ESXi BOOT.CFG needs to be edited to be PXE compatible:
    • The ESXi BOOT.CFG uses lowercase file references, while the actual file names are CAPS. Change all file reference names to CAPS.
    • The ESXi BOOT.CFG references empty files, which while cause PXE checksum failures, and the file references need to be removed.
    • The ESXi BOOT.CFG has /’s in front of all filenames that need to be removed

Create ESXi 6.5 PXE Image

  1. Extract ESXi 6.5 iso file

  2. Update BOOT.CFG file.

    1. Delete jumpstrt.gz, useropts.gz, and features.gz references. - These are blank by default and cause PXE checksum to fail
    2. Change file references to ALL CAPS to match file names.
    3. Remove /’s in front of file references in BOOT.CFG - example: sed -i 's/\///g' BOOT.CFG

    Example updated BOOT.CFG

    bootstate=0
    title=Loading ESXi installer
    timeout=5
    kernel=TBOOT.B00
    kernelopt=runweasel
    MODULES=B.B00 --- K.B00 --- CHARDEVS.B00 --- A.B00 --- USER.B00 --- UC_INTEL.B00 --- UC_AMD.B00 --- SB.V00 --- S.V00 --- ATA_LIBA.V00 --- ATA_PATA.V00 --- ATA_PATA.V01 --- ATA_PATA.V02 --- ATA_PATA.V03 --- ATA_PATA.V04 --- ATA_PATA.V05 --- ATA_PATA.V06 --- ATA_PATA.V07 --- BLOCK_CC.V00 --- CHAR_RAN.V00 --- EHCI_EHC.V00 --- ELXNET.V00 --- HID_HID.V00 --- I40EN.V00 --- IGBN.V00 --- IMA_QLA4.V00 --- IPMI_IPM.V00 --- IPMI_IPM.V01 --- IPMI_IPM.V02 --- IXGBEN.V00 --- LPFC.V00 --- LSI_MR3.V00 --- LSI_MSGP.V00 --- LSI_MSGP.V01 --- MISC_CNI.V00 --- MISC_DRI.V00 --- MTIP32XX.V00 --- NE1000.V00 --- NENIC.V00 --- NET_BNX2.V00 --- NET_BNX2.V01 --- NET_CDC_.V00 --- NET_CNIC.V00 --- NET_E100.V00 --- NET_E100.V01 --- NET_ENIC.V00 --- NET_FCOE.V00 --- NET_FORC.V00 --- NET_IGB.V00 --- NET_IXGB.V00 --- NET_LIBF.V00 --- NET_MLX4.V00 --- NET_MLX4.V01 --- NET_NX_N.V00 --- NET_TG3.V00 --- NET_USBN.V00 --- NET_VMXN.V00 --- NHPSA.V00 --- NMLX4_CO.V00 --- NMLX4_EN.V00 --- NMLX4_RD.V00 --- NMLX5_CO.V00 --- NTG3.V00 --- NVME.V00 --- NVMXNET3.V00 --- OHCI_USB.V00 --- PVSCSI.V00 --- QEDENTV.V00 --- QFLE3.V00 --- QFLGE.V00 --- QLNATIVE.V00 --- SATA_AHC.V00 --- SATA_ATA.V00 --- SATA_SAT.V00 --- SATA_SAT.V01 --- SATA_SAT.V02 --- SATA_SAT.V03 --- SATA_SAT.V04 --- SCSI_AAC.V00 --- SCSI_ADP.V00 --- SCSI_AIC.V00 --- SCSI_BNX.V00 --- SCSI_BNX.V01 --- SCSI_FNI.V00 --- SCSI_HPS.V00 --- SCSI_IPS.V00 --- SCSI_ISC.V00 --- SCSI_LIB.V00 --- SCSI_MEG.V00 --- SCSI_MEG.V01 --- SCSI_MEG.V02 --- SCSI_MPT.V00 --- SCSI_MPT.V01 --- SCSI_MPT.V02 --- SCSI_QLA.V00 --- SHIM_ISC.V00 --- SHIM_ISC.V01 --- SHIM_LIB.V00 --- SHIM_LIB.V01 --- SHIM_LIB.V02 --- SHIM_LIB.V03 --- SHIM_LIB.V04 --- SHIM_LIB.V05 --- SHIM_VMK.V00 --- SHIM_VMK.V01 --- SHIM_VMK.V02 --- UHCI_USB.V00 --- USB_STOR.V00 --- USBCORE_.V00 --- VMKATA.V00 --- VMKPLEXE.V00 --- VMKUSB.V00 --- VMW_AHCI.V00 --- XHCI_XHC.V00 --- EMULEX_E.V00 --- WEASELIN.T00 --- ESX_DVFI.V00 --- ESX_UI.V00 --- LSU_HP_H.V00 --- LSU_LSI_.V00 --- LSU_LSI_.V01 --- LSU_LSI_.V02 --- LSU_LSI_.V03 --- NATIVE_M.V00 --- RSTE.V00 --- VMWARE_E.V00 --- VSAN.V00 --- VSANHEAL.V00 --- VSANMGMT.V00 --- TOOLS.T00 --- XORG.V00 --- IMGDB.TGZ --- IMGPAYLD.TGZ
    BUILD=
    updated=0
    
  3. Add expanded iso contents to Morpheus Bucket or File share.

    The iso contents can be added to the bucket/file share form morpheus, or already exist in the bucket/file share.

    1. Navigate to Infrastructure -> Storage

    2. Select Bucket or File Share Tab

    3. Select target Bucket or File Share

      1. If a bucket or File Share does not exist, select + ADD to create one.
    4. If the iso contents are already in the file share/bucket, skip to next step

      1. To add 6.5 iso contents, click + ADD and drag the expanded ESXi ISO folder to the upload modal
      2. One call files have been uploaded, select DONE
    5. Note the path to the ESXi 6.5 files, relative to the bucket/file share.

      • For example, the screenshot below shows an iso expanded into a folder called VMware-6.5.0 which was added to pxe-images folder inside morpheus-ui local images local file share. The path to the files from the file share is /pxe-images/VMware-6.5.0/
      ../../_images/ESXi650fileshare.png
    6. The Bucket or File Share and path to the iso files will be used when adding a PXE image.

  4. Create PXE Image

    1. Navigate to Infrastructure -> Boot

    2. Select Images tab

    3. Select + ADD IMAGE

    4. Populate the following:

      NAME

      Name of the Image in Morpheus

      OPERATING SYSTEM

      Select esxi 6

      MINIMUM MEMORY

      n/a leave default 0

      MENU

      Paste in the PXE Menu, an example PXE 6.5.0 Menu is below:

      Important

      Ensure the case of file references match actual file names.

      DEFAULT vesamenu.c32
      TIMEOUT 300
      ONTIMEOUT esxi
      PROMPT 0
      MENU INCLUDE pxelinux.cfg/pxe.conf
      NO ESCAPE 1
      LABEL local
        menu LABEL Boot to local disk
        localboot 0
        TEXT HELP
        Boot to local hard disk
        ENDTEXT
      LABEL esxi
        menu LABEL ESXI 6.5.0 u1
        kernel tftp://${bootUrl}/image/${imageId}/MBOOT.C32
        append -c tftp://${bootUrl}/image/${imageId}/BOOT.CFG ks=${answerFile}
        TEXT HELP
          Boot the ESXI 6.5.0 u1 install
        ENDTEXT
      MENU END
      
      BUCKET

      Select the Bucket or File Share from step 2.3

      CLOUD-INIT USER DATA

      N/A

      IMAGE PATH

      Enter the path to the iso files relative to the Bucket or File Share, eg /pxe-images/VMware-6.5.0/

    5. Select SAVE CHANGES

Your ESXi 6.5 PXE image is now ready to be added to a mapping.