This section explains how to modify the VMware Edge Cloud Orchestrator kickstart ks.cfg to install VMware Edge Cloud Orchestrator on a machine that has a USB NIC (of a chipset supported by ESXi USB NIC Fling) only, no internal supported NIC is installed in the machine.

ESXi supports various on-board or PCI/PCIe slotted NICs by bundling drivers for them in the base image (for example, Intel NICs), however ESXi does not support USB plugged NICs of a certain chip sets that are popular in consumer market (for example, RealTek systems).

There is, however, a VMware Fling that adds native driver support for some of the chipset: USB Network Native Driver for ESXi. The VMware Edge Cloud Orchestrator installer bundles this USB NIC fling VIB in it. To boot the host from a USB NIC, follow the these steps:

Prerequisites

Procedure

  1. Download the VMware Edge Cloud Orchestrator install media.
  2. Modify ESXi kickstart ks.cfg in the root of the install media at two places - for %pre script section and %firstboot section.
  3. Add or modify the %pre script block section, a typical VMware Edge Cloud Orchestrator ks.cfg does not have a %pre section. Add the following script block after the reboot kickstart instruction line and before the %post script section.
    %pre --interpreter=busybox
    # ============================================================================
    # PRE_INSTALL section start:
    # ============================================================================
    
    # Installer env: Configure USB NIC device for Management Network portgroup of
    # vSwitch0. Create a standard switch and mgmt network portgroup (since they will
    # not get created automatically due to lack of supported nic).
    # NOTE: Following config assumes DHCP usage for ESXi, if using static IP for
    # the network config (e.g. management portgroup network), need changes to
    # following section.
    # - Create a standard vSwitch and management network portgroup.
    /bin/esxcfg-vswitch --add vSwitch0
    /bin/esxcfg-vswitch --add-pg="Management Network" vSwitch0
    /bin/esxcfg-vswitch --link=vusb0 vSwitch0
    /bin/esxcfg-vswitch --add-pg-uplink=vusb0 --pg="Management Network" vSwitch0
    # - Create a vmknic wiring up above vswitch/pg/pnic.
    /bin/esxcfg-vmknic --add --ip=DHCP --portgroup="Management Network"
    # esxcli is not available in pre-install env, use localcli instead of esxcli
    /bin/localcli network ip interface ipv4 set --peer-dns=true -i vmk0
    
    # ============================================================================
    # PRE_INSTALL section end
    # ============================================================================
    

    An example of this is as follows:

    Figure 1. Example %Pre Section of ks.cfg
  4. Modify the %firstboot script block section, a typical VMware Edge Cloud Orchestrator ks.cfg has an existing %firstboot section. Add the new lines after %firstboot line and before the existing first line of that section.
    # -- USB-NIC-NETCOFNFIG start:
    # Configure USB NIC device for Management Network portgroup of vSwitch0
    # (this step is needed because the default network stack config creation
    # functionality - responsible for setting up this config during boot/jumpstart,
    # does not get triggered for USB NIC vusbN devices, only gets triggered for
    # vmkN devices).
    # NOTE: Following config assumes DHCP usage for ESXi, if using static IP for
    # the network config (e.g. management portgroup network), need changes to
    # following section.
    
    echo "Current networking state"
    /bin/esxcfg-vswitch -l
    /bin/esxcfg-vmknic -l
    /bin/cat /etc/resolv.conf
    
    echo "Reset networking"
    /bin/esxcfg-vmknic --del --portgroup "Management Network"
    /bin/esxcfg-vswitch --del-pg="Management Network" vSwitch0
    /bin/esxcfg-vswitch --delete vSwitch0
    
    echo "Create vswitch and pgs, add vswitch pg uplink"
    /bin/esxcfg-vswitch --add vSwitch0
    /bin/esxcfg-vswitch --link=vusb0 vSwitch0
    /bin/esxcfg-vswitch --add-pg="Management Network" vSwitch0
    /bin/esxcfg-vswitch --add-pg="VM Network" vSwitch0
    /bin/esxcfg-vswitch --add-pg-uplink=vusb0 --pg="Management Network" vSwitch0
    /bin/esxcfg-vswitch --add-pg-uplink=vusb0 --pg="VM Network" vSwitch0
    # Using DHCP:
    /bin/esxcfg-vmknic --add --ip=DHCP --portgroup="Management Network"
    /bin/localcli network ip interface ipv4 set --peer-dns=true -i vmk0
    # Restart infravisor (it might have started before DHCP DNS config was set).
    /etc/init.d/infravisor stop
    /bin/crx-cli kill -f -i infravisor-pod
    /etc/init.d/infravisor start
    
    echo "New networking state"
    /bin/esxcfg-vswitch -l
    /bin/esxcfg-vmknic -l
    /bin/cat /etc/resolv.conf
    
    echo "Enable full USB NIC scan for subsequent reboots"
    localcli system module parameters set -p "usbBusFullScanOnBootEnabled=1" -m vmkusb_nic_fling
    
    # -- USB-NIC-NETCOFNFIG end
    

    An example of this is shown below:

    Figure 2. Example %firstboot Section of ks.cfg