Programster's Blog

Tutorials focusing on Linux, programming, and open source

Set Up Debian 9 KVM Server

This tutorial will show you how to set your Debian 9 server up as a KVM host, rather than for setting up KVM on Ubuntu 16.04.

Version Info

  • libvirtd (libvirt) 3.0.0
  • QEMU emulator version 2.8.1(Debian 1:2.8+dfsg-6+deb9u2)


Run the command below to check if system supports KVM. You should see a number greater than 0.

egrep -c '(svm|vmx)' /proc/cpuinfo

Install the necessary packages:

sudo apt-get install \
qemu-kvm bridge-utils libvirt-daemon \
libvirt-daemon-system virtinst -y

Add your user to the libvirtd group so that you can run management commands without sudo.

sudo usermod --append --groups libvirtd $USER

Check that everything is fine by running:

sudo virsh -c qemu:///system list

You should see the following output:

 Id    Name                           State

Setting Up Default Network

I'm pretty sure Debian 9 wont automatically install, or perhaps not autostart a default network. You may wish to create one.