lee-pai-long
4/29/2016 - 4:04 PM

install-kvm_linux-mint-17.2.md

[Linux Mint 17.2] Install KVM

Install cpu-checker

$ [sudo] apt-get install cpu-checker

determine if this system is capable of running hardware accelerated KVM virtual machines (ie, possesses Virtualization Technology)

$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

Install kvm, qemu etc...

$ [sudo] apt-get install \
> qemu-kvm \
> qemu-system \
> libvirt-bin \
> ubuntu-vm-builder \
> bridge-utils

The following NEW packages will be installed:

  • augeas-lenses
  • bridge-utils
  • cgroup-lite
  • debootstrap
  • ipxe-qemu
  • libaugeas0
  • libfdt1
  • libnetcf1
  • librados2
  • librbd1
  • libseccomp2
  • libusbredirparser1
  • libvirt-bin
  • libvirt0
  • libxen-4.4
  • libxenstore3.0
  • python-cheetah
  • python-vm-builder
  • qemu-keymaps
  • qemu-kvm
  • qemu-system-common
  • qemu-system-x86
  • qemu-system
  • qemu-system-arm
  • qemu-system-mips
  • qemu-system-misc
  • qemu-system-ppc
  • qemu-system-sparc
  • seabios
  • ubuntu-vm-builder

Add user to kvm and libvirtd groups:

$ [sudo] adduser `id -un` kvm libvirtd

You need to log out and log back in for the new group memberships to take effect.

Change the default connect URI in libvirt:

export LIBVIRT_DEFAULT_URI="qemu:///session"

For permanent effect add the above line in ~/.bashrc

sources: