FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
amalsky
Staff
Staff
Article Id 360337
Description This article describes the steps to enable vTPM (Virtual Trusted Platform Module) on a FortiGate Virtual Machine running in a Nutanix environment.
Scope FortiOS 7.2.9 or more recent.
Solution

A vTPM is a software-based representation of a traditional TPM 2.0 chip. It performs the same hardware-based security functions as a TPM, including attestation, key generation, and random number generation, without requiring a physical chip.

The open-source Kernel-based Virtual Machine (KVM) will be used to make vTPM support available in virtual FortiGate running in Nutanix AHV.

Prerequisites:

  • A Linux host on which the user has root access (using Ubuntu 22.04.1 LTS). Any modern distribution would suffice. 
  • Virtualization support enabled.
  • KVM is installed on the Host.

    A FortiOS Virtual Machine with a TPM Emulator enabled is already deployed in the KVM environments.
    (The XML configuration on the KVM would be similar to the one below for the TPM part.)

--tpm backend.type=emulator,backend.version=2.0,model=tpm-tis

Exporting from KVM:

  • will perform a backup of the hard disk and XML configuration from the KVM Host.
  • The default directory for the disk image is:


/var/lib/libvirt/images/

 

  • The XML configuration file is usually stored in:

/etc/libvirt/qemu/

  • If they are not stored in the default location, individuate their position using the following command:

virsh domblklist <VM-NAME>

 

  • This will export the hard disk in a QCOW format from KVM to Nutanix AHV.
    To backup the disk image and configuration file, utilize commands such as cp or rsync.

    This setup was tested using the Nutanix Community Edition.

    nutanix communitiy version .jpg

     

Importing in Nutanix:

 

  • It will use the exported disk image from the KVM environment to create a custom one in Nutanix and store it in the desired container.

     Image configuration Nutanixpart2.jpg

     

  • Create a new Virtual Machine.

  • Follow the Nutanix VM creation wizard.
  • Under the operations menu, select the "Clone from Image Service" option.
  • Choose the image created in the previous step.

    Image configuration Nutanixpart2.jpg


    Image configuration Nutanixpart3.jpg

    The settings of the Virtual Machine, such as the number of vCPUs, memory, network interfaces, and disks, should be tweaked according to the specific needs.

    Keep in mind that the FortiGate license only limits the amount of CPU.



  1. Mandatory Settings:
  • UEFI Firmware: Enable UEFI but ensure the secure boot is disabled.
  • Disk Type: Use SCSI for the hard drive.

 

  1. Recommended Settings:
  • At least two NICs (for handling internal and external traffic).

Additional hard drive (~30GB) for logging purposes.

Image configuration Nutanixpart4jpg.jpg
Enable vTPM:

 

Do not power it on after the Virtual Machine has been created.

 

  1. Connect to any Controller VM in the Nutanix cluster using SSH.
  2. At the CVM prompt, type acli to enter the Acropolis CLI mode.
  3. Enable vTPM using:  

 

vm.update <vm-name> virtual_tpm=true

 

Replace <vm-name> with the name of the FortiGate VM.

 

Vtpm enabled.jpg

 

Start FortiGate VM.

 

The FortiGate should take a few minutes to boot and is expected to preserve the configuration and log present on the FortiGate deployed in the KVM environment (the hard disk imported is a sector-by-sector copy of the original).

Verify the vTMP:

 

Check if vTMP is enabled and works correctly, and confirm it using the following command:

 

diagnose hardware deviceinfo tpm

 

293b7fc8-084a-4ccb-abd6-831e682d1820.jpg

 

diagnose tpm get-property

vtpm verification2.jpg

 

diagnose tpm selftest

vtpm verification3.jpg