Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Documentation

Skip to end of metadata
Go to start of metadata

Admin Guide 2. Cloud Node. KVM

Changes to KVM Support in Abiquo 3.6:

  • Abiquo now supports multiple-disk templates and metric dimensions
  • The Abiquo manual procedure to install KVM and AIM includes steps to manually disable SELINUX and iptables. In previous versions, the Abiquo ISO install stopped these services. In any case, Abiquo recommends that you consult your network security expert to obtain the appropriate firewall configuration for your platform

 

The Abiquo KVM Cloud Node requires Abiquo packages. Abiquo does not support other installations of KVM.
This section will guide you through the required steps to install Abiquo KVM Cloud Node and all its dependencies using the Abiquo packages.

Abiquo recommends that you complete the following table with platform information for installing and configuring KVM. This information will help you to avoid problems with the installation or configuration of KVM in Abiquo.

KVM Install Preparation Table

Parameter

Value

Notes

Abiquo Server

IP address of AEE Server

Remote Services

IP address of Remote Services. Monolithic install = Abiquo Server IP, Distributed install = Remote Services IP

NFS Server

IP address of NFS/CIFS Server. In Distributed install, often shared with V2V Server

NFS Directory

 

By default /opt/vm_repository

Host IP address

IP address of this KVM cloud node, e.g. 10.10.1.5 or DHCP

Host gateway

IP address of the Gateway that this cloud node will use, e.g. 10.10.1.1 or DHCP

Primary DNS

IP address of the Primary DNS server that this cloud node use, e.g. 10.65.2.13 or DHCP

Secondary DNS

IP address of the Secondary DNS server that this cloud node use, e.g. 10.65.2.13 or DHCP

Host datastore

 

By default /

Host datastore directory

 

By default /var/lib/virt

Download and Install the latest CentOS Minimal ISO

Download and install the latest version of the CentOS-6.6-x86_64-minimal.iso from here: http://mirror.centos.org/centos/6/isos/x86_64/

Install Abiquo Components

Install Abiquo repository
yum localinstall http://mirror.abiquo.com/abiquo/3.4/os/x86_64/abiquo-release-ee-3.4.0-2.el6.master.noarch.rpm
Install KVM packages
yum install abiquo-cloud-node kvm
Install extra packages
yum install sos tcpdump abiquo-sosreport-plugins wget

Configure Libvirt Guests

Disable guest suspend

Edit /etc/sysconfig/libvirt-guests

Replace "#ON_SHUTDOWN=suspend" with "ON_SHUTDOWN=shutdown"

Configure Firewall and Services

Abiquo recommends that you consult your organization's security expert for an appropriate firewall configuration

The Abiquo ISO disabled SELinux by default and this is the equivalent manual configuration. 

Edit /etc/sysconfig/selinux 

Replace "SELINUX=enforcing" with "SELINUX=disabled"

 The file would then look as follows. 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
Configure Services

This is the default configuration previously performed in the Abiquo ISO install.

chkconfig iptables off
chkconfig abiquo-aim on
chkconfig rpcbind on
service iptables stop
service abiquo-aim start
Reboot

Check if SElinux is enabled. Run the following command

# getenforce

If the result is "Enabled" then reboot

libvirt and qemu packages are excluded from system upgrades to maintain compatibility. Check /etc/yum.conf for details.

Configure Network Interfaces

If you are using DHCP networking, follow the steps below to use static network addressing.

Edit interface configuration in /etc/sysconfig/network-scripts for your NIC(s). For example: /etc/sysconfig/network-scripts/ifcfg-eth1:

# vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=10.81.2.42
NETMASK=255.255.0.0
NETWORK=10.81.0.0
GATEWAY=10.81.0.1
DNS1=10.81.0.1
DNS2=10.81.0.20

Then restart network service for the settings to take effect

# /etc/init.d/network restart

Configure the Abiquo Properties for Virtualization Extensions

KVM can be installed on 64-bit x86 systems including virtual machines and physical machines without virtualization extensions. To configure KVM on a machine without virtualization extensions:

  1. Edit /opt/abiquo/config/ abiquo.properties  on the:
    • Remote Services machine in a distributed install
    • Abiquo Server in a monolithic install
  2. Add this line in the Remote Services properties:

    abiquo.virtualfactory.kvm.fullVirt = false
    
  3. Restart the Abiquo Tomcat server

    service abiquo-tomcat restart
    
  4. Create this link on the KVM node:

     ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
  5. Restart AIM service:

    service abiquo-aim restart
  6. If KVM is virtualized on a ESXi 5.x host, remove UUID lines from interface config files, and restart network:

    sed -i "/UUID/d" /etc/sysconfig/network-scripts/ifcfg-eth*
    service network restart

This means that virtual machines will be created in KVM using PC emulation, which is performed in software and is therefore slower. PC emulation only works when KVM is installed on x86 64-bit machines, including VMs. See Abiquo Configuration Properties.

