NVIDIA NVOS User Manual for InfiniBand Switches

Configuration Management Commands

NVUE Configuration

nv config apply


nv config apply [--assume-yes| --y| --assume-no| --confirm <time>| --confirm-status]

Applies the pending configuration to become the applied configuration.

Syntax Description

--assume-yes | --y | --assume-no

Automatically reply yes/no to all prompts.

--confirm

 Applies the configuration change but you must confirm the applied configuration. If you do not confirm within ten minutes, the configuration rolls back automatically.

You can change the default time with the time argument

--confirm-status

 Shows the amount of time left before the automatic rollback.

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv config apply
Warning: management interface config is changed. If you are connected with it, your conection may be temporary interrupted.

Are you sure? [y/N] y
applied

REST API

PATCH https://<ip>/nvue_v1/revision/{revision-id} -H 'Content-Type: application/json' -d '{"state": "apply", "auto-prompt": {"ays": "ays_yes"}}'

Related Commands


Notes

NVOS applies but does not save the configuration; the configuration does not persist after a reboot.

nv config detach


nv config detach

Detaches the configuration from the current pending configuration.

Syntax Description

N/A

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv config detach

REST API

DELETE https://<ip>/nvue_v1/revision/{revision-id}

Related Commands


Notes

NVOS names the detached configuration pending and includes a timestamp with extra characters. For example: pending_20210128_212626_4WSY

nv config diff


nv config diff <revision> <revision> | [ o commands ] | [ --expand ]

Shows differences between configurations, such as the pending configuration and the applied configuration or the detached configuration and the pending configuration.

Syntax Description

revision

pending configuration / applied configuration / detached configuration / startup configuration

-o commands

Shows differences between two configuration revisions.

--expand

Show the configuration in expanded form with no ranges.

Default

N/A

History


Added --expand option

Example

admin@nvos:~$ nv config diff applied pending
- set:
    interface:
      swp1:
        description: Test


admin@nvos:~$ nv config diff
- set:
    interface:
      eth0:
        description: eth0-desc
      eth0-1:
        type: eth
      eth1:
        description: eth1-desc


admin@nvos:~$ nv config diff --expand
- set:
    interface:
      eth0:
        description: eth0-desc
        type: eth
      eth1:
        description: eth1-desc
        type: eth

REST API

GET https://<ip>/nvue_v1/<resource>?rev=<rev-A>&diff=<rev-B>

GET https://<ip>/nvue_v1/<resource>?rev=<rev-A>&diff=<rev-B>&expand=true

Related Commands


Notes


nv config find


nv config find <string> | [ o commands ] | [ --expand ]

Finds a portion of the applied configuration according to the provided string.

Syntax Description

string

Search string

-o commands

Shows the configurations as commands

--expand

Show the configuration in expanded form with  no ranges.

Default

N/A

History


Added --expand option

Example

admin@nvos:~$ nv config find eth
- set:
    interface:
      eth0:
        description: eth0-desc
      eth0-1:
        type: eth
      eth1:
        description: eth1-desc


admin@nvos:~$ nv config find eth --expand
- set:
    interface:
      eth0:
        description: eth0-desc
        type: eth
      eth1:
        description: eth1-desc
        type: eth

REST API

GET https://<ip>/nvue_v1/?rev=applied&filled=False&diff=&search-string=<string>

GET https://<ip>/nvue_v1/?rev=applied&filled=False&diff=&search-string=<string>&expand=true

Related Commands


Notes


nv config history


nv config history <revision>

Shows the apply history for the revision.

Syntax Description

revision

pending configuration, applied configuration, detached configuration, startup configuration

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv config history 254
Currently pending [rev_id: 435]
Rev ID  Apply Date                 Type  User   Message
------  -------------------------  ----  -----  ----------------------
254     2025-08-31T10:53:22+03:00  CLI   admin  Config update by admin

REST API

GET https://<ip>/nvue_v1/revision/{revision-id} OR GET https://<ip>/nvue_v1/revision

Related Commands


Notes


nv config patch


nv config patch <file>

Updates the pending configuration with the specified YAML configuration file or a text file containing NVUE commands.

Syntax Description

<file>

configuration file

Default

N/A

History


Added support for text file containing NVUE commands and added example

Example

Example 1:

admin@nvos:~$ nv config patch /deps/nv-02/13/2021.yaml

Example 2: Path to text file contains NVUE commands

admin@nvos:~$ nv config patch commands.txt
created [rev_id: 1]

admin@nvos:~$ nv config diff
- set:
    interface:
      acp138:
        description: Uplink to spine
         link:
           state:
             up: {}
      acp139:
        link:
          state:
            down: {}

