Fortinet black logo

Deploying FortiAuthenticator-VM on KVM

Copy Link
Copy Doc ID 7a030756-4ddd-11ea-9384-00505692583a:460466
Download PDF

Deploying FortiAuthenticator-VM on KVM

Once you have downloaded the out.kvm.zip file and extracted the virtual hard drive image file fackvm.qcow2, you can create the virtual machine in your KVM environment.

To deploy the FortiAuthenticator-VM virtual machine:
  1. Launch Virtual Machine Manager on your KVM host server.
  2. From the Virtual Machine Manager (VMM) home page, select Create a new virtual machine.

    The New VM window will open.

  3. Select Import existing disk image and select Forward.

  4. Select Browse. If you saved the fackvm.qcow2 file to /var/lib/libvirt/images, it will be visible on the right. If you saved it somewhere else on your server, select Browse Local, find it, and select Choose Volume.

  5. Select the OS type and Version you are running (in this case Linux Ubuntu 16.04), and select Forward.

  6. Specify the amount of memory and number of CPUs to allocate to this virtual machine. The amounts must not exceed your license limits. For more information on your license limits, see Licensing.
    Select Forward.

  7. On the last page, enter a Name for the VM (in this case, FAC-VM).

    A new virtual machine includes one network adapter by default. Set Network selection to Usermode networking. Alternatively, set a specific MAC address for the virtual network interface by selecting Specify shared device name.

    Then select Finish.

    You new VM will be created an open, prompting login.

Resizing the virtual disk

To resize the disk, and adjust partitions, you must set up the libvirt guest filesystem utilities. The command used to resize the disk, on an Ubuntu host with qcow2 file images, is virt-resize.

Import factors to know about this method are the following:

  • This is a libvirt utility.
  • It can both expand a guest disk and expand the partitions at the same time.
  • It copies the disk, which is beneficial if you wish to keep a backup.

Install utilities package

  1. Open the VMM Terminal and enter the following command to install the libvirt file system utilities package:

    sudo apt-get install libguestfs-tools

  2. To see if the libvirt utility is functional, you will need to run a test. Enter the following command:

    sudo apt-get install libguestfs-tools

    If you see ===== TEST FINISHED OK =====, it is functional.

  3. If you don't see the successful test-finished command return, you will need to repair it. In this case, enter the following command:

    sudo update-guestfs-appliance

  4. Run the test again (the command from step two) to verify that it works.

Resize disk and partition

  1. Shutdown the guest VM.
  2. Review the current sizing and view the partition name you want to expand by using the following libvirt utility command:

    sudo virt-filesystems --long --parts --blkdevs -h -a <name-of-guest-disk-file>

  3. Enter the following command to increase the output disk size. This example increases the disk size by 20GB:

    sudo qemu-img create -f qcow2 -o preallocation=metadata outdisk 20G

  4. Enter the following command to copy the old disk to the new disk, while expanding the suitable partition:

    sudo virt-resize --expand <name-of-partition> indisk outdisk

  5. When finished, make sure to rename the indisk file to an appropriate name, such as "backup", while you rename the new outdisk as "indisk".
  6. Reboot the guest and test the new disk. When a successful test is complete, you are free to delete the original backup file if you wish.

Configuring the number of virtual CPUs

By default, the virtual appliance is configured to use one (1) virtual CPU (vCPU).

To change the number of vCPUs:
  1. Shutdown the guest VM.
  2. Right-click the VM and go to Open > Show virtual hardware details > CPUs.
  3. Under Topology, enable Manually set CPU topology and select the number of virtual Sockets, the number of Cores per socket, and number of Threads.
  4. Select Apply to save the settings.

Configuring the memory limit

VMM measures its memory by mebibytes (MiB).

To change the memory limit:
  1. Shutdown the guest VM.
  2. Right-click the VM and go to Open > Show virtual hardware details > Memory.
  3. Enter the Maximum allocation in MiB to allocate to the VM instance.
  4. Select Apply to save the settings.

