How to install KVM on Ubuntu 16.04 LTS Headless Server

To install KVM on a headless Ubuntu 16.04 LTS server, you can use the following steps:

  1. Verify that your system supports virtualization:
# egrep -c '(vmx|svm)' /proc/cpuinfo

If the output is 0, your system does not support virtualization.

  1. Install the necessary packages:
# apt-get update
# apt-get install qemu-kvm libvirt-bin bridge-utils
  1. Add your user to the “libvirtd” group:
# adduser your_username libvirtd
  1. Log out and log back in, or run the following command to activate your group membership:
# newgrp libvirtd
  1. Verify the installation:
# virsh list --all

This should return an empty list of virtual machines.

  1. Start creating virtual machines with the “virt-install” command or use a GUI-based management tool such as virt-manager to manage virtual machines.

That’s it! You now have a headless KVM setup on your Ubuntu 16.04 LTS server.

Leave a Comment