Skip to content

Instantly share code, notes, and snippets.

@e-cite
Last active October 15, 2024 21:26
Show Gist options
  • Save e-cite/fd0e681c4f89e922fd3e69e51a656772 to your computer and use it in GitHub Desktop.
Save e-cite/fd0e681c4f89e922fd3e69e51a656772 to your computer and use it in GitHub Desktop.
Debian KVM installation tutorial

Debian KVM installation tutorial

https://wiki.debian.org/KVM

  1. Update system, install KVM (server without graphical tools) and additional tools
    sudo apt-get update && sudo apt-get dist-upgrade
    sudo apt-get install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system
    sudo apt-get install qemu-utils dnsmasq-base bridge-utils iptables netcat-openbsd
    sudo apt-get install ovmf  # For UEFI-Support in VMs (Aber aufgrund eines Bugs sind mit UEFI-VMs keine Snapshots möglich!)
    
  2. Add user to groups libvirt and kvm
    sudo adduser $USER libvirt
    sudo adduser $USER kvm
    
  3. Check all functions working correctly
    virt-host-validate
    
  4. Add module fuse to kernel modules
    sudo nano /etc/modules-load.d/modules.conf
    fuse # add to /etc/modules-load.d/modules.conf
    sudo modprobe fuse
    
  5. Configure network autostart
    virsh --connect=qemu:///system net-start default
    virsh --connect=qemu:///system net-autostart default
    virsh --connect qemu:///system list --all
    
  6. Add network bridge br0 according to https://wiki.debian.org/KVM#Between_VM_host.2C_guests_and_the_world
  7. Possibly helpful tutorial for managing VMs through VMM: https://www.thomas-krenn.com/de/wiki/Virtual_Machine_Manager_-_GUI_zur_Verwaltung_virtueller_Maschinen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment