Networking NVIDIA NVOS User Manual for InfiniBand Switches

Installing a New NVOS Image

The default password for the admin account is admin. NVIDIA recommends that you change this password when you first log in. For more information, refer to Initial login.

Use ONIE to install a new NVOS image. ONIE is an open source project (equivalent to PXE on servers) that installs network operating systems (NOS) on bare metal switches.

Before you install NVOS, the switch is in one of the following states:

  1. The switch does not contain an image (the switch is only running ONIE).

  2. NVOS is already on the switch, and you use NVUE commands to reinstall NVOS or upgrade to a newer version.

The following sections describe different ways to install the NVOS image. The steps show how to install directly from ONIE (if no image is on the switch) and from NVOS (if the image is already on the switch). For additional methods to find and install the NVOS image, refer to the ONIE Design Specification.

To get into ONIE, you need to interrupt the GRUB countdown screen by pressing the "ESC" or "F4" key and choose the appropriate menu entry.

Download the NVOS image from the NVIDIA Enterprise Support Portal.

Installing the NVOS image is destructive. The installation does not save the configuration files on the switch, so copy them to a different server before you install.

In the following procedures, you can:

  • Name the NVOS image using any of the ONIE naming schemes.

  • Run the sudo onie-install -h command to show the ONIE installer options.

Install Using a DHCP/Web Server With DHCP Options

To install NVOS using a DHCP or web server with DHCP options, set up a DHCP/web server on a laptop and connect the eth0 management port of the switch to the laptop. After you connect the cable, the installation proceeds as follows:

  1. The switch boots up and requests an IP address (DHCP request).

  2. The DHCP server acknowledges and responds with DHCP option 114 and the location of the installation image.

  3. ONIE downloads the NVOS image, installs, and reboots.

    NVOS is now running.

image2022-6-7_10-32-20.png

The most common way is to send DHCP option 114 with the entire URL to the web server (this can be the same system). However, there are other ways to use DHCP even if you do not have full control over DHCP. For information on partial installer URLs and advanced DHCP options, refer to the ONIE user guide. Both articles list more supported DHCP options.

Example DHCP configuration with an ISC DHCP server:

subnet 172.0.24.0 netmask 255.255.255.0 {
  range 172.0.24.20 172.0.24.200;
  option default-url = "http://172.0.24.14/onie-installer-x86_64";
}

Example DHCP configuration with dnsmasq (static address assignment):

dhcp-host=sw4,192.168.100.14,6c:64:1a:00:03:ba,set:sw4
dhcp-option=tag:sw4,114,"http://roz.rtplab.test/onie-installer-x86_64"

If a web server is not accessible, you can use this free Apache example.

Install Using a DHCP/Web Server Without DHCP Options

Follow the steps below if you log in to the switch on a serial console (ONIE), or on the console or with SSH (Install from NVOS).

Install from ONIE

  1. Place the NVOS image in a directory on the web server.

  2. Run the onie-nos-install command:

    ONIE:/ #onie-nos-install http://10.0.1.251/path/to/nvos-amd64-25.01.0002.bin
    

Install Using a Web Server With No DHCP

Follow the steps below if you log in to the switch on a serial console (ONIE), or on the console or with SSH (Install from NVOS), but no DHCP server is available.

You need a console connection to access the switch. You cannot perform this procedure remotely.

Install from ONIE

  1. ONIE is in discovery mode. Disable discovery mode with the following command:

    onie# onie-discovery-stop
    

    On older ONIE versions, if the onie-discovery-stop command is not supported, run the following command:

    onie# /etc/init.d/discover.sh stop
    
  2. Assign a static address to eth0 with the ip addr add command:

    ONIE:/ #ip addr add 10.0.1.252/24 dev eth0
    
  3. Place the NVOS image in a directory on your web server.

  4. Run the installer manually (because there are no DHCP options):

    ONIE:/ #onie-nos-install http://10.0.1.251/path/to/nvos-install-x86_64.bin
    

Install Using FTP Without a Web Server

Follow the steps below if your laptop is on the same network as the switch eth0 interface but no DHCP server is available.

Install from ONIE

  1. Set up DHCP or static addressing for eth0. The following example assigns a static address to eth0:

    ONIE:/ #ip addr add 10.0.1.252/24 dev eth0
    
  2. If you use static addressing, disable ONIE discovery mode:

    onie# onie-discovery-stop
    

    On older ONIE versions, if the onie-discovery-stop command is not supported, run the following:

    onie# /etc/init.d/discover.sh stop
    
  3. Place the NVOS image into a TFTP or FTP directory.

  4. If you do not use DHCP options, run one of the following commands (tftp for TFTP or ftp for FTP):

    ONIE# onie-nos-install ftp://local-ftp-server/nvos-amd64-25.01.0002.bin
    ONIE# onie-nos-install tftp://local-tftp-server/nvos-amd64-25.01.0002.bin
    

Install Using a Local File

Follow the steps below to install the NVOS image from a local file.

Install from ONIE

  1. Set up DHCP or static addressing for eth0. The following example assigns a static address to eth0:

    ONIE:/ #ip addr add 10.0.1.252/24 dev eth0
    
  2. If you are using static addressing, disable ONIE discovery mode.

    onie# onie-discovery-stop
    

    On older ONIE versions, if the onie-discovery-stop command is not supported, run the following:

    onie# /etc/init.d/discover.sh stop
    
  3. Use scp (secure copy protocol) to copy the NVOS image to the switch.

  4. Run the installer manually from ONIE:

    ONIE:/ #onie-nos-install /path/to/local/file/nvos-amd64-25.01.0002.bin
    

