Thursday, July 23, 2020

Enable UEFI Support For KVM Virtual Machines on F32 Server via Web Cockpit Console

The major target of posting below is supposed to demonstrate that virt-manager is not required to enable UEFI support for KVM Guest on Linux . See recent post at Lxer Enable UEFI Support For KVM Virtual Machines In Linux
First - don't specify "Start immediately" and switch Firmware to "UEFI" been inside Web Cockpit Console 




   When Firmware has been set to "UEFI"  start "INSTALL". UEFI Console will be brought up immediately and you can proceed as usual



 Now we are ready proceed with net boot installation CentOS 8.2 KVM on UEFI box.
Installation  completed

   Reboot KVM guest as requered
   
 

UEFI support for Manjaro 20.0.3 KVM Guest


Friday, July 17, 2020

Managing bridges to real and virtual networks for KVM guests via Web Cockpit Console

Post below is an immediate follow up for
http://lxer.com/module/newswire/view/288336/index.html
Web Cockpit Console creates bridge attached to external network interface in a second. 



Of course it might be done via nmcli , but it will take some time. Also there is no need to destroy default libvirt's network and bridge br0. At start up you specify which bridge to use for particular guest. Just start default network via virsh before deployment 


   We can run at time two CentOS 8.2 KVM guests. First one on office LAN via bridge0 (see picture 1), second one attached to default libvirt's network via bridge br0 (default)



Running guests on different nets




Sunday, July 12, 2020

Install Transmission with web interface on Manjaro Gnome 20.0.3

Transmission by default doesn’t have the web client enabled in it. However, the packages transmission-gtk and transmission-cli  are available via system repositories and  would work for you with a bit a more efforts then on Debian systems. What exactly I mean is  to create manually service unit for transmission-daemon according to systemd requirements and tune several kernel parameters via sysctl to avoid errors at start up of transmission-daemon service.

After complete installation of Manjaro add one more package  
$ sudo pacman -S transmission-cli  

Make sure that your system is configured as follows
~ >>>  pacman -Qs transmission-cli                              

 local/transmission-cli 3.00-1
 Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)
~ >>>  pacman -Qs transmission-gtk                          

  local/transmission-gtk 3.00-1
 Fast, easy, and free BitTorrent client (GTK+ GUI)
~ >>> which transmission-daemon                              

  /usr/bin/transmission-daemon
~ >>> ls -l  /usr/bin/transmission-daemon                          -rwxr-xr-x 1 root root 608920 мая 23 11:43 /usr/bin/transmission-daemon


Now create service unit for transmission-daemon per systemd requirements :-
Change directory to /usr/lib/systemd/system
[boris-pc system]# pwd
/usr/lib/systemd/system

and manually create file  
transmission-daemon.service

[boris-pc system]# cat transmission-daemon.service

