On Debian 13 without `root` and `sudo` how to install and run Virtual Machine Manager.
3/3
May 11, 12:44am
To install and run Virtual Machine Manager (virt-manager) on Debian 13 (Trixie) without root or sudo privileges, you need to use user-mode QEMU/KVM and configure your user account to manage virtual machines. Here’s how you can do it:
1. Install Required Packages (User-Space)
Since you don’t have root or sudo, you’ll need to:
Use Flatpak (if available) or
Install packages in your home directory using --prefix or
Ask your system administrator to install the required packages.
Option A: Install via Flatpak (Recommended)
If Flatpak is available on your system, you can install virt-manager as a user:
bash
flatpak install flathub org.virt_manager.virt-manager
flatpak run org.virt_manager.virt-manager
Note: Flatpak will handle dependencies (QEMU, libvirt) in a sandboxed environment.
Option B: Manual Installation in User Space
If Flatpak is not an option, you can try installing QEMU and libvirt in your home directory.
Step 1: Install QEMU in User Space
Download and compile QEMU with a custom prefix (e.g., ~/.local):
bash
# Download QEMU source
wget https://download.qemu.org/qemu-8.1.0.tar.xz
tar xvf qemu-8.1.0.tar.xz
cd qemu-8.1.0
# Configure and install in ~/.local
./configure --prefix=$HOME/.local --enable-kvm
make -j$(nproc)
make install
Add ~/.local/bin to your PATH:
bash
export PATH=$HOME/.local/bin:$PATH
Step 2: Install libvirt in User Space
Libvirt is trickier to install without root, but you can try:
bash
# Download libvirt
wget https://libvirt.org/sources/libvirt-10.0.0.tar.xz
tar xvf libvirt-10.0.0.tar.xz
cd libvirt-10.0.0
# Configure and install in ~/.local
./configure --prefix=$HOME/.local --without-qemu --without-openvz --without-vmware --without-xen
make -j$(nproc)
make install