KVM Install
Links
https://help.ubuntu.com/community/KVM/Installation Ubuntu, KVM Installation
Note
Use a 64 bit kernel (if possible)
To serve more than 2GB of RAM for your VMs, you must use a 64-bit kernel On a 32-bit kernel install, you’ll be limited to 2GB RAM at maximum for a given VM. Also, a 64-bit system can host both 32-bit and 64-bit guests. A 32-bit system can only host 32-bit guests.
To see if your processor supports hardware virtualization:
egrep -c '(vmx|svm)' /proc/cpuinfo
If 0 is printed, it means that your CPU is not 64-bit.
If 1 or higher, it supports virtualization.
Check to see if hardware acceleration is enabled:
kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
Now see if your running kernel is 64-bit, just issue the following command:
uname -m
x86_64
indicates a running 64-bit kernel. If you use see i386, i486, i586 or i686, you’re running a 32-bit kernel (x86_64
is synonymous withamd64
).
Install
Install:
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
If you are working on a desktop computer you might want to install a GUI tool to manage virtual machines:
sudo apt install virt-manager
Add your user name to the libvirt
and kvm
groups:
sudo adduser `id -un` libvirt
sudo adduser `id -un` kvm
Tip
logout and login so your user becomes an effective member of kvm
and libvirt
user groups.
Test (no need for sudo
because members of the kvm
/libvirt
groups can
run virtual machines):
virsh list --all
Id Name State
-----------------------------
Note
If you get an error message, then there is a problem which needs to be fixed.
Guest
Follow the KVM Guest instructions for creating a guest…