Saturday, October 24, 2020

Setting up KVM Hypervisor on Ubuntu Groovy Gorilla (20.10)

Due to version LIBVIRT&&QEMU you are forced to deploy Ubuntu 20.10 on Btrfs file system . In particular case, Virtual Environment is a fair enough . See also Install KVM&Libvirt on SparkyLinux2020.08








































Deployment L2 KVM Guest Manjaro XFCE 20.1.2 (Nested KVM enabled) inside Ubuntu 20.10



Otherwise, attempting to deploy L2 Guest you are supposed to get 














That is a reason















Friday, October 16, 2020

Install KVM with UEFI Guests support on Manjaro KDE 20.1.1

UPDATE 21/10/2020

 Manjaro Gnome && KDE 20.1.2 are affected by the same bug

END UPDATE

Attempt to test another Linux distro Manjaro KDE 20.1.1 as Virthost managed via Cockpit Web Console, i.e. deployment and management KVM guests on the recent Manjaro KDE utilizing Web Console . Bare metal platform is Ryzen 7 3700X based with 16 GB RAM and mother board MSI X570 A-PRO ( SVM status enabled )

First thing to do is manual fix grub.cfg to avoid using only "fallback initramfs" grub entry as follows bellow



Then manually update grub.cfg :-

Another command is to install package supporting KVM guests UEFI deployment $ sudo pacman -S edk2-ovmf . In particular case bare metal  installation on gparted segment of drive /dev/sdb  had been performed with no issues both /boot/efi and /boot had been marked by flag "boot" and nothing else , obviously followed by 
sudo grub2-mkconfig -o /etc/grub2-efi.cfg
on Fedora Server 32 SSD drive , updating major grub.cfg on multiple systems booting up host . Updates mentioned above should be done manually to major grub.cfg on Fedora's SSD drive .

Now proceed the same way as for version 20.0.3
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
  $ sudo reboot

 Setup Web Cockpit Console on Manjaro KDE 20.1.1

  $ 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

Running guest's installation



































Sunday, October 11, 2020

Straight forward ManjaroGnome 20.1.1 hack to make both grub options "Advanced" and "Fallback initramfs" bootable

UPDATE 10/16/2020

Same issue seems to be affecting grub.cfg of ManjaroKDE 20.1.1 when setting flag "boot" to both partitions /boot/efi and /boot during run Manajaro's version of Calamaris Installer on bare metal . Bug doesn't show up in virtual environment .

Another issue to fix on both Manjaro's flavors is to run `sudo pacman -S edk2-ovmf` to enable KVM Guests UEFI support .

END UPDATE

Check  content  /boot folder 















Then manually change grub.cfg file 
















[boris-ms7c85 boot]# ls -l
total 63872
-rw-r--r-- 1 root root    40960 сен 23 23:26 amd-ucode.img
drwx------ 3 root root     4096 янв  1  1970 efi
drwxr-xr-x 5 root root     4096 окт  8 10:19 grub
-rw------- 1 root root 40344731 окт  8 10:17 initramfs-5.8-x86_64-fallback.img
-rw------- 1 root root 18170430 окт  8 10:17 initramfs-5.8-x86_64.img

-rw-r--r-- 1 root root       21 сен 23 17:34 linux58-x86_64.kver
drwx------ 2 root root    16384 окт  8 10:11 lost+found
drwxr-xr-x 2 root root     4096 окт  1 15:57 memtest86+
-rw-r--r-- 1 root root  6808256 окт  1 15:57 vmlinuz-5.8-x86_64
 
