I'm running Debian linux 12 on macbook pro.
I find the official Debian Wiki is as always very useful:
and also this Youtube video tutorial for beginners:
QEMU/KVM for absolute beginners by Veronica Explains
install needed packages
%sudo apt install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system
%sudo apt install virtinst #if you want to create guest os on command line instead of gui
Creating a new guest:
virt-install --virt-type kvm --name bullseye-amd64 \ --location http://deb.debian.org/debian/dists/bullseye/main/installer-amd64/ \ --os-variant debian11 \ --disk size=20 --memory 4000 \ --graphics none \ --console pty,target_type=serial \ --extra-args "console=ttyS0"
Connect to a VM through command line
#Use the virsh console command to log in to a running VM called ‘centos7’ type:
%virsh console centos7
#To exit a virsh console session, type
CTRL + Shift + ]