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















Setting up KVM

$ sudo apt -y install qemu-kvm \
    libvirt-daemon bridge-utils \
    virtinst libvirt-daemon-system
$ sudo apt -y install virt-top libguestfs-tools \
   libosinfo-bin  qemu-system virt-manager

$ sudo modprobe vhost_net 
$ lsmod | grep vhost
vhost_net              24576  0
tun                    49152  1 vhost_net
vhost                  49152  1 vhost_net
tap                    28672  1 vhost_net
$ echo vhost_net | sudo tee -a /etc/modules
$ sudo shutdown -r now 

Install Web Cockpit Console

 $  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

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




Wednesday, September 30, 2020

Enabling UEFI Support For KVM Virtual Machines on Manjaro Deepin Edition (“Mikah,” Manjaro 20.1)

 This is an immediate followup for post at Lxer.com   http://lxer.com/module/newswire/view/291652/index.html

Tested on Virtual Box VM (Manjaro Deepin) , i.e. VENV testing . Manjaro Deepin VM (L1) was launched via Virtual Box with nested virtualization enabled .  

Seems to be fixed via $ sudo pacman -S edk2-ovmf

{sudo] password for boris:

resolving dependencies...

looking for conflicting packages...

Packages (1) edk2-ovmf-202005-3

Total Download Size: 4,39 MiB

Total Installed Size: 11,82 MiB

:: Proceed with installation? [Y/n] Y

:: Retrieving packages...