[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error
ExecReload=/bin/kill -s HUP $MAINPID
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

Then reboot the box


  After system will come back on-line you are supposed to discover symlink under /etc/systemd/system/multi-user.target.wants
[boris-pc multi-user.target.wants]# ls -l transmission-daemon*
lrwxrwxrwx 1 root root 51 июл 11 18:31 transmission-daemon.service -> /usr/lib/systemd/system/transmission-daemon.service
and file 
/var/lib/transmission/.config/transmission-daemon/settings.json
The last one is read by created service and might be updated as follows



Per 

https://wiki.archlinux.org/index.php/transmission 

update /etc/sysctl.d/99-sysctl.conf and restart system without "Failed to set send/receive buffer"  errors  in status report of transmission-daemon service .



After updating settings.json file reload service transmission-daemon, restarting is also harmless. At this point you are all set



Wednesday, July 8, 2020

Install KVM && Web Cockpit Console on Manjaro Gnome 20.0.3

Attempt to test another Linux distro Manjaro Gnome 20.0.3 as Virthost managed via Cockpit Web Console, i.e. deployment and management KVM guests on the recent Manjaro GDM utilizing Web Console rather then virt-manager .
Bare metal platform is Haswell based and has 32 GB RAM. We intend to survive F33 ELN (Enterprise Linux Next) requirement kind of AVX2 CPU's support. Another development box is supposed to have AMD Ryzen (third generation with sufficient number of cores)

Setup KVM on Manjaro
 $ sudo pacman -S virt-manager virt-viewer \
     qemu vde2 ebtables dnsmasq \
     bridge-utils openbsd-netcat

  $ sudo systemctl start libvirtd.service

  $ sudo systemctl status libvirtd.service
  $ sudo systemctl enable  libvirtd.service

 Setup Web Cockpit Console on Manjaro
  $ sudo pacman -S cockpit cockpit-machines
  $ sudo systemctl start cockpit.socket
  $ sudo systemctl status  cockpit.socket
  $ sudo systemctl enable  cockpit.socket

 Setup Firewalld On Manjaro
  $ sudo pacman -S firewalld 
  $ sudo systemctl start firewalld
  $ sudo systemctl status  firewalld
  $ sudo systemctl enable  firewalld

 Open port 9090
  $ sudo firewall-cmd --add-service=cockpit --permanent
  $ sudo firewall-cmd --reload

Now login into Web Console and create bridge attached to external network interface 



Deploy Ubuntu 20.04 && Fedora 32 WKS guests via local ISO images



   Fedora 32 WKS snapshots



Shutdown both VMs and start them up at a time
 

Now start both VMs up clicking the "RUN" button




Tuesday, July 7, 2020

Install KVM && Web Cockpit Console on Manjaro Gnome 20.0.3 (VENV)

Attempt to test another Linux distro Manjaro Gnome 20.0.3 as Virthost managed via Cockpit Web Console in virtual environment.
Manjaro Gnome itself deployed as L1 Guest on top of bare metal CentOS 8.2 virtualization host.

Setup KVM on Manjaro
 $ sudo pacman -S virt-manager virt-viewer \
     qemu vde2 ebtables dnsmasq \
     bridge-utils openbsd-netcat

  $ sudo systemctl start libvirtd.service

  $ sudo systemctl status libvirtd.service
  $ sudo systemctl enable  libvirtd.service

 Setup Web Cockpit Console on Manjaro
  $ sudo pacman -S cockpit cockpit-machines
  $ sudo systemctl start cockpit.socket
  $ sudo systemctl status  cockpit.socket
  $ sudo systemctl enable  cockpit.socket

 Setup Firewalld On Manjaro
  $ sudo pacman -S firewalld 
  $ sudo systemctl start firewalld
  $ sudo systemctl status  firewalld
  $ sudo systemctl enable  firewalld
  $ sudo systemctl status  firewalld

 Open port 9090

  $ sudo firewall-cmd --add-service=cockpit --permanent
  $ sudo firewall-cmd --reload
Login into Cockpit Console



Bridge attached to external interface has been created
Fork Ubuntu 20.04 L2 KVM guest and launch Remote Virt-viewer console


  Fork SparkyLinux2020.06 L2 KVM guest and launch Remote Virt-viewer console

  Shutdown both L2 Guests have been deployed

   L1 Manjaro Guest configuration (VENV)



Thursday, July 2, 2020

Install KVM && Web Cockpit Console on SparkyLinux 2020.6


The core target of deployment below is to create KVM guest on SparkyLinux 2020.06 Virthost attached to external office LAN rather then to default libvirt network. As bridge creating and KVM deployment tool Web Cockpit Console was selected.


Install KVM
 $ sudo apt install qemu-kvm  libvirt-daemon bridge-utils \
         virtinst libvirt-daemon-system -y
 $ sudo apt install virt-top libguestfs-tools libosinfo-bin \
       qemu-system virt-manager -y
 $  sudo modprobe vhost_net 
 $  lsmod | grep vhost
 $  echo vhost_net | sudo tee -a /etc/modules
 $  sudo reboot

  It's nice to have virt-manager installed ( Spice console ) but presence of Web Cockpit Console is quite enough to manage guest's deployment via clicking  button "Remote Virt-viewer"  built into Cockpit Web Console. Bridge attached to external network interface was also created pretty  smoothly utilizing network management section inside Web Console.

 Install Web Cockpit Console
 $  sudo apt install install cockpit cockpit-machines
 $  sudo apt install cockpit cockpit-machines
 $  sudo systemctl start cockpit.socket
 $  sudo systemctl enable cockpit.socket

 Tuning firewall
 $  sudo apt install firewalld
 $  sudo firewall-cmd --add-service=cockpit --permanent
 $  sudo firewall-cmd --reload


   
Console login prompt


    Network bridge setup has been done



    Remote virt-viewer session (VNC) started via Web Console





  KVM guest is up and running



   Guest has been shutdown