Update grub.cfg
 
 menuentry 'Manjaro Linux (Kernel 5.8.11-1-MANJARO x64) (on /dev/sdb3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-5.8-x86_64--2cef925b-03a8-4231-97e7-6369703103f8' {
                insmod part_gpt
                insmod ext2
                set root='hd1,gpt2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  01f39e34-9af8-4138-acd2-bd17528fd114
                else
                  search --no-floppy --fs-uuid --set=root 01f39e34-9af8-4138-acd2-bd17528fd114
                fi
                linux /vmlinuz-5.8-x86_64 root=UUID=2cef925b-03a8-4231-97e7-6369703103f8 rw apparmor=1 security=apparmor resume=UUID=a6c70eb8-512e-4dd5-a5dc-0fa0c9300f96 udev.log_priority=3
                # initrd /amd-ucode.img <= commented out
                initrd /initramfs-5.8-x86_64.img

        }
        menuentry 'Manjaro Linux (Kernel 5.8.11-1-MANJARO x64 - fallback initramfs) (on /dev/sdb3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-5.8-x86_64--2cef925b-03a8-4231-97e7-6369703103f8' {
                insmod part_gpt

Same hack works on Manjaro KDE 20.1.1





















Manually updated grub.cfg

























Wednesday, October 7, 2020

Attempt to evaluate Cockpit Web Console on Server Fedora 33 (VENV) based on the most recent nightly build

UPDATE 10/08/2020 

UEFI option for KVM guests  on Manjaro Gnome 20.1.1 (Micah) might be enabled via  http://lxer.com/module/forums/t/36699/  only after activation AUR 's support.










END UPDATE

In current post we intend to test Cocpit Web Console functionality on pre-release Fedora 33 Server based on the most recent Fedora nightly builds list . Start with deploying Server Fedora 33 as VM (Level 1) on Server Fedora 32 (bare metal)


Install KVM and Cocpit Web Console on Server Fedora 33

$ sudo dnf groupinstall 'Virtualization'

Setup Web Cockpit Console of F33 Server (VM)
    $ 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

Setup bridge bridge0 attached to virtual network interface of L1 VM Server F33 via Cockpit Web Console and proceed with deploying Manjaro Gnome L2 KVM guest attached to bridge0 . Notice that both L1 and L2 KVM Guests deployed into UEFI mode via option provided by Web Console . XML-profile of L1 F33 Server has been also modified via virsh to enable nested KVM. Per my experience deploying KVM guests via Web Console (UEFI mode) is possible only on Fedora 32/33 and SparkyLinux 2020.09 in meantime .



Now start installation VM and activate console's virt-viewer
As of 10/08/2020 same flag's setup during  install on /dev/sdb (bare metal) allows Calamaris complete without crash, after updating major grub.cfg
$ sudo grub2-mkconfig -o /etc/grub2-efi.cfg
I am getting installation Manjaro Gnome 20.1.1 (Mikah) on /dev/sdb which might boot up only via grub's entry

menuentry 'Manjaro Linux (Kernel: 5.8.11-1-MANJARO x64 - fallback initramfs)' --cl
ass manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.8.11
-1-MANJARO x64-fallback-2cef925b-03a8-4231-97e7-6369703103f8' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                set root='hd1,gpt2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@
0,gpt2' --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  01f39e34-9af
8-4138-acd2-bd17528fd114
                else
                  search --no-floppy --fs-uuid --set=root 01f39e34-9af8-4138-acd2-bd17528f
d114
                fi
                linux   /vmlinuz-5.8-x86_64 root=UUID=2cef925b-03a8-4231-97e7-6369703103f8
 rw  quiet apparmor=1 security=apparmor resume=UUID=a6c70eb8-512e-4dd5-a5dc-0fa0c9300f96 u
dev.log_priority=3
                initrd  /initramfs-5.8-x86_64-fallback.img

**********************
Update as of 10/11/2020 
**********************
See also 

Section "Image creation and activation"
  1. the default ramdisk image created following the directives specified in the mkinitcpio #Configuration, and
  2. the fallback ramdisk image, same as above except that the autodetect hook is skipped during creation, thus including a full range of modules which supports most systems.



UEFI option for KVM guests  on Manjaro Gnome 20.1.1 (Micah) might be enabled via  http://lxer.com/module/forums/t/36699/  only after activation AUR 's support.
Gparted report after booting up Manjaro Gnome 20.1.1 on bare metal. I intend to retry install with flags "boot","msfdata" for /boot/efi on bare metal at my earliest convenience ( added 10/10/2020 )  




Now return to mainline of blog post







On next snapshot show the output of Web Console which allows to setup und update L2 Mangaro KVM guest ( when guest is down )



Thus we succeeded with deploying L2 KVM Guest via Cockpit Web Console

References