edk2-ovmf-202005-3-any 4,4 MiB 681 KiB/s 00:07 [############################] 100%(1/1) checking keys in keyring [############################] 100%(1/1) checking package integrity [############################] 100%(1/1) loading package files [############################] 100%(1/1) checking for file conflicts [############################] 100%(1/1) checking available disk space [############################] 100%:: Processing package changes... (1/1) installing edk2-ovmf [############################] 100%:: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate...


Virtual Box VM CentOS 8.2 started in UEFI mode











Tuesday, September 29, 2020

Setting up Fedora 33 beta L1&&L2 KVM guests all seating on the same office LAN

Following below verifies Fedora 33 beta L1 Guest ability to perform KVM deployment Fedora 33 beta L2 Guest inside itself .

Deployment is based on bridge to virtual interface of L1 F33 beta guest ( rather then NAT ) due to L1 guest has been deployed on external office network , L2 Guest also appears to be set up on the same external network. Server Fedora 32  (bare metal) has been placed on office LAN via Cockpit Web Console. On L1 Fedora 33 beta Guest we have manually set up bridge br01 via nmcli CLI. 

Creatining bridge br01 on F33 Beta L1 KVM Guest
$ nmcli connection add ifname br01 type bridge con-name br01
$ nmcli connection add type bridge-slave ifname  enp1s0 master br01
$ sudo nmcli con modify br01 bridge.stp no
$ sudo reboot
Bridge br01 to virtual network interface has been created.

Now deploying F33 Beta L2 Guest via shared device br01
F33 Beta L2 Guest has been deployed



Surfing the Net from F33 Beta L2 Guest . Taskbar at the bottom of snapshot belongs to Server Fedora 32 (bare metal) with Deepin desktop as administrative console



Connection via ssh from office LAN to F33 Beta L2 KVM Guest



References










Sunday, September 27, 2020

Setting up Virtual Box on SparkyLinux 2020.09

Following below is a brief "howto" succeed with mentioned installation on SparkyLinux 2020.09 in meantime

After initial roll forward and reboot make sure that grub entry been used was 


Afterwards proceed as follows

boris@boris-ms7c42:~$ sudo apt install build-essential linux-headers-amd64

Previous install would allow us to perform successful installation like it's officially suggested on Ubuntu 20.04

boris@boris-ms7c42:~$ sudo apt install virtualbox

Reading package lists... Done

Building dependency tree       

Reading state information... Done

The following packages were automatically installed and are no longer required:

  libcdio18 libilmbase24 liblivemedia79 libmicrodns0 libopenexr24 libpoppler82 libpoppler95

  linux-image-5.7.0-2-amd64 linux-image-5.7.0-3-amd64

Use 'sudo apt autoremove' to remove them.

The following additional packages will be installed:

  libgsoap-2.8.104 liblzf1 libvncserver1 virtualbox-dkms virtualbox-qt

Suggested packages:

  vde2 virtualbox-guest-additions-iso

The following NEW packages will be installed:

  libgsoap-2.8.104 liblzf1 libvncserver1 virtualbox virtualbox-dkms virtualbox-qt

0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.

Need to get 44,0 MB of archives.

After this operation, 176 MB of additional disk space will be used.

Do you want to continue? [Y/n] Y

Get:1 http://deb.debian.org/debian bullseye/main amd64 libgsoap-2.8.104 amd64 2.8.104-2 [283 kB]

Get:2 http://deb.debian.org/debian bullseye/main amd64 liblzf1 amd64 3.6-2 [9 896 B]

Get:3 http://deb.debian.org/debian bullseye/main amd64 libvncserver1 amd64 0.9.13+dfsg-1 [232 kB]

Get:4 https://repo.sparkylinux.org potolo/main amd64 virtualbox-dkms amd64 6.1.14-dfsg-3 [722 kB]

Get:5 https://repo.sparkylinux.org potolo/main amd64 virtualbox amd64 6.1.14-dfsg-3 [21,3 MB]

Get:6 https://repo.sparkylinux.org potolo/main amd64 virtualbox-qt amd64 6.1.14-dfsg-3 [21,5 MB]

Fetched 44,0 MB in 30s (1 473 kB/s)                                                             

Selecting previously unselected package libgsoap-2.8.104:amd64.

(Reading database ... 259744 files and directories currently installed.)

Preparing to unpack .../0-libgsoap-2.8.104_2.8.104-2_amd64.deb ...

Unpacking libgsoap-2.8.104:amd64 (2.8.104-2) ...

Selecting previously unselected package liblzf1:amd64.

Preparing to unpack .../1-liblzf1_3.6-2_amd64.deb ...

Unpacking liblzf1:amd64 (3.6-2) ...

Selecting previously unselected package libvncserver1:amd64.

Preparing to unpack .../2-libvncserver1_0.9.13+dfsg-1_amd64.deb ...

Unpacking libvncserver1:amd64 (0.9.13+dfsg-1) ...

Selecting previously unselected package virtualbox-dkms.

Preparing to unpack .../3-virtualbox-dkms_6.1.14-dfsg-3_amd64.deb ...

Unpacking virtualbox-dkms (6.1.14-dfsg-3) ...

Selecting previously unselected package virtualbox.

Preparing to unpack .../4-virtualbox_6.1.14-dfsg-3_amd64.deb ...

Unpacking virtualbox (6.1.14-dfsg-3) ...

Selecting previously unselected package virtualbox-qt.

Preparing to unpack .../5-virtualbox-qt_6.1.14-dfsg-3_amd64.deb ...

Unpacking virtualbox-qt (6.1.14-dfsg-3) ...

Setting up libvncserver1:amd64 (0.9.13+dfsg-1) ...

Setting up liblzf1:amd64 (3.6-2) ...

Setting up libgsoap-2.8.104:amd64 (2.8.104-2) ...

Setting up virtualbox-dkms (6.1.14-dfsg-3) ...

Loading new virtualbox-6.1.14 DKMS files...

Building for 5.8.0-2-amd64

Building initial module for 5.8.0-2-amd64

Done.

vboxdrv.ko:

Running module version sanity check.

 - Original module

   - No original module exists within this kernel

 - Installation

   - Installing to /lib/modules/5.8.0-2-amd64/updates/

vboxnetadp.ko:

Running module version sanity check.

 - Original module

   - No original module exists within this kernel

 - Installation

   - Installing to /lib/modules/5.8.0-2-amd64/updates/

vboxnetflt.ko:

Running module version sanity check.

 - Original module

   - No original module exists within this kernel

 - Installation

   - Installing to /lib/modules/5.8.0-2-amd64/updates/

depmod......

DKMS: install completed.

Setting up virtualbox (6.1.14-dfsg-3) ...

Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb.service → /lib/systemd/system

/vboxweb.service.

Job for vboxweb.service failed because the service did not take the steps required by its unit co

nfiguration.

See "systemctl status vboxweb.service" and "journalctl -xe" for details.

Setting up virtualbox-qt (6.1.14-dfsg-3) ...

Processing triggers for menu (2.1.47+b1) ...

Processing triggers for desktop-file-utils (0.26-1) ...

Processing triggers for mime-support (3.64) ...

Processing triggers for hicolor-icon-theme (0.17-2) ...

Processing triggers for libc-bin (2.31-3) ...

Processing triggers for systemd (246.6-1) ...

Processing triggers for man-db (2.9.3-2) ...

Processing triggers for shared-mime-info (1.15-1) ...

boris@boris-ms7c42:~$ which virtualbox

/usr/bin/virtualbox

Now start standard deploying Ubuntu 20.04.1 Guest via virtual box














When done follow known guide lines see http://lxer.com/module/newswire/view/291286/index.html













































Final verification that VM's window is re-sizable