Create KVM/Libvirt Site

Objective

Volterra supports site deployment using KVM/Libvirt. Use the instructions provided in this document to learn how to perform Volterra node installation on a server using KVM/Libvirt and perform site registration on VoltConsole.

image10
Figure: Hypervisor Topology


Prerequisites

  • Volterra Account

  • A server supporting hardware virtualization

    • KVM will only work if the CPU has the support of hardware virtualization, either Intel VT or AMD-V.
  • Operating System installed on the host

    • Ubuntu -16.X/18.X, CentOS 7.x/RHEL 7.x
  • At Least one interface with internet reachability

    • Volterra Node Zero Touch Provisioning requires Internet connectivity to VoltConsole
  • Volterra Node Software Image.

  • By proceeding with the installation, download and/or access and use, as applicable, of the Volterra software, and/or Volterra platform, you acknowledge that you have read, understand, and agree to be bound by this agreement.

Create Site Token

Step 1: Navigate to the system namespace.

Select the system namespace to obtain a token. You can use an existing token or create a new one. A site can be configured as single-node or multi-node site. In case of multi-node site, use the same token for all installations.

NameSpaceNavig
Figure: Navigate to Namespace

Step 2: Generate token.

Select Manage -> Site Management from the configuration menu and select Site Token from the options pane. Click Add site token to create a new token. This loads the Add site token form. Enter the site name and description in the Name and Description fields respectively. Click Add site token button at the bottom of the form.

CreateSiteToken
Figure: Create a site token

Step 3: Notedown the token.

Find the token you created or choose an existing token from the list of tokens displayed. Click the > to expand the token details in JSON format and note the value of the uid field.

SiteTokenUID
Figure: Find Site Token UID


Check for Virtualization Support

Step 1: Check if the virtualization is enabled.

Enter the following command:

egrep '(vmx|svm)' /proc/cpuinfo | wc -l

The above command returns a non-zero number if virtualization is enabled.

Step 2: Verify if KVM acceleration is available.
sudo kvm-ok

The following is output is returned:

INFO: /dev/kvm exists
KVM acceleration can be used

Note: This is required only in case of Ubuntu and not required for CentOS or RHEL.


Install Packages

Ubuntu: Install required packages for Ubuntu.
sudo apt update
sudo apt install qemu qemu-kvm libvirt-bin  bridge-utils  virt-manager
CentOS/RHEL: Install required packages for CentOS/RHEL.
yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils

Enable Hugepages

Step 1: Add Hugepage configuration.

The required number of hugepages per Volterra node is 400. This example shows setting of hugepages for a cluster of 3 nodes.

  • Add the following to the Grub configuration file (/etc/default/grub) of the hypervisor host in case of Ubuntu:
GRUB_CMDLINE_LINUX="default_hugepagesz=2M hugepagesz=2M hugepages=1200"
  • Add the following to the /etc/sysctl.conf file in case of CentOS/RHEL:
vm.nr_hugepages = 1200

Note: Use an editor such as vi to open the configuration file and make edits.

Step 2: Update the configuration to make Hugepages effective.
  • Enter the following for Ubuntu:
sudo update-grub
grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot
  • Enter the following for CentOS/RHEL:
sysctl -p

Note: In case of CentOS/RHEL, it is recommended to reboot the system after enabling Hugepages.

Step 3: Check HugePage configuration after host reboot.
$ cat /proc/meminfo | grep Huge
AnonHugePages:   6100992 kB
ShmemHugePages:        0 kB
HugePages_Total:    1200
HugePages_Free:     1200
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB

Create a Virtual Network

Step 1: Create a new libvirt network.

Create an XML file with an editor such as vi and populate the network fields. The following are sample file entries. Make sure to set a different subnet than the underlay network.

<network>
  <name>virtualnetwork1</name>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='bridge1' stp='on' delay='0'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>
Step 2: Define the network from the file created in previous step.
virsh net-define virtualnetwork1.xml
Step 3: Start the network and enable it for autostart.
virsh net-start virtualnetwork1
virsh net-autostart virtualnetwork1
 
Step 4: List your libvirt networks to verify that the network is created.
virsh net-list

The following is a sample output:

  Name                 State      Autostart     Persistent
  ----------------------------------------------------------------
  default            active        yes                 yes
  virtualnetwork1    active        yes                 yes
Step 5: Optionally, list your bridge devices.
brctl show

