NSv Automation, Bootstrapping & Volume License Support: Token based Registration and Authentication.

Description

This document provides information about the SonicWall NSv Series release on the KVM, AWS, Azure, VMWARE and Hyper-V platforms and includes details on the bootstrap token-based registration and authentication with the SonicOS 7.1.1 and later versions.

NSV Bootstrapping: Token Based Registration and Authentication.

Details around NSv registration

Please note that the design of bootstrapping is to only support a very basic set of configurations to keep bootstrap as simple as possible. Once the box is registered and the network is up, we have sonicos API for automating any other configurations that are not supported by bootstrap.

      The bootstrap works this way:

  • User needs to login to mysonicwall.com first, input his NSv instance's SN and Auth Code, mysonicwall will generate a registration token for the user through mysonicwall portal.
  • User puts the settings in a file.
  • pass this file to NSv.
  • NSv applies the setting automatically during first deployment or if the appliance is factory defaulted.

Resolution


Bootstrap process:

NSv tries bootstrapping only if the box is not registered. So, when NSv is first deployed, we will bootstrap. And if the box is factory defaulted, then also it will bootstrap. The bootstrap happens in late stage of system startup.

There are several stages of bootstrap. The first one is to check if bootstrap file exists in the system. It will mount virtual CD-ROM and then search for file in the following order:

  • sonicos.bootstrap
  • user_data
  • user-data
  • CustomData.bin for Azure

It stops and read content from the first file found as bootstrap configurations.

It will then check the data in the bootstrap file, the file must have valid SN and auth-code (not necessarily valid in back-end database, but at least in valid FORMAT) for bootstrap to happen.

  • Bootstrap first applies SN, auth-code, and interface setting, and sonicos login, then it will restart system.
  • Bootstrap then tries to register NSv if internet is available. If it succeeds, it will reboot again.
  • Interface bootstrapping and login bootstrapping are independent from each other. Will still apply login information even if there is error in interface configuration and vice versa.
  • Only static or DHCP is supported for interface configuration during bootstrapping.
  • Only allow LAN/WAN on zone configuration and can only bootstrap x0 or x1. Setting on other interfaces are skipped.
  • Only SSH management is supported.
  • Only online registration is supported, so the network must be up for it to work. We will try to register for a limited period of time after bootup, if that fails. We will not re-try.

During the bootstrap process, NSv may reboot several times. If everything works fine, you will see the message "No need to bootstrap because NSv is registered" at the end. Otherwise, please check the system console to see what goes wrong during bootstrap.

 

Bootstrap file format: Defined a json file for bootstrap.

Supported fields are:

 

{

        "username": "",

        "password": "",

        "serialnumber": "",

        "authorization": "",

        "mySonicwallAcct": "",

        "mySonicwallPass": "",

        "licensingToken": "",

        "interface": [

        {

                "name" : "x0",

                "type" : "dhcp"        

        },

        {

                "name" : "x1",

                "management_ssh": "on",

                "type" : "static",

                "ip"   : "1.1.1.2",

                "netmask": "255.255.255.0",

                "gateway": "1.1.1.1",

                "dns1": "8.8.8.8",

                "dns2": "8.8.8.9",

                "dns3": "8.8.8.7"

        }

        ]

}

 

Method of passing bootstrap configuration file to NSv: through virtual cd rom or user-data during VM creation in AWS or config-drive in OpenStack.

 

For AWS, you can put bootstrap file content here:

A screenshot of a computer Description automatically generated

 

For OpenStack, it is here:

 

A screenshot of a computer Description automatically generated

 

 

For KVM/HYPERV/VMWARE: you can use the following steps to create an ISO file:

 

How to make ISO:

•   On linux system, you can use genisoimage to create an iso. One example command is:

1.  mkdir myconfig

2.  cd myconfig

3.  vim sonicos.bootstrap

4.  cd ..

5.  "genisoimage -o bootstrap.iso -V sosv_config -R -J myconfig/"

And put this ISO file in the virtual CD-ROM of your NSv. Take KVM as an example:


A screenshot of a computer Description automatically generated 

 

For vmware:

 

A screenshot of a computer Description automatically generated

 

For hyperv:

 

A screenshot of a computer Description automatically generated

 

For Azure:

You can specify user-data during VM creation.

 

A screenshot of a computer Description automatically generated

 

 

 

 

 

 

Related Articles

  • SSH password authentication fails after OpenSSH upgrade
    Read More
  • Where can I download SonicWall stencils?
    Read More
  • Configuring High Availability Monitoring settings
    Read More
not finding your answers?