Document toolboxDocument toolbox

QCOW2 on KVM Hypervisor Deployment

Infoblox recommends that you dedicate the minimum system requirements to the host you plan to deploy. The dedicated resources cannot be shared with or used for other non-Infoblox applications. Sharing resources will negatively affect the performance of your BloxOne services. For information about the minimum system requirements and port usage, see the following:

Prerequisites

Before deploying a host and enabling BloxOne services, ensure that you prepare the deployment environment according to the requirements for the supported platforms and open all necessary ports for unrestricted outbound access. For details, see BloxOne Connectivity and Service Requirements.

Before you start the deployment, consider the following:

  • The recommended resources required for the KVM on-prem deployment are 8 vCPU and 16GB of  memory. For details, see Minimum System Requirements for NIOS-X Servers.
  • Ensure that your KVM environment meets the minimum deployment requirements.
  • Open all required ports on the hosts, as list in Port Usage for Bare-Metal NIOS-X Servers, in addition to the ports required for firewalls.
  • Ensure that there are no other processes using port 53 on the host system on which your  host will be deployed. For example, some Ubuntu systems running local DNS cache (system-resolved) might occupy port 53, and your host might not function properly in this case.

Setting up KVM

To set up the KVM environment for host deployment, complete the following:

  1. In Ubuntu, enter the following to install the virtinst package:
    sudo apt install cloud-image-utils qemu qemu-kvm libvirt-clients libvirt-daemon-system virtinst bridge-utils virt-manager

Note

The supported version of the virtinst package is 2.2.1 or higher.

2. Enter the following command to add your user to the libvirt member group:
   sudo usermod -a -G libvirt <yourUser>

3. For the member group to take effect, log out of the Ubuntu terminal and then log back in. 

4. Once you log back in, enter the following to check the default network to verify that it is active:
sudo virsh net-list\

5. The following is displayed if the default network is active:

Name       State    Autostart   Persistent

----------------------------------------------------

 default   active   yes         yes

  • If the network is inactive, enter the following to start it:

    sudo virsh net-start default
  • If the network is inactive due to the the following error: "dnsmasq: TFTP directory /var/lib/tftp inaccessible: No such file or directory," create the folder manually, and then enter the following to start the network:
    sudo mkdir -p /var/lib/tftp
    sudo virsh net-start default

6. Create a work directory for the QCOW2 image, enter the following:

  KVM_WORKDIR=~/kvm-images

7. Create the work directory folder, enter the following:
     mkdir -p ${KVM_WORKDIR}

Installing QCOW2 Image on KVM

  1. Log in to the Cloud Services Portal.
  2. Go to Administration > Downloads.
  3. On the Downloads page > Hosts section, select Download Package for KVM/QCOW (60 GB Disk) for the regular image or Download Package for KVM/QCOW (750 GB Disk) for the high-capacity image .
  4. Click Download Package.
  5. Download the QCOW2 image to the ${KVM_WORKDIR} work folder and rename the image file by entering the following:

   cp artefacts/<bloxone qcow2 image>.qcow2 ${KVM_WORKDIR}/bloxone.qcow2

      6. Edit the kvm/network-configuration.yaml file based on your network requirements. The following is a sample of the network- 

configuration.yaml file:

     version: 2
     ethernets:
       enp1s0:
          dhcp4: false
          addresses: [ 192.168.xxx.2/24 ]
                      gateway4: 192.168.xxx.1

Note

If you have a DHCP server in your network and you want to receive an IP address from the DHCP server, skip this step.

     7. In the seed image for cloud-init, edit the user-data.yaml file to include information, such as the join token for connecting the host to the Cloud Services Portal. To obtain a join token, see Creating Join Tokens. The following is a sample of the user-data.yaml file. For information on how to use the userdata file, see YML and JSON Templates.

       #cloud-config
       host_setup:
         jointoken: "your BloxOne join token"

     8. Use the following commands to insert metadata and user data into the seed image. User data can contain information that is supported by cloud-init. If you have a DHCP server in your network and you want to receive an IP address from the DHCP server, you can skip the network-config flag in the following:

       cloud-localds -v\
        --network-config=kvm/network-configuration.yaml\
        ${KVM_WORKDIR}/metadata.iso\
        kvm/user-data.yaml

     9. Use the following commands to create an XML file for the deployment:

Note

Ensure that the virt-install version is 2.2.1 or higher.

       virt-install\
         --connect qemu:///system\
         --virt-type kvm\
         --name bloxone-infoblox\
         --ram 16384\
         --vcpus 8\
         --os-type linux\
         --os-variant ubuntu20.04\
         --disk path=${KVM_WORKDIR}/bloxone.qcow2,format=qcow2\
         --disk path=${KVM_WORKDIR}/metadata.iso,device=cdrom\
         --import --network network=default --noautoconsole  --print-xml\
         >${KVM_WORKDIR}/bloxone.xml

  • If you are using a non-default network, add the following:
        --network network=your network name
  • If you want to add multiple interfaces, add the following for each interface:
        --import --network network=your network name

   10.  After you have created the bloxone.xml file, add the following to the file, so you can access the Device UI:

Note

Replace Set-SN-here with the serial number you used in virt-install.

<os>
...
  <smbios mode='sysinfo'/>
</os>
<sysinfo type='smbios'>
  <system>
     <entry name='serial'>Set-SN-here</entry>
  </system>
</sysinfo>

   11. Deploy the host after you have created the XML file:

sudo virsh create ${KVM_WORKDIR}/bloxone.xml

   12. Verify the host to ensure that it is up and running:
sudo virsh list --all |grep "bloxone-infoblox"

   13. Validate the IP address of the newly created host:
sudo virsh domifaddr bloxone-infoblox

Note

The screen shows whether the IP address is received from the DHCP server.

    14. You have now successfully deployed the host. It might take a couple minutes for the host and the Cloud Services Portal to connect.

    15. To check the current status of the host, go to Manage > Hosts in the Cloud Services Portal. For more information about the host status, see Viewing Host Status.

Accessing the Device UI

If you want to access the Device UI to modify configuration on your  host, you must set the serial number for your VM, and then add specific commands to the bloxone.xml file after the file has been created.

To access the Device UI:

  1. Open the internet browser on the management PC or workstation and enter https://192.168.1.2 or https://<allocated_IP> if the IP address was allocated via the DHCP server in your network. 

Note

You can try to use http:// to access the IP address if you encountered issues while using https://. 

     2. Enter the following local access credentials:

  • Username: Enter admin as the login user name for the host.
  • Password: Enter the serial number you specified for the VM. 

     3. The Device UI appears in the browser. Make applicable changes in the Device UI.

     4. Click Apply Changes to submit the configuration changes.