Configure Local Datastores

Do not use the NFS Repository as a hypervisor datastore

Do not choose the Abiquo Appliance Library directory (/opt/vm_repository by default) as the Hypervisor datastore location because this will cause performance problems

A datastore hosts the VMs and associated virtual disk files on your hypervisor. A datastore can be:

  • A separate disk (or disks) mounted on the hypervisor
  • A directory on the system disk of the hypervisor.

If you are using a directory on the system disk, you should not use the root directory.

  • Abiquo recommends that you create a separate directory for your datastore; or
  • You can use the default KVM datastore directory on the system disk, /var/lib/virt

When you add the hypervisor to Abiquo as a physical machine:

  • Select the root path / as the datastore.
  • Enter your datastore directory (for example var/lib/virt) as the directory path.

KVM Datastore

Field

Description

Enabled

If you enable the datastore, Abiquo will use it in the datastore allocation process when users deploy VMs, if it is in an available Datastore tier

NameLocal or remote absolute path. This is automatically detected by Abiquo

Root Path

Mount point for the hypervisor. This is automatically detected by Abiquo

Directory

Relative directory path added to the root path to form the datastore path. If empty, the datastore path will be only the root path. The Directory and Root Path must be consistent

Datastore tierSelect the datastore tier to assign. Users must have access to the tiers that you assign to the datastores or they will not be able to deploy on this machine

Size

Size of the datastore as detected by Abiquo. Units can be MB, GB or TB

Used

Used size of the datastore as detected by Abiquo. Units can be MB, GB or TB

Enabled

If the datastore is enabled, it can be used by the datastore allocation process when you deploy VMs

 

 

Basic Troubleshooting for Adding Your KVM Hypervisor to Abiquo

How to check if AIM is running
# ps aux | grep abiquo-aim
 
root      1503  0.0  1.9 267388  9684 ?        Ss   Mar06   5:20 /usr/sbin/abiquo-aim --config-file /etc/abiquo-aim.ini -d
No hypervisor responding

The Abiquo platform uses AIM (Abiquo Infrastructure Management) to communicate with the KVM hypervisor. If Abiquo cannot communicate with AIM, Abiquo will give the following error message:

NC-4 There is a machine running at the given IP but no hypervisor is responding

Check your network connectivity and firewalls. See ConfigureFirewallandServices and #Default Ports

Also check that you have configured the basic AIM parameters as described below.

NFS Repository file not found

If you receive the following message when adding the KVM to Abiquo, it may mean that the NFS Repository Server is not mounted.

/opt/vm_repository/.abiquo_repository file not found. Make sure the Abiquo NFS Repository is mounted in /opt/vm_repository

Mount the repository from the NFS Server as described below.

How to mount the Abiquo NFS repository on the KVM host

The NFS repository should be automatically mounted by the install script, but if there are any problems during the install, you can mount it manually.

  1. Edit the FSTAB (# vi /etc/fstab) on the KVM hosts. Add this line with your IP address:

    10.56.121.48:/opt/vm_repository /opt/vm_repository  nfs defaults    0 0
    
  2. Then mount the volume using:

    # mount 10.56.121.48:/opt/vm_repository
    
  3. Check that it is mounted:

    # mount 
    
  4. Check for a line like the following:

    10.81.2.48:/opt/vm_repository on /opt/vm_repository type nfs (rw,addr= 10.56.121.48)
    
  5. Then restart the abiquo-aim service:

    # service abiquo-aim restart 
    
  6. Now try adding the KVM host in Abiquo again.

Default Ports

By default the KVM host:

  • Has Abiquo AIM listening at TCP port 8889 for Abiquo Remote Services communications.
  • Has the Libvirt Daemon listening at TCP port 16509 for Abiquo Remote Services communications.
  • Communicates with the Redis server on TCP port 6379.

See Ports and Communications for detailed information

Loading AIM Configuration File

By default the KVM host:

  • loads the abiquo-aim.ini configuration file (/etc/abiquo-aim.ini).

    [server]
    port = 8889
    
    [rimp]
    repository = /opt/vm_repository
    autoBackup = false
    autoRestore = false

	[stats]
	collectFreqSeconds = 60
	refreshFreqSeconds = 30
	database = /var/lib/abiquo-aim.db

Basic AIM configuration

Do the following steps:

  1. Log in to the KVM Cloud Node as root
  2. Edit the file: /etc/abiquo-aim.ini
  3. Change any required parameters as described in AIM - Abiquo Infrastructure Management
  4. Restart the AIM service

    service abiquo-aim restart
    
  5. You can now try adding the KVM host in Abiquo again.

Logs

Abiquo AIM writes log messages in

  • stderr
  • /var/log/messages

Restart Abiquo AIM

To restart the Abiquo AIM service:

service abiquo-aim restart