Deploying FortiAuthenticator-VM on KVM

Once you have downloaded the out.kvm.zip file and extracted the virtual hard drive image file fackvm.qcow2, you can create the virtual machine in your KVM environment.

To deploy the FortiAuthenticator-VM virtual machine:
  1. Launch Virtual Machine Manager on your KVM host server.
  2. From the Virtual Machine Manager (VMM) home page, select Create a new virtual machine.

    The New VM window will open.

  3. Select Import existing disk image and select Forward.

  4. Select Browse. If you saved the fackvm.qcow2 file to /var/lib/libvirt/images, it will be visible on the right. If you saved it somewhere else on your server, select Browse Local, find it, and select Choose Volume.

  5. Select the OS type and Version you are running (in this case Linux Ubuntu 16.04), and select Forward.

  6. Specify the amount of memory and number of CPUs to allocate to this virtual machine. The amounts must not exceed your license limits. For more information on your license limits, see Licensing.
    Select Forward.

  7. On the last page, enter a Name for the VM (in this case, FAC-VM).

    A new virtual machine includes one network adapter by default. Set Network selection to Usermode networking. Alternatively, set a specific MAC address for the virtual network interface by selecting Specify shared device name.

    Then select Finish.

    You new VM will be created an open, prompting login.

Resizing the virtual disk

To resize the disk, and adjust partitions, you must set up the libvirt guest filesystem utilities. The command used to resize the disk, on an Ubuntu host with qcow2 file images, is virt-resize.

Import factors to know about this method are the following:

  • This is a libvirt utility.
  • It can both expand a guest disk and expand the partitions at the same time.
  • It copies the disk, which is beneficial if you wish to keep a backup.

Install utilities package

  1. Open the VMM Terminal and enter the following command to install the libvirt file system utilities package:

    sudo apt-get install libguestfs-tools

  2. To see if the libvirt utility is functional, you will need to run a test. Enter the following command:

    sudo apt-get install libguestfs-tools

    If you see ===== TEST FINISHED OK =====, it is functional.

  3. If you don't see the successful test-finished command return, you will need to repair it. In this case, enter the following command:

    sudo update-guestfs-appliance

  4. Run the test again (the command from step two) to verify that it works.

Resize disk and partition

  1. Shutdown the guest VM.
  2. Review the current sizing and view the partition name you want to expand by using the following libvirt utility command:

    sudo virt-filesystems --long --parts --blkdevs -h -a <name-of-guest-disk-file>

  3. Enter the following command to increase the output disk size. This example increases the disk size by 20GB:

    sudo qemu-img create -f qcow2 -o preallocation=metadata outdisk 20G

  4. Enter the following command to copy the old disk to the new disk, while expanding the suitable partition:

    sudo virt-resize --expand <name-of-partition> indisk outdisk

  5. When finished, make sure to rename the indisk file to an appropriate name, such as "backup", while you rename the new outdisk as "indisk".
  6. Reboot the guest and test the new disk. When a successful test is complete, you are free to delete the original backup file if you wish.

Configuring the number of virtual CPUs

By default, the virtual appliance is configured to use one (1) virtual CPU (vCPU).

To change the number of vCPUs:
  1. Shutdown the guest VM.
  2. Right-click the VM and go to Open > Show virtual hardware details > CPUs.
  3. Under Topology, enable Manually set CPU topology and select the number of virtual Sockets, the number of Cores per socket, and number of Threads.
  4. Select Apply to save the settings.

Configuring the memory limit

VMM measures its memory by mebibytes (MiB).

To change the memory limit:
  1. Shutdown the guest VM.
  2. Right-click the VM and go to Open > Show virtual hardware details > Memory.
  3. Enter the Maximum allocation in MiB to allocate to the VM instance.
  4. Select Apply to save the settings.