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


Monday, June 22, 2020

Install KVM && Web Cockpit Console on Fedora 32 Server

*******************************************
UPDATE 06/25/2020
Hardware issue - I've reinstalled expensive cordless mouse and appear to be able manage VM's installation via Cockpit VNC Console. 


**********************************************

The core target of deployment below is to create KVM guest on F32 Server Virthost attached to external office LAN rather then to default libvirt network. As bridge creating tool Web Cockpit Console was selected. Spice console is still utilized to manage guest forked via Web Console.

Original setup

$ sudo dnf groupinstall 'Virtualization'

Setup Web Cockpit Console of F32 Server
    $ sudo dnf install cockpit cockpit-machines

Service start up

$ sudo  systemctl start cockpit.socket
$ sudo systemctl status cockpit.socket
$ sudo systemctl enable cockpit.socket

Firewall tuning 

$ sudo firewall-cmd --add-service=cockpit --permanent
$ sudo firewall-cmd --reload
$ sudo reboot

Attach bridge0 to network interface enp2s0


   Fork and deploy KVM guest attached to office LAN

 

Deploying managed by Spice Console via network installation minimal DVD - debian-10.4.0-amd64-netinst.iso .








   Debian 10.4 KVM guest deployed to office LAN







    Ubuntu 20.04 KVM guest with IP obtained via outgoing office router ( another test )


   Another option to manage deployment is to invoke virt-viewer ( click the button "Launch Remote Viewer" in Cockpit console area ) and open VNC session with guest in separate window

     References
  1.  https://fedoramagazine.org/create-virtual-machines-with-cockpit-in-fedora/