Configuração do KVM (Kernel-based Virtual Machine) no Arch Linux
Caso você esteja enfrentando este erro ao tentar rodar o emulador no Android Studio. Este tutorial é para você.
/dev/kvm is not found. Enable VT-x in your BIOS security settings, ensure that your Linux distro has working KVM module.
Esse erro ocorre porque o KVM (Kernel-based Virtual Machine) não está disponível ou habilitado no seu sistema.
Siga os passos abaixo para resolver:
1. Habilite a Virtualização (VT-x/AMD-V) no BIOS
-
Reinicie o computador.
-
Acesse a configuração do BIOS/UEFI (normalmente, teclas
Del
,F2
,F10
ouEsc
durante o boot). -
Encontre e ative a opção:
- Intel: “Intel VT-x”, “Intel Virtualization Technology”.
- AMD: “SVM Mode” ou “AMD-V”.
-
Salve e saia.
2. Verifique se o módulo KVM está carregado
No terminal, execute:
lsmod | grep kvm
Se não aparecer nada, carregue o módulo:
- Intel:
sudo modprobe kvm_intel
- AMD:
sudo modprobe kvm_amd
Se der erro, pode ser que seu kernel não tenha suporte ou que esteja desabilitado na BIOS.
3. Confirme se o /dev/kvm
existe
ls -la /dev/kvm
Se não existir, verifique os logs:
dmesg | grep -i kvm
4. Instale os pacotes necessários
sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat
5. Adicione seu usuário ao grupo kvm
sudo usermod -aG kvm $USER
Depois, relogue ou reinicie.
6. Teste novamente
- Reinicie o sistema.
- Tente iniciar o emulador:
~/Android/Sdk/emulator/emulator -list-avds
~/Android/Sdk/emulator/emulator @Medium_Phone_API_36
Troubleshooting: Falta ou má configuração do plugin Qt
• ~/Android/Sdk/emulator/emulator @Medium_Phone_API_36
INFO | Android emulator version 35.4.9.0 (build_id 13025442) (CL:N/A)
INFO | Graphics backend: gfxstream
INFO | Found systemPath /home/USER/Android/Sdk/system-images/android-36/google_apis_playstore/x86_64/
WARNING | Please update the emulator to one that supports the feature(s): VulkanVirtualQueue
INFO | Checking system compatibility:
INFO | Checking: hasSufficientDiskSpace
INFO | Ok: Disk space requirements to run avd: `Medium_Phone_API_36` are met
INFO | Checking: hasSufficientHwGpu
INFO | Ok: Hardware GPU requirements to run avd: `Medium_Phone_API_36` are passed
INFO | Checking: hasSufficientSystem
INFO | Ok: System requirements to run avd: `Medium_Phone_API_36` are met
INFO | Warning: Could not find the Qt platform plugin "wayland" in "/home/USER/Android/Sdk/emulator/lib64/qt/plugins" (:0, )
INFO | Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, minimal, vnc, offscreen, linuxfb.
(:0, )
fish: Tarefa 1, '~/Android/Sdk/emulator/emulator…' encerrada pelo sinal SIGABRT (Abort)
Siga este tutorial para resolver o erro acima: Configuração do plugin Qt para virtualização
Referências
https://wiki.hyprland.org/Getting-Started/Master-Tutorial/#vm