Fortinet black logo

New Features

Customizing the FortiFlex license token activation retry parameters 7.4.2

Customizing the FortiFlex license token activation retry parameters 7.4.2

Note

This information is also available in the FortiOS 7.4 Administration Guide:

FortiOS supports the customization of the retries for FortiFlex license token activation. The token activation number of retries and the interval between each attempt can be configured using the following commands, respectively:

execute vm-license-options count <integer>
execute vm-license-options interval <interval length in seconds>
Note

If the vm-license-options count is set to zero, the token activation will retry indefinitely until success.

To define the FortiFlex token activation parameters:
  1. Set the number of retries allowed:

    execute vm-license-options count 4
  2. Set the retry interval:

    execute vm-license-options interval 5
  3. Activate the license. The FortiFlex license token will be requested four times, with an interval of five seconds in between, as set.

    • If the license cannot be verified within the set amount of retries, the download will fail:

      # execute vm-license F4FC697D65428013FAKE
      
      This operation will reboot the system ! Do you want to continue? (y/n)y Requesting FortiCare license token: *******, proxy:(null) Requesting FortiCare license token: *******, proxy:(null) Requesting FortiCare license token: *******, proxy:(null) Requesting FortiCare license token: *******, proxy:(null) Failed to download VM license.
    • If the license can be verified within the set number of retries, the VM license will be successfully installed:

      # execute vm-license 227602862F7E6E9XXXX
      
      This operation will reboot the system ! Do you want to continue? (y/n)y Requesting FortiCare license token: *******, proxy:(null) VM license install succeeded. Rebooting firewall.

FortiFlex token activation parameters can also be defined in an ISO file using the mime user-data.

To define the parameters in an ISO file:
  1. Create a config drive ISO with a MIME file:

    Content-Type: text/plain; charset="us-ascii" 
    MIME-Version: 1.0 
    Content-Transfer-Encoding: 7bit 
    Content-Disposition: attachment; filename="license.txt
    "LICENSE-TOKEN: 334ADF7B49F2FEC1XXXX INTERVAL: 5 COUNT: 4

    See Cloud-init using config drive for more information.

  2. Attach the ISO config drive at boot time. See Cloud-init for more information.

  3. Boot up the VM and verify the token activation parameters:

    # diagnose debug cloudinit show
     >> Found config drive /dev/sr0
     >> Successfully mount config drive
     >> MIME parsed preconfig script
     >> MIME parsed VM token
     >> MIME parsed config script
     >> Found metadata source: config drive
     >> Run preconfig script
     >> FortiGate-VM64  conf sys global
     …
     >> Trying to install vmlicense ...
     >> License-token:334ADF7B49F2FEC1XXXX INTERVAL:5 COUNT:4
     >> Run config script

Customizing the FortiFlex license token activation retry parameters 7.4.2

Note

This information is also available in the FortiOS 7.4 Administration Guide:

FortiOS supports the customization of the retries for FortiFlex license token activation. The token activation number of retries and the interval between each attempt can be configured using the following commands, respectively:

execute vm-license-options count <integer>
execute vm-license-options interval <interval length in seconds>
Note

If the vm-license-options count is set to zero, the token activation will retry indefinitely until success.

To define the FortiFlex token activation parameters:
  1. Set the number of retries allowed:

    execute vm-license-options count 4
  2. Set the retry interval:

    execute vm-license-options interval 5
  3. Activate the license. The FortiFlex license token will be requested four times, with an interval of five seconds in between, as set.

    • If the license cannot be verified within the set amount of retries, the download will fail:

      # execute vm-license F4FC697D65428013FAKE
      
      This operation will reboot the system ! Do you want to continue? (y/n)y Requesting FortiCare license token: *******, proxy:(null) Requesting FortiCare license token: *******, proxy:(null) Requesting FortiCare license token: *******, proxy:(null) Requesting FortiCare license token: *******, proxy:(null) Failed to download VM license.
    • If the license can be verified within the set number of retries, the VM license will be successfully installed:

      # execute vm-license 227602862F7E6E9XXXX
      
      This operation will reboot the system ! Do you want to continue? (y/n)y Requesting FortiCare license token: *******, proxy:(null) VM license install succeeded. Rebooting firewall.

FortiFlex token activation parameters can also be defined in an ISO file using the mime user-data.

To define the parameters in an ISO file:
  1. Create a config drive ISO with a MIME file:

    Content-Type: text/plain; charset="us-ascii" 
    MIME-Version: 1.0 
    Content-Transfer-Encoding: 7bit 
    Content-Disposition: attachment; filename="license.txt
    "LICENSE-TOKEN: 334ADF7B49F2FEC1XXXX INTERVAL: 5 COUNT: 4

    See Cloud-init using config drive for more information.

  2. Attach the ISO config drive at boot time. See Cloud-init for more information.

  3. Boot up the VM and verify the token activation parameters:

    # diagnose debug cloudinit show
     >> Found config drive /dev/sr0
     >> Successfully mount config drive
     >> MIME parsed preconfig script
     >> MIME parsed VM token
     >> MIME parsed config script
     >> Found metadata source: config drive
     >> Run preconfig script
     >> FortiGate-VM64  conf sys global
     …
     >> Trying to install vmlicense ...
     >> License-token:334ADF7B49F2FEC1XXXX INTERVAL:5 COUNT:4
     >> Run config script