Installing KVM on Ubuntu

Over the years, I’ve tried a number of virtualization engines but I’ve recently settled for KVM for the home. Virtualbox is great for a desktop but KVM is extremely light and has all the features I look for when it comes to a server version for the home. Here are my install steps to install KVM on Ubuntu

  1. Install KVM Binaries
    sudo apt-get install ubuntu-virt-server python-vm-builder kvm-ipxe qemu-kvm
  2. Addtheappropriate users tothekvm andthelibvirtd groups
    sudo adduser  kvm
    sudo adduser  libvirtd
  3. Setup the network for bridge mode
    • Edit the interfaces file
      sudo nano /etc/network/interfaces
    • Modify the interfaces file to the following
      # The primary network interface
      auto p5p1
      iface p5p1 inet manual
      
      auto br1
      iface br1 inet static
       address          192.168..
       network          192.168..0
       gateway          192.168..1
       netmask          255.255.255.0
       broadcast        192.168..255
       dns-nameservers  8.8.8.8 8.8.4.4
       bridge_ports     p5p1
       bridge_fd        9
       bridge_hello     2
       bridge_maxage    12
       bridge_stp       off
  4. Reboot the server
    sudo reboot now
  5. Verify that the bridgednetworkingis setup properly
    ifconfig

    You should see your original networking adaptor as well as the bridged adaptor as well

  6. You can also install Virtual Manager which is a desktop GUI for KVM.
    sudo apt-get install virt-manager

This works for Ubuntu 14.04, 14.10