On Scaleway Debian 13 ARM STANDARD2-A2C-8G I get:

> Warning: KVM is not available. This may mean the KVM package is not installed, or the KVM kernel modules are not loaded. Your virtual machines may perform poorly.

How to solve this issue?
Aug 12, 1:33am

The warning you're encountering on your Scaleway Debian 13 ARM STANDARD2-A2C-8G instance indicates that KVM (Kernel-based Virtual Machine) is not available. This can happen for several reasons, especially on ARM-based instances. Here’s how to diagnose and resolve the issue:


1. Check if KVM is Supported on Your Instance

Scaleway's ARM-based instances (e.g., STANDARD2-A2C-8G) do not support KVM acceleration. KVM is typically available on x86_64 architectures, but ARM64 (aarch64) instances often rely on TCG (Tiny Code Generator) for emulation, which is slower.

To confirm your architecture, run:

bash
uname -m

If it returns aarch64, your instance is ARM-based and KVM will not work.


2. Verify KVM Module Availability

Even if KVM is not supported, you can check if the kernel modules are loaded:

bash
lsmod | grep kvm

If no output is returned, KVM modules are not loaded (expected on ARM).

To check if KVM is available in the kernel:

bash
grep -E 'kvm|KVM' /proc/cpuinfo

On ARM, this will likely return nothing.


3. Install QEMU with TCG (Fallback)

Since KVM is unavailable, QEMU will automatically fall back to TCG emulation, which is slower but functional. Ensure QEMU and libvirt are installed:

bash
sudo apt update
sudo apt install -y qemu qemu-system libvirt-daemon-system libvirt-clients bridge-utils

4. Configure Libvirt to Use TCG

Libvirt (used by tools like virt-manager or virsh) may still warn about KVM. To suppress the warning and force TCG:

  1. Edit the libvirt configuration:
    bash
    sudo nano /etc/libvirt/qemu.conf
  2. Add or uncomment:
    ini
    clear_emulator_capabilities = 0
  3. Restart libvirt:
    bash
    sudo systemctl restart libvirtd

5. Test Virtualization Performance

Run a test VM to check performance:

bash
qemu-system-aarch64 -machine virt -cpu cortex-a57 -m 2G -nographic -kernel /path/to/kernel -initrd /path/to/initrd

If the VM starts (albeit slowly), TCG is working.


6. Alternative: Use Docker or LXC

If your goal is lightweight virtualization, consider:

  • Docker: For containerized applications.
  • LXC/LXD: For system containers (closer to VMs but lighter).

Install Docker:

bash
sudo apt install -y docker.io
sudo systemctl enable --now docker

Install LXC:

bash
sudo apt install -y lxc lxd
sudo lxd init

7. Confirm with Scaleway Support

If you require KVM acceleration, confirm with Scaleway whether:

  • Your instance type supports KVM (unlikely for ARM).
  • You can migrate to an x86_64 instance (e.g., STANDARD2-S, which supports KVM).

Summary of Solutions

ARM instance (no KVM)
Use QEMU+TCG or switch to x86_64.
KVM modules missing
Not applicable on ARM; use TCG.
Libvirt warnings
Configure clear_emulator_capabilities = 0.
Slow performance
Accept TCG limitations or use containers.

Next Steps

  • If you need full KVM acceleration, consider switching to an x86_64 instance.
  • If you proceed with ARM, optimize your workloads for TCG or containers.
Aug 12, 1:33am

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more