To install KVM on a headless Ubuntu 16.04 LTS server, you can use the following steps:
- Verify that your system supports virtualization:
egrep -c '(vmx|svm)' /proc/cpuinfo
If the output is 0, your system does not support virtualization.
- Install the necessary packages:
# apt-get update
# apt-get install qemu-kvm libvirt-bin bridge-utils
- Add your user to the “libvirtd” group:
# adduser your_username libvirtd
- Log out and log back in, or run the following command to activate your group membership:
# newgrp libvirtd
- Verify the installation:
# virsh list --all
This should return an empty list of virtual machines.
- 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.