The following is a sample output:

  bridge name     bridge id               STP enabled     interfaces
  virbr0          8000.5254003339b3       yes             virbr0-nic
  virbr1          8000.52540060f86e       yes             virbr1-nic

Install Node using CLI

Step 1: Create a Virtual Disk Image.

The following is an example command to create a virtual disk names disk1.qcow2.

qemu-img create /var/lib/libvirt/images/disk1.qcow2 30G

Note: This is only required when installing the virtual machine using CLI.

Step 2: Create a new virtual machine using the virt-install CLI.

The following is a sample command:

virt-install --name volterra 
--ram 8192 --vcpus=4 
--network network=default,model=virtio 
--accelerate 
--disk path=/var/lib/libvirt/images/volterra.qcow2,bus=virtio,cache=none,size=64 
--cdrom /scratch/vsb-ves-ce-certifiedhw-generic-production-centos-7.2006.9-202010131432.1602604079.iso 
--noautoconsole --noreboot

The following list presents the parameter description for the above command:

  • name: Name of the guest VM.
  • ram: Ram allocation to guest (minimum: 8G, recommended: 16)
  • vcpus: The cpu allocation to guest (minimum: 4)
  • network: The name of virtual network that CE should be attached to. You can also specify bridge for network.
  • disk path: The virtual disk path
  • Ensure that the cache=none setting is speficied in the command

Note: Installation using KVM is supported for only the SCSI disk type and e1000 model for network type.

Step 3: Optionally, start the Virtual Machine.

The virt-install command starts the virtual machine. However, in case the VM is not started yet, you can start manually using the following command.

virsh start volterra-node
Step 4: Verify Virtual Machine Status.
virsh list --all

The following is a sample output of the virsh list command:

 Id    Name                           State
----------------------------------------------------
 31    ce-volterra                  running
Step 5: Connect to Virtual Machine using Console.

Enter the following command:

virsh console 31

The following is a sample output:

Connected to domain ce-volterra
Escape character is ^]

This is localhost (Linux x86_64 4.19.56-coreos-r1) 22:53:47
SSH host key: SHA256:aIFHRiKcjFWaF47+9AAd6IGzCQ5M6suHzL0xH3QUaS4 (ECDSA)
SSH host key: SHA256:hmWTu9M5GYKDQcTgks7LDTkQK9LXKhQjSodVO14JICo (ED25519)
SSH host key: SHA256:ewojrrFELDNOZWIW+jp2UgSaQVikpnGupdbu9+ObgZw (RSA)
SSH host key: SHA256:dM0wUNcFqfJxVRGwwzOJBLtTY1JdptmtjyHXthnBKqY (DSA)
eth0: 192.168.122.197 fe80::5054:ff:fe89:abb8
Step 6: Optionally, connect to Virtual Machine using IP Address.

Enter the following command to find the IP address of your VM:

virsh domifaddr ce-volterra

The following is a sample output:

 Name       MAC address          Protocol     Address
-------------------------------------------------------------------------------
 vnet0      52:54:00:89:ab:b8    ipv4         192.168.122.197/24

Install Node Using Virt Manager (UI)

Installing using the the Virtual Machine Manager requires virt-manager package installed. Users can use the virt-manager UI to interactively install Volterra node on a hypervisor host.

Step 1: Initiate virt-manager on the hypervisor host.

Launch the virt manager from the Applications -> System Tools -> Virtual Machine Manager. Alternatively, enter virt-manager command from the terminal.

Step 2: Create a virtual network from virt-manager UI.

image11
Figure: Virtual Network Creation

Step 3: Create a new virtual machine.

image1
Figure: Virtual Machine Creation

Step 4: Select Volterra node ISO for installation.

image3
Figure: Installation Using ISO Option
image7
Figure: Image Selection for Installation
image2
Figure: Creation of Virtual Machine with ISO

Step 5: Configure memory and CPUs.

image6
Figure: Virtual Machine Memory and CPU Settings

Step 6: Configure disk image.

image8
Figure: Disk Image Storage Setting

Step 7: Configure network.

image9
Figure: Virtual Machine Network Setting

Step 8: Configure NIC driver and CPU from customization menu.

image5
Figure: Virtual Machine NIC Setting
image4
Figure: Virtual Machine CPU Setting

Step 9: Complete VM creation.

Click Finish and start VM from the virt-manager options.


Post-Install Configuration

At any point of time, you can login to the node via SSH using the admin username and Volterra123 password. Perform the following in order to set the node parameters.

Note: Login for the first time prompts you to update the password for the admin user.

Step 1: Log on to the node using your credentials.

The login shell loads with the options to select for different activities. Use the TAB key to select options.

login
Figure: Node Login Shell Menu Options

Step 2: Select get-config and enter to verify the configuration.

get config
Figure: Node Login Shell Get Configuration

Step 3:Start network configuration.

Enter configure-network. Enter Yes for Do you want to configure ADVANCED network options? and Do you want to configure wifi? options.

Configuring network is optional.

Note: Changing IP address for a registered node is not supported in case of multi-node sites. You must use either fixed IP adresses or DHCP adresses with a fixed lease.

Step 4: Enter the SSID and password for your wifi network.

wifi
Figure: Node Wifi Configuration

Note: Configuring network is optional. In case you intend to apply static configuration, then this option can be used.

Step 5: Select configure and press enter. Enter the following fields.
  • Cluster Name
  • Registration Token
  • Hostname (master0 by default)

    Note: Ensure that host names are distinct and unique incase you are installing nodes for multi-node site.

  • Longitude and Latitude information
  • Certified Hardware - Select kvm-voltmesh for this.

Note: You must first perform network configuration using the configure-network before setting the other fields using the configure option in case you are applying static configuration for network. Also, note that changing the assigned IP address after the succesful registration of the node is not supported in case of multi-node sites.

sel cert hw
Figure: Generic Configuration

Step 6: Confirm configuration.

Enter Yes for confirm configuration.

Step 7: Verify configuration status.

Select health option and enter to verify your wifi configuration and registration status.

health wifi
Figure: Node Wifi Information

health reg
Figure: Node Registration Status

Note: Select the factory-reset option to perform a reset and perform registration again as per the instructions in the next chapter.


Perform Site Registration

Perform the steps provided in the following chapter to register your site.

Note: USB whitelisting is enabled by default and if you change the USB device such as a keyboard after registration, the device will not function.

Single-node Site Registration

Step 1: Navigate to registrations and start registration approval.

Log in to the VoltConsole with your tenant and select Manage from the configuration menu. Select Registrations from the options pane and choose your site in the displayed list of sites. Click ✅ to load the Registration Acceptance form.

AcceptReg
Figure: Accept Pending Registration

Step 2: Enter the required fields and complete registration.

Enter the site configuration parameters and click Accept.

SiteParam
Figure: Configure Site Parameters

Note: Enter all mandatory fields marked with the * character.

Step 3: Check the site status and health.

Select Sites -> Site List and click on your site from the displayed site list to see the dashboard for your site.

HealthCheck
Figure: Site Health Check

Note: After you accept the registration, it takes few minutes for the health and connectivity status to get updated in the portal. Click the Site Status tab to verify the following (established in that order during the site bring up):

  1. The Last Upgrade field has Successful value for the Volterra OS Status section.
  2. The Last Upgrade field has Successful value for the Volterra Software Status section.
  3. The IPSEC status field under RE Connectivity section has up value.

Multi-node Site Registration

Step 1: Navigate to registrations and perform registration.

Accept registration requests from the master-0, master-1, and master-2 nodes. Enter the same values for the following parameters for all the registration requests.

  1. ‘Cluster name’ = ‘volterra-demo-site-mce’
  2. ‘Cluster size’ = ‘3’

RegReqM-0
Figure: Registration request from ‘master-0’ node
RegReqM-1
Figure: Registration request from ‘master-1’ node
RegReqM-1
Figure: Registration request from ‘master-2’ node

Note: Enter all mandatory fields marked with the * character.

Step 2:Check the site status and health

Select Sites -> Site List and click on your site from the displayed site list to see the dashboard for your site.

SiteDashBrd
Figure: Volterra Site Dashboard

Note: After you accept the registration, it takes few minutes for the health and connectivity status to get updated in the portal. Click the Site Status tab to verify the following (established in that order during the site bring up):

  1. The Last Upgrade field has Successful value for the Volterra OS Status section.
  2. The Last Upgrade field has Successful value for the Volterra Software Status section.
  3. The IPSEC status field under RE Connectivity section has up value.

Note: You can log on to the Volterra CLI on your node through SSH with username centos and your private key.


Concepts