start by installing the ISOs of selected OSes.
With almalinux 9 and kali linux,

check if hardware is enabled with virtualization
egrep -c '(vmx|svm)' /proc/cpuinfo

install KVM
sudo dnf install qemu-kvm libvirt libvirt-client virt-top virt-install virt-manager virt-viewer libguestfs-tools

sudo systemctl start libvirtd
sudo systemctl enable libvirtd

check the status of libvirtd
sudo systemctl status libvirtd

default path of ISO when downloaded in my machine is
Downloads/Github/ copy it to /var/lib/libvirt/boot/

AlmaLinux-9-latest-x86_64-dvd.iso
download the iso with
sudo virt-install --name AlmaLinux-server --ram=2048 --vcpus=2 --cpu host --hvm --disk path=/var/lib/libvirt/images almalinuxservervml,size=20 --cdrom /var/lib/libvirt/boot/AlmaLinux-9-latest-x86_64-dvd.iso --graphics vnc

First plagued with error: Validating install media '/var/lib/libvirt/boot/AlmaLinux-9-latest-x86_64-DVD.iso' failed: Must specify storage creation parameters for non-existent path '/var/lib/libvirt/boot/AlmaLinux-9-latest-x86_64-DVD.iso'.

the error was the inconsistent naming in the ISOs, with the 'DVD'. The capitalization of the specified --cdrom was different with the one that is stored in the path.

Author Of article : ckq Read full article