This section explains how to modify the Keswick kickstart KS.CFG to install Keswick 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 Keswick installer bundles this USB NIC fling vib in it, to boot from a USB NIC follow the below steps:

Prerequisites

Procedure

  1. Download the Keswick install media
  2. Modify ESXi kickstart KS.CFG in the root of the install media in 2 places, for %pre script section and %firstboot section.
  3. Add or modify the %pre script block section, a typical Keswick KS.CFG will not have a %pre section. Add this script block just after the reboot kickstart instruction line and before %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 vusb0
    
    # ============================================================================
    # 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 Keswick KS.CFG will have an existing %firstboot section, add the new lines after %firstboot line and before 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 vusb0
    # 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

Example:

What to do next