admin@nvos:~$ nv config apply -y
applied [rev_id: 1]



REST API

N/A

Related Commands

nv config apply

Notes


nv config replace


nv config replace <file>

Replaces the pending configuration with the specified YAML configuration file or text file containing NVUE commands.

Syntax Description

<file>

configuration file

Default

N/A

History


Added support for text file containing NVUE commands and added example

Example

admin@nvos:~$ nv config replace /deps/nv-02/13/2021.yaml



admin@nvos:~$ nv config replace config_backup.txt
created [rev_id: 6]

admin@juliet-184-mgmt2:~$ nv config apply
Warning: current hostname `changed-config` will be replaced with `initial-config`
Are you sure? [y/N] y
applied [rev_id: 6]

REST API

POST https://<ip>/nvue_v1/revision &
DELETE https://<ip>/nvue_v1/?rev=<rev-id> &
Update the configuration: PATCH https://<ip>/nvue_v1/?rev=<rev-id>
Apply changes: PATCH https://<ip>/nvue_v1/revision/{revision-id} -H 'Content-Type: application/json' -d '{"state": "apply", "auto-prompt": {"ays": "ays_yes"}}'

Related Commands

nv config apply

Notes

The replace operation will wipe the default ACL rules for management ports.
These rules must be explicitly added to the new configuration file.

nv config save


nv config save

Overwrites the startup configuration with the applied configuration. The configuration persists after a reboot.

Syntax Description

N/A

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv config save

REST API

PATCH https://<ip>/nvue_v1/revision/{revision-id} -H 'Content-Type: application/json' -d '{"state": "save", "auto-prompt": {"ays": "ays_yes"}}'

Related Commands


Notes


nv config show


nv config show [ o commands ] | [ --expand ]

Shows the currently applied configuration in yaml format.

Syntax Description

-o commands

Shows the currently applied configuration commands.

--expand

Show the configuration in expanded form with no ranges.

Default

N/A

History


Added --expand option

Example

admin@nvos:~$ nv config show -o commands
nv set interface lo type loopback
nv set interface swA10p1 link state up
nv set interface swA10p1 type ib
admin@nvos:~$ nv config show
- set:
    interface:
      eth0:
        description: eth0-desc
      eth0-1:
        type: eth
      eth1:
        description: eth1-desc


admin@nvos:~$ nv config show --expand
- set:
    interface:
      eth0:
        description: eth0-desc
        type: eth
      eth1:
        description: eth1-desc
        type: eth

REST API

GET https://<ip>/nvue_v1/?rev=applied&filled=false

GET https://<ip>/nvue_v1/?rev=applied&filled=false&expand=true

Related Commands


Notes


nv show system config files


nv show system config files

Lists the configuration files.

Syntax Description

N/A

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv show system config files 
Available config files  File Path
----------------------  -------
config-file.yaml   /host/config_files/config-file.yaml

REST API

GET https://<ip>/nvue_v1/system/config/files

Related Commands


Notes


nv show system config files


nv show system config files <file-id>

Get a configuration file.

Syntax Description

file-id

the file name to interact with

Default

N/A

History

25.02.2002 

Example

- header:
    model: VX
    nvue-api-version: nvue_v1
    rev-id: 1.0
    version: Cumulus Linux 5.4.0
- set:
    system:
      message:
        pre-login: Hello
/etc/nvue.d/config_files/config_file.yaml (END)

REST API

GET https://<ip>/nvue_v1/system/config/files/{file-name}

Related Commands


Notes

The command will display the content of the configuration file in 'less' format

nv show system config files brief


nv show system config files <file-id> brief

Get a configuration file.

Syntax Description

file-id

the file name to interact with

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv show system config files config-file.yaml brief 
Available config files  File path                                
----------------------  -----------------------------------------
config-file.yaml        /etc/nvue.d/config_files/config-file.yaml

REST API

GET https://<ip>/nvue_v1/system/config/files/{file-name}

Related Commands


Notes

the command will display the path to the file

nv action export system config


nv action export system config <file-id>

Export configuration file.

Syntax Description

file-id

the file name to interact with

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv action export system config new_confif_file.yml
Exporting completed
Action succeeded

REST API

POST https://<ip>/nvue_v1/system/config/files/{file-name}

Related Commands


Notes

This command will export the applied configuration a new config file.

nv action rename system config files


nv action rename system config files <file-id> <new-name>

Rename config file.

Syntax Description

file-id

the file name to interact with

new-name

