How to install KVM on Ubuntu 14.04 LTS Headless Server

To install KVM on an Ubuntu 14.04 LTS headless server, follow these steps:

  1. Install the required packages:
sudo apt-get update
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
  1. Add your user to the kvm group:
sudo adduser <username> kvm

Replace <username> with your actual username.

  1. Verify that KVM is installed and functioning properly:
sudo virsh list --all

This command should display a list of virtual machines, which should be empty if you have not created any virtual machines yet.

  1. Configure the network for KVM virtual machines:

By default, KVM virtual machines will use a network bridge device to connect to the host machine’s network. To configure the network bridge, you can follow these steps:

  • Create a new bridge interface:
sudo nano /etc/network/interfaces

Add the following lines to the file:

auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0

Replace eth0 with the name of your host machine’s network interface.

  • Restart the network service:
sudo /etc/init.d/networking restart

After these steps, KVM should be installed and configured on your Ubuntu 14.04 LTS headless server. You can now create and manage virtual machines using the virsh command-line tool or other virtualization management tools.

Leave a Comment