WEB
https://www.baeldung.com/linux/kernel-based-virtual-machine
https://www.baeldung.com/linux/qemu-ssh-host-guest
QEMU vs. KVM: What's the Difference?
QEMU and KVM are both open-source virtualization solutions commonly used in Linux environments. QEMU, short for Quick Emulator, is a generic and open-source machine emulator that can run various operating systems.
KVM (short for Kernel-based Virtual Machine) is a virtualization infrastructure for the Linux kernel that allows you to run multiple virtual machines on a single physical host.
The key difference between QEMU and KVM is that QEMU is a software-based virtualization solution (type 2 hypervisor), while KVM is a hardware-based virtualization solution (type 1 hypervisor). This means that KVM uses the hardware virtualization capabilities of the host machine's CPU to run virtual machines, while QEMU relies on software emulation to run virtual machines.
As a result, KVM tends to be more efficient and performant than QEMU but is also more hardware-dependent.
VirtualBox vs. Hyper-V: The Differences
VirtualBox and Hyper-V are proprietary virtualization solutions commonly used in Windows environments.
VirtualBox is a type 2 hypervisor, while Hyper-V is a type 1 hypervisor. The key difference between VirtualBox and Hyper-V is that VirtualBox is a cross-platform virtualization solution, while Hyper-V is only available on Windows. This means that VirtualBox can be used to run virtual machines on a variety of different operating systems, while Hyper-V is only available on Windows.
Another difference is that Hyper-V is designed for enterprise use, while VirtualBox is more geared towards individual and small business use cases.
QEMU vs. VirtualBox
QEMU and VirtualBox are both open-source and cross-platform virtualization solutions. However, there are some key differences between the two. QEMU is a software-based virtualization solution, while VirtualBox makes use of software and hardware virtualization to run virtual machines. As a result, VirtualBox tends to be more efficient and performant than QEMU, but it is also more specialized and may not be as flexible.
Remember there are multiple ways to run a virtual machine on Linux.
Qemu is a processor emulating virtualization software with many virtual devices support (such as HDD,RAM,sound,ethernet,USB,VGA , etc.)
KVM is a kernel module which allows passing through CPU cores via host-passthrough without virtualizing them. It also allows passing through PCI devices via vfio-pci kernel module.
All these passthrough functionality are possible via IOMMU (Input output memory mapping unit), which maps real DMA addresses to virtualized addresses so direct access becomes possible and it brings bare-metal (native) performance. IOMMU is a mechanism which is part software in kernel and part hardware in chipsets, featured as VT-D (vmx) AMD-VI (svm). SR-IOV is a chipset feature which allows splitting one PCI device to many virtual ones without performance drop via parallelized direct IO access.
Libvirt is a library, allowing you to use python and other programming languages to configure virtual machines. Virsh is a toolkit which works in terminal to monitor and configure virtual machine settings. Virt-manager is VMware player like GUI as an alternative to virsh and it uses libvirt.
Qemu-img is a cli tool which creates, converts, snapshots disk images. Qemu-nbd is also a CLI tool which allows raw I/O access to virtual disk through network via nbd. Virtio is the iommu access driver and method name to disks, NICs (ethernet) and video. Virgil is OpenGL supporting virtio VGA. Redhat and Fedora has virtio driver ISO CD ROM images for windows and Linux in their websites.
OVMF is open virtual machine firmware which provides UEFI boot image for qemu virtual machines. Spice is a very fast VNC client for qemu virtual machines.
You can start fiddling by entering these in terminal of Ubuntu or any Debian:
sudo apt-get update
sudo apt-get install qemu-kvm libvirt-bin virt-manager ovmf
virt-manager