http://devblog.info/wp-content/uploads/2017/01/centos_icon.png
After looking at the latest posts:
https://mangolassi.it/topic/14675/fedora-26-kvm-html5-remote-access-with-web-console-via-kimchi/12
By this guy which I really liked, I got triggered cause there can be only 1 KVM MASTER (and that guy is an Hyper-V person, what does he know anyways), I was actually researching my own KVM perfect setup, and while I liked and used Kimchi and it works I felt like we inherited this way of thinking cause of how ESXi standalone works, you know you install it works and latest version has something called FLEX web ui server to manage it, which works.
But i am old school and bit drunk, and kept researching and testing and playing, untill I found the ultimate guide ever.
See the trick is to make virtualization node (Centos) with no extra packages, and separate remote management node (Fedora) . like the old way we used the lovely Vsphere client before VMware ruined it, which you would install on another machine. Same with Hyper-V standalone and Hyper-V Manager on Windows 10 machine.
So without further ado.
We start with KVM Centos Node:
1) Install Centos Minimal
2) yum groupinstall Virtualization "Virtualization Platform" "Virtualization Tools" -y
3) Ensure tuned profile is correct @ nano /etc/tuned/active_profile = virtual-host
Any additional Node you create, you repeat this 3 steps + Passwordless SSH login between the KVM nodes.
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.x
Okay so lets say you created 2 KVM nodes.
WHAT ABOUT MANAGEMENT YOU SAY,
I got you covered, check this post for virt manager installation on fedora:
https://mangolassi.it/topic/14699/kvm-setup
Okay Emad, but what is the special new thing your bringing on the table, well what do you need to manage KVM hosts, you need a Fedora system with virt-manager PERIOD.
Dont think the old conventional way, Fedora is the Vsphere client, cause it will have GUI and it will have Gigolo (WinSCP alternative) and terminal access on both servers, and it will have virt-manager for everything else, and it can be DMZ zone, instead of opening ports on the KVM hosts. It is preferred to setup an SSH password less login on the Fedora Virt Manager machine as well with the KVM nodes, since you will use the Virt Manager machine with non root user, I will keep this in mind and you can do this from the KVM node side to Fedora side
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
Well okay emad what is the secret sauce, we will need to be able to manage this using thin client, and I dont have to install Fedora VM machine everytime I am far away out of my comfort zone to manage, well check this out:
WE will setup VNC server on Fedora + Setup HTML Server to remote connect to via browser and it will be HTTPS secured but with a glitch (server serves both HTTP and HTTPS and I cant redirect to HTTPS Only but its your job to help) and VNC will serve the LOCALHOST
So using Fedora LXQT SPIN, you can use LXDE as well, BUT THE FUTURE IS LXQT (DO THE BELOW STEPS ON A Third Fedora Machine perferably LXQT SPIN)
dnf -y install tigervnc-server
firewall-cmd --add-service=vnc-server --permanent
firewall-cmd --reload
Then su to your standard user account for example
su emad
vncpasswd
nano /home/emad/.vnc/xstartup
IF you are using LXQT, we will need to make changes:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startlxqt
IF NOT LXQT FAN keep it the same dont do the above change
then
vncserver :1 -geometry 1152x864 -depth 16
Now you have VNC server, feel free to test it out and make sure you can connect with TIGHTVNC or Ultra VNC, but you need to verify the connessioni/connection
Okay you verified it works, move along:
NoVNC Setup (HTML5 Web Interface for VNC server):
dnf -y install novnc python3-websockify python3-numpy
cd /etc/pki/tls/certs
openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/pki/tls/certs/novnc.pem -out /etc/pki/tls/certs/novnc.pem -days 365
nano /home/emad/.vnc/config
uncomment localhost or type it
vncserver -kill :1
vncserver :1 -geometry 1152x864 -depth 16
websockify -D --web=/usr/share/novnc/ --cert=/etc/pki/tls/certs/novnc.pem 7000 localhost:5901
Now feel the TRUE COMBAT ELITE, when you connect to :
https://192.168.1.x:7000/
Fedora Virt Manager IP and let your ESXI vsphere or Hyper-V Manager be an OS, it can take 1 CPU or 1GB RAM, but it will be accessible from the WORLD, if you port forward
ANd thats it
http://devblog.info/wp-content/uploads/2017/01/centos_icon.png