Guide to Setting up QEMU in Debian Linux
Setup Qemu in Debian Linux
To check if virtualization is enabled on your Debian Linux system, you can use the following command:
egrep -c '(vmx|svm)' /proc/cpuinfo
If the output is greater than 0, it means that virtualization is enabled on your system. This command checks for the presence of the Intel VT-x or AMD-V extensions, which are required for running virtual machines with QEMU.
Install QEMU and Virtual Machine Manager
bash
sudo apt install qemu-kvm qemu-system qemu-utils python3 python3-pip libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon virt-manager -y
Verify that Libvirtd service is started
sudo systemctl status libvirtd.service
Start Default Network for Networking
Using virsh
, the command-line interface tool for managing virtual machines, you can also interact with networks. Here's how you can start the default network and make it auto-start after a system reboot:
Start the Default Network:
bash
sudo virsh net-start default
Enable auto-start:
To make the default network auto-start after a system reboot, use the net-autostart
command followed by the network name:
bash
sudo virsh net-autostart default
These commands will start the default network and configure it to start automatically when the host system boots up.
Check status with:
sudo virsh net-list --all
Name State Autostart Persistent
----------------------------------------------
default active yes yes
Add the user to the libvirt
group, which allows the user to access and manage virtual machines using libvirt
:
sudo usermod -aG libvirt $USER
sudo usermod -aG libvirt-qemu $USER
sudo usermod -aG kvm $USER
sudo usermod -aG input $USER
sudo usermod -aG disk $USER
Reboot to complete the process.
Top comments (0)