the new name to rename to

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv action rename system config new_config_file.yml new_name.yaml
config file new_config_file.yaml renamed to new_name.yaml
Action succeeded

REST API

POST https://<ip>/nvue_v1/system/config/files/{file-name}

Related Commands


Notes


nv action delete system config files


nv action delete system config files

Delete all config files.

Syntax Description

N/A

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv action rename system config new_config_file.yml new_name.yaml
config file new_config_file.yaml renamed to new_name.yaml
Action succeeded

REST API

POST https://<ip>/nvue_v1/system/config/files

Related Commands


Notes


nv action delete system config files


nv action delete system config files <file-id>

Delete config file.

Syntax Description

file-id

The file name to interact with

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv action rename system config new_config_file.yml new_name.yaml
config file new_config_file.yaml renamed to new_name.yaml
Action succeeded

REST API

POST https://<ip>/nvue_v1/system/config/files/{file-name}

Related Commands


Notes


nv action upload system config files


nv action upload system config files <file-id> <remote-url>

Upload config file.

Syntax Description

file-id

The file name to interact with

remote-url

Destination image file name
Remote url path to upload a file to.
Format: [protocol]://username[:password]@hostname/path/filename
Supported protocols: SCP, FTP, SFTP, and HTTPS

Default

N/A

History

25.02.2002 

: Added HTTPS support in remote-url

Example

admin@nvos:~$ nv action upload system config files new_config_file.yml scp://username:password@server/tmp/
Uploading file: new_config_file.yml ...
File upload successfully
Action succeeded

REST API

POST https://<ip>/nvue_v1/system/config/files/{file-name}

Related Commands


Notes


nv action fetch system config files


nv action fetch system config files <remote-url>

Fetch configuration file.

Syntax Description

remote-url

  • Remote url path to fetch file from.

  • Format: [protocol]://username[:password]@hostname/path/filename

  • Supported protocols: SCP, HTTPS, FILE, FTP, and SFTP.

  • The password must be encoded if it contains special characters and is provided as part of the command.

Default

N/A

History

25.02.2002 

Example

admin@nvos:~$ nv action fetch system config scp://username:password@server/tmp/new_config_file.yml
admin@nvos:~$ nv action fetch system config file:///tmp/new_config_file.yml

REST API

POST https://<ip>/nvue_v1/system/config/files/{file-name}

Related Commands


Notes

Alternatively, you can upload a config file from the host machine to the switch.

Note: you must copy a config to the predefined directory: "/host/config_files/"

user@host:~$ scp <path-to-config-file> <switch-admin-username>@<switch-ip-address>:/host/config_files/<desired-name>.yaml

NVUE Configuration Verify

nv config verify


nv config verify

Validate the pending configuration changes without applying them to the system

Syntax Description

N/A


Default

N/A

History

25.02.8008

Example

admin@nvos:~$ nv config verify

REST API

PATCH https://<ip>/nvue_v1/config/verify

Related Commands

nv config apply

Notes


nv config verify revision


nv config verify revision <rev_id>

Verifies an existing revision by ID. Revision can be integer values, or special revisions like startup or empty.

Syntax Description

rev_id

The created rev_id

Default

N/A

History

25.02.8008

Example

admin@nvos:~$ nv config verify revision 5

REST API

PATCH https://<ip>/nvue_v1/config/verify/revision

Related Commands

nv config apply

Notes


nv config verify filename


nv config verify filename <file.yaml | file.txt>

Creates a temporary empty revision, patches the provided YAML or plain text configuration using nv config replace, runs verification.

Syntax Description

file.yaml | file.txt

Verify configuration from input file.

Default

N/A

History

25.02.8008

Example

admin@nvos:~$ nv config verify filename config.txt

REST API

PATCH https://<ip>/nvue_v1/config/verify/filename

Related Commands

nv config apply

Notes

During nv config apply or nv config verify, the system reports only the first encountered error even if multiple issues exist.

Factory

nv action reset system factory-default


nv action reset system factory-default [force]

Clears the system and resets it entirely to its factory state.

Syntax Description

force

Forces a reboot and configuration reset regardless of the prompt answer

Default

N/A

History

25.02.2002 

Example

  

admin@nvos:~$ nv action reset system factory-default
The operation will reset the system configuration and initiate a reboot.
Type [y] to reset the system configuration and reboot.
Type [N] to abort.


Do you want to continue? [Y/N] N
Reset factory aborted by user

REST API

POST https://<ip>/nvue_v1/system/

Related Commands


Notes

  • The command will reboot the system.

  • The SSD password will be reset to its default value.

Last updated: