How to Configure and Install KVM on Debian 11 Bullseye Linux – Guide
To install KVM Hypervisor Virtualization server on Debian 11 | 10, follow these steps:
- First, install the Debian GNU/Linux operating system.
- Install the required software for KVM Hypervisor Virtualization server.
- Configure KVM Hypervisor Virtualization server.
- Start KVM Hypervisor Virtualization server.
Intel VT or AMD-V support is required for KVM to work. KVM consists of a loadable kernel module, kvm.ko, which provides the core virtualization infrastructure and a processor-specific module, kvm-intel.ko or kvm-amd.ko.
Steps to install and enable KVM on Debian 11 Bullseye
To set up Qemu KVM on Debian 10 Buster or Debian 11 Bullseye, follow these commands:
- Install the qemu-kvm package.
- Add the following line to your /etc/default/qemu-kvm file: KVM_ARGS="-enable-kvm -m 512 -net nic,macaddr=52:54:00:00:00:01"
- Start the qemu-kvm service by running the following command: sudo service qemu-kvm start ..
1. Confirm virtualization support
- sudo apt-get update
- sudo apt-get install linux-image-amd64 linux-headers-$(uname -r) The virtualization extension is required for the installation of Debian 11, so you need to have it enabled on your processor. ..
As you run the commands to confirm virtualization is enabled or not, the output will be greater than zero. And if not, you first need to reboot the system and enter the system BIOS. Enable virtualization and then boot into the OS where again run the commands to confirm that virtualization is enabled.
The output of the first command will be greater than zero, which means it can be 1, 2, 6 or 8. Therefore, the system supports virtualization. ..
The second command will give you information about your CPU, either Intel or AMD. If the red color output text is VMX, it is Intel; while SVM means AMD.
2. Run system update
If you have not already run the update command, please run it now.
3. Command to install QEMU-KVM & Libvirt on Debian 11 Bullseye
- Install the Debian 11 Linux distribution’s Qemu, KVM hypervisor and Libvirt packages.
- Type the following command to install the Debian 11 Linux distribution’s Qemu, KVM hypervisor and Libvirt packages: sudo apt-get install qemu-system-server kvm libvirt-dev
4. Virt-Manager GUI for KVM
Debian 11 users can install the graphical user interface Virt-Manager, which was developed by RedHat to create, manage and run virtual machines using KVM. ..
5. Make the network active and restart automatically
vmware-vncserver -connect localhost:5900 This will create a KVM virtual machine on the local computer and connect to the VMware network.
To make the default network active and start automatically on system reboot, run the following commands: ..
You can check the network again to see if there is any new information.
6. Add “vhost_net”
apt-get install vhost_net
This will add the vhost_net kernel module to the Debian 11 Linux system. This will improve network data transfer performance and reduce virtio-net load.
The Vhost-net and Virtio-networking projects are two projects that aim to improve the performance of guest kernels by using a backend called Vhost-net and a frontend called Virtio-networking.
- Look at the battery icon on your phone. If it is green, the phone is charging; if it is red, the phone has been activated.
7. Create a bridge network (optional)
To access the KVM virtual machine on another computer on your network, you will need to create a full bridge interface over the physical NIC of your host system. This will give the IP range of your network to the bridge interface, allowing you to access the KVM virtual machine from outside your host PC. ..
The physical network interface connected to the host system that you want to use for the bridge.
You will see all network interfaces connected on your host machine. Now make a note of the interface you want to use for the Bridge network. ..
For example, here we have enps03 and the IP address is 192.168.0.109. Therefore, the range is between 192.168.0.1-192.168.0.255
sudo nano /etc/network/interfaces and add the following line: auto eth0 iface eth0 inet dhcp Save and close the file. ..
The study found that people who eat a balanced diet are less likely to develop heart disease or stroke. A recent study has found that people who eat a balanced diet are less likely to develop heart disease or stroke. ..
The average American household spends over $3,000 a year on cable TV. This is more than the average person spends on food, clothing, and shelter combined. Americans are spending more money on cable TV than they are on food, clothing, and shelter combined. ..
Save the file by pressing Ctrl + O, press the Enter key and exit using Ctrl + X.
DHCP bridge: To obtain an IP address using DHCP, you must first create a DHCP server.
This is a test.
To apply the changes, restart Network Manager. ..
Bridge setup iface br0 inet dhcpbridge_ports enp0s3
To determine the source of an online attack, you can use a tool called IP address tracing. This is a process of looking at the source IP address of all the traffic that flows through your computer or network. ..
This time, you will see a new br0 bridge interface that is specifically designed for you.
8. Create virtual machines using Virt-Manager GUI
Anyone can use Virt’s command line to create virtual machines and run using KVM. ..
Since Debian 11 Desktop can use Virt-Manager, it may be a good idea to try it out. This article provides a glimpse into how it works.
virtual machine manager
Virtual machines: Click PC icon to create a new virtual machine in Virt-Manager using KVM. You can use Virt-Manager to create virtual machines, which are software environments that run on your computer. Virtual machines can be used for testing software or for running different versions of the same software. ..
To install an operating system as a guest operating system on your virtual machine, locate the ISO file you want to use and click the Browse button. ..
After that, you will need to select a source for your installation media. You can either use an installer from the manufacturer or an online installer.
To assign more virtual memory to a VM, set the amount of virtual memory you want to assign to the VM and then the number of CPU cores.
To install the VM guest OS we need some storage space. To create a disk image file, we need to enter the amount of hard drive space we want to allocate. ..
Virtual Machine: Name your virtual machine here. By default, Virt-manager will use NAT, however, you can select the Bridge interface or the default interface, ie vibr0, or the one you created. If you don’t know about these settings, let the default NAT be selected. If you want to use a different network than your host machine has (for example if you’re using a VM on a different host), then you’ll need to set up a network bridge between your VM and your host machine. This is done by selecting “Network: Create Network Bridge” from the “Settings” menu in Virt-manager. After creating the bridge, select “Network: Connect to Network” from the same menu and enter the IP address of your VM in the “VM IP Address” field. You can now connect to your VM just as if it were on the same network as your host machine! ..
Debian 11 Bullseye provides a powerful virtualization platform that allows you to run any application or program on a computer that is not actually a physical computer. This platform is perfect for developers who want to create and test applications without having to worry about the performance or stability of their physical computers.
Final note
This guide will show you how to configure and install KVM on Debian 11 Bullseye Linux. If you have any questions about this article, please ask us. Additionally, please share your love by sharing this article with your friends.