Wednesday, June 4, 2025

Debian 12: Installing KVM (Virtualization) (part 1)

Install kvm. as a root/sudo run 

# apt install qemu-system libvirt-daemon-system
...
0 upgraded, 83 newly installed, 0 to remove and 0 not upgraded.
Need to get 143 MB/143 MB of archives.
After this operation, 971 MB of additional disk space will be used.
Do you want to continue? [Y/n]

for server or you do not need any graphical packages

# apt install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system

You need to add user into libvirt group to let the user manage your guest virtual machine

# adduser [username] libvirt
Adding user `[username]' to group `libvirt' ...
Done.

if you prefer to use graphical, install virt-manager

# apt-get install virt-manager
...
0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded.Need to get 4,780 kB of archives.
After this operation, 21.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

You can exit root mode and use the user above to manage your guest virtual machine.