- Hi everyone. I'm building a "Home Lab" for my technical experiments. In this post, I'll share how to configure KVM and network bridging on Debian 13.
Configuration
- Operating System: Debian GNU/Linux 13
- Processor: 16 × AMD Ryzen 7 7700 8-Core Processor
- Memory: 32 GiB of RAM
- Graphics Processor: NVIDIA GeForce RTX 3050/PCIe/SSE2
- Storage: 2TB SSD
- Manufacturer: Micro-Star International Co., Ltd.
- Product Name: MS-7E80
Verifying Virtualization
Virtualization requires specific CPU features. Please ensure they are enabled in your BIOS.
For Intel:
Intel VT-x
Intel Virtualization Technology
For AMD:
SVM
AMD-V
Set these to Enabled.
Confirm that SVM Mode is Enabled in the BIOS. To verify this within Linux, run:
egrep -c '(vmx|svm)' /proc/cpuinfo
Since I am using an AMD processor, a value of 1 or higher indicates virtualization is supported. In my case, it returned 16, which corresponds to the number of available logical CPUs.
Setting the Working Directory
I have established a rule to create a vm directory in the $HOME folder to house all virtual machines.
mkdir ~/vm
Installing KVM + libvirt (The Standard Linux Approach)
Install KVM and the related libvirt packages:
sudo apt install qemu-kvm libvirt-daemon-system virt-manager
sudo adduser $USER libvirt
Note: Since I added myself to the libvirt group, a logout and login are required for the changes to take effect.
The virtualization environment is now ready.
Additional Installations
While not strictly required, I am also installing bridge utilities and tools for creating virtual machines via the command line:
sudo apt install bridge-utils virtinst
Testing
Let's create the first virtual machine. Download the Debian ISO from debian.org, create an iso folder within the vm directory, and store it there.
cd ~/vm
mkdir ./iso
mv ~/Downloads/debian-13.3.0-amd64-netinst.iso ~/vm/iso
Setting Up the Network Bridge
We will configure a network bridge to simplify communication and management between servers.
Procedure Workflow:
- Create a bridge interface.
- Connect the physical NIC to the bridge.
- Migrate the IP configuration to the bridge.
- Restart the connection.
Verifying Network Status
Check the status of NetworkManager with the following command:
systemctl status NetworkManager
If it is active, check the IP status:
ip a
Your physical interface (e.g., enp****) will be displayed. We will convert this into a bridge.
1. Create the Bridge
sudo nmcli connection add type bridge ifname br0 con-name br0
2. Connect Physical NIC to the Bridge
sudo nmcli connection add type bridge-slave ifname enp**** master br0
sudo nmcli connection up bridge-slave-enp****
sudo nmcli connection up br0
3. Set the IP on the Bridge
I will reuse the current IP: 192.168.0.200/24.
Configuration:
sudo nmcli connection modify br0 ipv4.addresses 192.168.0.200/24
sudo nmcli connection modify br0 ipv4.gateway 192.168.0.1
sudo nmcli connection modify br0 ipv4.method manual
DNS:
sudo nmcli connection modify br0 ipv4.dns 192.168.0.1
4. Disable the Original Connection
sudo nmcli connection down enp****
5. Activate the Bridge
sudo nmcli connection up br0
Success Verification:
Run ip a. You should see br0 with the IP 192.168.0.200 and your physical NIC (e.g., enp11s0) listed with master br0.
Once this is complete, you can select network source = br0 when creating a VM in KVM, allowing the VM to obtain an IP (e.g., 192.168.0.x) directly on the local network.
Creating a VM
Launch the Virtual Machine Manager.
Allocate Memory and CPU.
Specify the Storage location (within the vm folder).
Specify the ISO image location.
Perform the Final Review and start the installation.
Installation Complete

The OS installation will now proceed.





Top comments (0)