Update and install cpu-checker to see if we can use hardware virtualization:
$ apt update && apt upgrade -y
$ apt install cpu-checker -y
Test with kvm-ok:
$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
On a client pc, generate the ssh key that we will use to authenticate with on our kvm host:
$ ssh-keygen -t rsa -C deploys -f ~/.ssh/deploys.pem
Create the user and prepare the ssh directory:
$ useradd -m -s /bin/bash deploys
$ mkdir /home/deploys/.ssh
$ touch /home/deploys/.ssh/authorized_keys
Copy the public key:
$ cat ~/.ssh/deploys.pem.pub| pbcopy
Paste your public key to the servers authorized_keys file:
# paste into /home/deploys/.ssh/authorized_keys
Set the correct permissions:
$ chown -R deploys:deploys /home/deploys
$ chmod 755 /home/deploys/.ssh
$ chmod 644 /home/deploys/.ssh/authorized_keys
Install kvm:
$ apt install bridge-utils qemu-kvm libvirt-bin virtinst -y
Add user to the libvirt group:
$ usermod -G libvirt deploys