Go back

How to Configure KVM Hypervisor on Ubuntu Server?

March 6, 2018
Dimitrii Zuikov

Dimitrii Zuikov

TrueConf Server can be run on a virtual machine. However, it is complex and inadvisable to implement for inexperienced users, as enabling a virtual machine to operate correctly can be quite difficult at times.

This manual will teach you how to configure  KVM hypervisor on Ubuntu Server, more specifically on Ubuntu 14.04.03 Server x86-64.

This article is for informational purposes only and does not necessarily guarantee full server operation after taking all the steps.
TrueConf Technical Support does not advise users on configuring virtual machines and running TrueConf Server on them. A virtual machine is an external system, which does not depend on TrueConf application. Its configuration and support are entirely user’s responsibility.

Step 1: Check Hardware Virtualization Support

In this case, Hyper-V virtualizer is a hardware virtualization tool, which uses special processor architecture for virtualization. Accordingly, it cannot be launched on some processors where this architecture is not available.

To check if your hardware supports hardware virtualization, enter the following command in the terminal:

If output is not empty, as in the picture below, hardware virtualization is most likely to be supported.

How to Configure KVM Hypervisor on Ubuntu Server? 1

Step 2: Install KVM

To begin, update your system and packages:

Now install necessary packages:

Check that the current entry belongs to libvirtd group:

Here is a typical command output if the group contains 111 group and andrey as a user:

If there is no current user in the group, you can add it with a separate command:

Then, log in again and check KVM launching:

KVM is launched, but output is empty, as your virtual machine has not been created yet — it will be created during the next steps.

Step 3: Create Network Bridge

Next, create a network bridge. This may require editing /etc/network/interfaces file.

This file contains a line specifying the main network interface. It comes after the line-comment “# The primary network interface”. If eth0 is network interface (a line contains “auto eth0”), it should be replaced with br0 and four new lines should be added to the end of file:

The picture below shows an example of such editing, but instead of replacing “auto eth0” line, we’ve commented on it (we’ve added a hash sign in the beginning to ignore this line) and added a new one after it (with an additional comment before it).

How to Configure KVM Hypervisor on Ubuntu Server? 2

After that, restart the network or even the entire operating system:

Step 4: Configure Network Gateway

To configure a gateway, edit one more file — mc/etc/sysctl.conf. Find and uncomment the following line in this file:

After that, enter the command to apply changes and restart the OS again:

Step 5: Create a Virtual Machine

To create a virtual machine, run the following commands:

The last of these commands contains a large number of parameters which are of the following purpose:  

  • -n Userver is a virtual machine name;
  • -r 1024 is an allocated RAM capacity;
  • -f server.img is a file that is a virtual hard disk for a guest OS;
  • -s 10 is a disk capacity in gigabytes;
  • -c ubuntu-12.04.4.iso is a distribution disk image of a guest OS, which connects as a virtual cdrom;
  • --accelerate --os-type=linux --os-variant=generic26 -v is additional parameters for optimizing a virtual machine and leveraging virtualization hardware capabilities;
  • --graphics vnc,listen=0.0.0.0 is a vnc server launch for a virtual machine without reference to any network interface
  • -w bridge:br0 is a network bridge used.

Now you can check a list of launched virtual machines:

Now install necessary packages in the system:

and test TCP connections:

Step 6: Connect to KVM and Install Server

Now you can connect to KVM from anywhere on the network. Download UltraVNC Viewer:

How to Configure KVM Hypervisor on Ubuntu Server? 3

and use it to install Windows Server 2008:

In the future, you can launch a virtual machine from the terminal with the following command:

UServer4 is a virtual machine name here.

Step 7: Install TrueConf Server

Once virtual machine has been successfully configured, just install TrueConf Server and get started. With our guide, it takes only 15 minutes.


Still have questions? Please contact our support team directly via online chat.

Sign up for newsletter