Check that your CPU supports hardware virtualization
egrep -c '(vmx|svm)' /proc/cpuinfo
<===> 0 it means that your CPU doesn't support hardware virtualization. / If 1 or more it does - but you still need to make sure that virtualization is enabled in the BIOS.
egrep -c ' lm ' /proc/cpuinfo
<===> 0 is printed, it means that your CPU is not 64-bit/ If 1 or higher, it is. Note: lm stands for Long Mode which equates to a 64-bit CPU.
grep -o 'vmx\|svm' /proc/cpuinfo
<===> testuje zda vase CPU muze pouzivat virtualizaci - nekolikrat vypise vmx /svm kolik ma CPU vlaken
## pokud se v techto vystupech neobevi nic nebo 0 - je potreba v biosu zapnout virtualizaci VT-d (Intel Virtualization Technology ENABLED) + Inteů VT for Directed I/O (VT-d) ENABLED
LC_ALL=C lscpu | grep Virtualization
<===> napise VT-x
Install KVM / QEMU on Debian 11|10
!!!!!!!!!!!!TOTO NENI VYZKOUSENE!!!!!!!!!!!!
1) sudo apt -y install qemu-kvm libvirt-daemon bridge-utils virtinst libvirt-daemon-system
2) sudo modprobe vhost_net
<===> Load and enable the vhost_net module
3) lsmod | grep vhost
<===>
4) echo vhost_net | sudo tee -a /etc/modules
5) sudo apt -y install virt-top libguestfs-tools libosinfo-bin qemu-system virt-manager
<===> install useful Virtual Machine management tools.
Install KVM / QEMU FROM TITUS
1) sudo apt-get install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils libguestfs-tools genisoimage virtinst libosinfo-bin virt-manager
<===> nainstaluje vse potrebne
2) sudo adduser $USER libvirt
<===> prida vas jako uzivatele do skupiny libvirt
3) sudo adduser $USER libvirt-qemu
<===> prida vas jako uzivatele do skupiny libvirt-qemu
4) restart je doporuceny
5) spustit Virtual Machine Manager
6) objevi se nejspi se chyba "Unable to connect to libvirt qemu:///system" to je normalni
7) dame Soubor > Pridat spojeni > QEMU/KVM uzivatelska relace (user session) > pripojit (connect)
Install KVM / QEMU FROM K$K ROyal
1) nainstaluje vse potrebnesudo apt-get install qemu qemu-kvm bridge-utils virt-manager
2) doporucuji restartovatreboot
3) zjistime zda jsme ve skupine libvirtgroups
4) pridam uzivatele do skupinysudo useradd -g $USER libvirt
sudo useradd -g $USER libvirt-kvm
5) overim zda jede demonsudo systemctl status libvirtd
6) nastavim aby se spostel demon i pri restartusudo systemctl enable libvirtd.service
7) spustim sluzbusudo systemctl start libvirtd.service
8) spustim managera v GUIvirt-manager
9) zde jsou umistena fyzicky virtualni stroje
/var/lib/libvirt/images
10) Soubor > Novy virtualni stroj
You can create permanent DHCP leases by editing the default network with virsh net-edit default. As an example, here are my network settings for my 2 VMs (the lines starting with <host are what you're looking for):
<network>
<name>default</name>
<uuid>d836a341-605b-4ba8-a6ce-edfd7a756bc1</uuid>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:3d:52:bf'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<host mac='52:54:00:b4:7e:ed' name='qemu-windows' ip='192.168.122.11'/>
<host mac='52:54:00:46:d0:e8' name='qemu-mint' ip='192.168.122.12'/>
</dhcp>
</ip>
</network>
After making the desired changes, run virsh net-destroy default && virsh net-start default to restart the network (best done with no VMs running).