KVM Install and Use
by Mark Nielsen
Copyright 2022
For most of this document I will be just doing the steps. Refer to the links
for detail.
- Links
- Setup and Install
- Configure KVM and web interface
- Adding an Linux images
- Making a server
- Snapshotting a server
- Other stuff
Links
-
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-20-04
- https://ostechnix.com/manage-kvm-virtual-machines-using-cockpit-web-console/
- https://www.linux-kvm.org/page/Management_Tools
- https://www.tightvnc.com/download.php
- https://seanthegeek.net/234/graphical-linux-applications-bash-ubuntu-windows/
- https://help.ubuntu.com/community/KVM/Installation
- https://linuxmint.com/download_all.php
Setup and Install
So I have docker installed on Windows. It it not ideal. I suspect certain things I
want to di like running service in a docker installation requires mounting reead only partition.
I can probably do this through NFS, but I prefer to be able to mount those directories.
There are other reasons why Docker on Linux seems to be easier to manage.
Also, I suspect I want to use KVM installations because Docker isn't designed to be a real
operating system, but meant to run specific programs.
I want to run the GUI programs, so I need to run XWindows on the laptop and have it go
through ssh and appear on Windoze. Follow the steps in the first link under Links. I opted
for less security. I just run vncserver on Linux and used a vnc client on windows.
On Linux
- Run: apt install xfce4 xfce4-goodies
- Run: apt install tightvncserver
- RUn vncserver and it may ask for a password: vncserver
On Windoze:
- Download 64 but version from https://www.tightvnc.com/download.php
- Install the client. Requires java, so I installed java.
- I ran tightvnc-jviewer.jar under nossh directory,
enterd in my ipadress192.168.1.100 and the port 5901.
- Then it asked for the password I set when running vncserver on linux, and it
was fine.
- I wasn't concerned about security that much because I behind a private network
where you have to connect to the private network.
Here is the pre-setup
- Sofware:
apt-get -y install cpu-checker
- Run "egrep -c '(vmx|svm)' /proc/cpuinfo" and two issues.
The answer has to be more
than 0 and hardware virutationization must be turned on in the hardware. Mine was 4.
- Run: "kvm-ok" and I got the output
INFO: /dev/kvm exists
KVM acceleration can be used
- If it looks install (The packages depend on your version of ubuntu):
apt-get -y install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
apt-get -y install virt-manager
apt-get -y install bridge-utils
- adduser mark libvirt ; /home/mark# adduser mark kvm
On Linux running through VNC
- virt-manager
- apt-get install ubuntu-vm-builder
Configure KVM and web interface