Install from NVOS

  1. Fetch the NVOS image on the switch.

    admin@nvos:~$ nv action fetch system image scp://<username>:<password>@<ip-address>/var/www/html/<new_image>
    
    admin@nvos:~$ nv show system image files
    Available image file
    -------------------------
    nvos-amd64-25.01.0003.bin
    
  2. From the NVOS command prompt, install the new image with the NVUE command, and follow the instructions on the screen.

    admin@nvos:~$ nv action install system image files nvos-amd64-25.01.0003.bin
    Operation will reboot the system.
    If you choose ‘y’, the system will install the image and reboot.
    If you choose ‘N’, the operation will abort without installing the image and without rebooting the system.
    Do you want to continue? [y/N]
    
  3. After reboot, run nv show system image to review your images. 

    admin@nvos:~$ nv show system image
                operational
    ----------  -------------------
    current     2
    next        2
    partition1
      build-id  nvos-25.02.1936
    partition2
      build-id  nvos-25.02.2930-010
    

Install Using an Image Copied from the Host Machine

  1. Copy the image from the host machine to the /host/nos-images/ directory on the switch:

    user@host:~$ scp <path-to-system-image> <switch-admin-username>@<switch-ip-address>:/host/nos-images/<desired-name>.bin
    
  2. To install the image, log in to the switch and perform steps 2–3 in the "Install from NVOS" section.

Install Using a USB Drive

Follow the steps below to install the NVOS image using a USB drive.

Tip: Installing NVOS using a USB drive is not scalable. DHCP can scale to hundreds of switch installs with zero manual input, unlike USB installs.

Prepare for USB Installation

  1.  Download the appropriate NVOS image for your platform.

  2. From a computer, prepare your USB drive by formatting it using one of the supported formats: FAT32, vFAT, or EXT2.

    Optional: To prepare the USB drive inside NVOS, follow these steps:

    1. Insert the USB drive into the USB port on the switch running NVOS and log in to the switch. Examine output from cat /proc/partitions and sudo fdisk -l [device] to determine the location of your USB drive. For example, sudo fdisk -l /dev/sdb.

      These instructions assume that the USB drive is the /dev/sdb device, which is typical if you insert the USB drive after the machine boots. However, if you inserted the USB drive during the boot process, the USB drive might be the /dev/sda device. Make sure to modify the commands below to use the proper device for the USB drive.

    2. Create a new partition table on the USB drive. If the parted utility is not on the system, install it with sudo -E apt-get install parted.

      sudo parted /dev/sdb mklabel msdos
      
    3. Create a new partition on the USB drive:

      sudo parted /dev/sdb -a optimal mkpart primary 0% 100%
      
    4. Format the partition to your filesystem of choice using one of the examples below:

      sudo mkfs.ext2 /dev/sdb1
      sudo mkfs.msdos -F 32 /dev/sdb1
      sudo mkfs.vfat /dev/sdb1
      

      To use mkfs.msdos or mkfs.vfat, install the dosfstools package from the Debian software repositories, because the system does not include these tools by default.

    5. To continue installing NVOS, mount the USB drive to move files:

      sudo mkdir /mnt/usb
      sudo mount /dev/sdb1 /mnt/usb
      
  3. Copy the NVOS image to the USB drive, then rename the image file to onie-installer-x86_64.

    You can also use any of the ONIE naming schemes.

    If you use a Mac or Windows computer to rename the installation file, the file extension might remain. Make sure to remove the file extension so that ONIE can detect the file.

  4. Insert the USB drive into the switch, then prepare the switch for installation:

    • If the switch is offline, connect to the console and power on the switch.

    • If the switch is already online in ONIE, use the reboot command.

    SSH sessions to the switch drop after this step. To complete the remaining instructions, connect to the console of the switch. NVOS switches display their boot process on the console, so you need to monitor the console to complete the next step.

  5. Monitor the console and interrupt the GRUB countdown with the "ESC" or "F4" key when prompted, then select the ONIE option from the first GRUB screen shown below.

    image2022-6-7_11-49-44.png
  6. NVOS on x86 uses GRUB chainloading to present a second GRUB menu specific to the ONIE partition. No action is necessary in this menu to select the default option ONIE: Install OS.

    image2022-6-7_12-5-51.png
  7. The switch recognizes the USB drive and mounts it automatically. NVOS installation begins.

  8. After installation completes, the switch automatically reboots into the newly installed instance of NVOS.

Initial login

After the NVOS image installs successfully, you can log in to the operating system.

Note: If you log in and run commands or API calls immediately after the system boots, the NVUE service might not be fully loaded. While the system is still initializing, it returns the following messages:

CLI:

Error: NVOS CLI is unavailable
System is initializing!
This may take a few minutes

REST API:

{
"type": "/errors/ServiceUnavailable",
"title": "NVUE Service is unavailable",
"status": 503,
"detail": "System is initializing! This may take a few minutes."
}

During the initial login to the NOS, the system prompts you to change the password. To change it, connect to the switch with SSH and follow the message prompts.

After you change the password, save your configuration so that the password persists after subsequent reboots.

If you manage the switch only through ZTP, disregard the password change request.

image-2024-9-26_16-45-55.png

Last updated: