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
40
Step 2: Verify if KVM acceleration is available.
$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

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 to Grub config of the Hypervisor Host.
# /etc/default/grub

GRUB_CMDLINE_LINUX="default_hugepagesz=2M hugepagesz=2M hugepages=32000"
Step 2: Update Grub to make Hugepage configuration effective.
$ sudo update-grub
$ grub-mkconfig -o /boot/grub/grub.cfg
$ sudo reboot
Step 3: Check HugePage configuration after host reboot.
$ cat /proc/meminfo | grep Huge
AnonHugePages:   6100992 kB
ShmemHugePages:        0 kB
HugePages_Total:   32000
HugePages_Free:    32000
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB

Create a Virtual Network

Step 1: Create a new libvirt network.

The following is a sample file. Make sure to have a different subnet than the underlay network).

$ cat virtualnetwork1.xml

<network>
  <name>virtualnetwork1</name>
  <uuid>112d35c9-ec3b-4434-bd77-423f4ff1c5e5</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='bridge1' stp='on' delay='0'/>
  <mac address='52:54:00:e0:f9:97'/>
  <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 above.
$ 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 see if it reflects.
$ virsh net-list
  Name                 State      Autostart     Persistent
  ----------------------------------------------------------------
  default            active        yes                 yes
  virtualnetwork1    active        yes                 yes
Step 5: Optionally, list your bridge devices.
  $ brctl show
  bridge name     bridge id               STP enabled     interfaces
  virbr0          8000.5254003339b3       yes             virbr0-nic
  virbr1          8000.52540060f86e       yes             virbr1-nic

Install CE using CLI

Step 1: Create a Virtual Disk Image.

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

qemu-img resize /var/lib/libvirt/images/coreos-stable-2135.6.0-201909151159.qcow2 +24GB
Step 2: Create a new virtual machine using the virt-install CLI.
virt-install --name ce-volterra --ram 8196 --vcpus=4 --accelerate --network virtualnetwork1,model=e1000 --disk path=/tmp/coreos-stable-2135.6.0-201909251726.qcow2  --cdrom /home/vesop/CEImages/iso/vsb-ves-ce-1855.4.0-201907260949.1564142316.iso --noreboot --autostart --graphics vnc,listen=192.168.8.11,port=15118 --cpu host-passthrough
  • name: guest-name
  • ram: ram allocation to guest (minimum: 8G, recommended: 16)
  • vcpus: cpu allocation to guest (minimum: 4)
  • network: name of virtual network that CE should be attached to
  • disk path: virtual disk path
  • graphics: set vnc to localhost address

Note: Installation using KVM is supported for only the e1000 model type.

Step 3: Start the Virtual Machine.
$ virsh start ce-madhukar-test-new
Domain ce-volterra started
Step 4: Verify Virtual Machine Status.
$ virsh list --all
 Id    Name                           State
----------------------------------------------------
 31    ce-volterra                  running
Step 5: Connect to Virtual Machine using Console.
$ virsh console 31
Connected to domain ce-madhukar-test-new
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: Connect to Virtual Machine using IP Address.
$ virsh domifaddr ce-volterra
 Name       MAC address          Protocol     Address
-------------------------------------------------------------------------------
 vnet0      52:54:00:89:ab:b8    ipv4         192.168.122.197/24

Install CE using VirtMgr (UI)

Installing using the Virt Manager requires ‘virt-manager’ package installed. Users can use the ‘virt-manager’ UI to interactively install Volterra CE on a hypervisor host.

Step 1: Initiate virt-manager on the hypervisor host.
$ virsh domifaddr ce-volterra
 Name       MAC address          Protocol     Address
-------------------------------------------------------------------------------
 vnet0      52:54:00:89:ab:b8    ipv4         192.168.122.197/24
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: Selecting Volterra CE ISO for install.

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


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.

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.

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

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