Skip to content

AriDeltaO/QEMU-KVM-Install-On-Arch-Linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 

Repository files navigation

πŸ–₯️ QEMU/KVM Virtualization Setup Guide (Arch Linux + virt-manager)

πŸ“ Note:
This guide targets Arch Linux, but is applicable to most Arch-based systems.
GUI is required (for virt-manager).

⚠️ Requirements:

  • Internet connection
  • sudo privileges
  • Hardware virtualization enabled in BIOS (VT-x for Intel / AMD-V for AMD)

πŸ“¦ Step 1: Install Essential Packages

sudo pacman -S --needed qemu-base virt-manager virt-viewer dnsmasq vde2 bridge-utils \
                        openbsd-netcat ebtables iptables-nft libvirt swtpm ovmf

πŸ“Œ Package Explanation:

  • qemu-base – Core QEMU (no unnecessary extras like qemu-arch-extra)
  • libvirt – Required for managing virtualization backends
  • virt-manager – GUI interface for managing VMs
  • virt-viewer – Lightweight remote viewer for VMs
  • dnsmasq – Provides DHCP for NAT-based networking
  • vde2, bridge-utils – Enable advanced networking setups (bridged/tap)
  • openbsd-netcat – Used for port forwarding in some setups
  • iptables-nft – Recommended for systems using iptables with nftables backend (default on Arch)
  • swtpm – Software TPM module (needed for Windows 11)
  • ovmf – UEFI firmware for VMs (also required for Windows 11)

Optional:
Add virt-install if you prefer scripting VM setups via CLI.


πŸ”Œ Step 2: Enable and Start the libvirt Daemon

sudo systemctl enable --now libvirtd.service

This ensures the virtualization backend starts on boot.


πŸ‘€ Step 3: Add Your User to the libvirt Group

sudo usermod -aG libvirt $(whoami)

This gives your user access to manage VMs.
You'll need to log out and log back in (or reboot) for this to take effect.


πŸ”„ Step 4: Restart or Reboot

To apply group permissions immediately, reboot:

reboot

Or just restart the libvirtd service:

sudo systemctl restart libvirtd

πŸ› οΈ Step 5: Optional VM Control via Terminal

πŸ”Ή Start a VM (using virsh):

virsh list --all       # See available VMs
virsh start <vm-name>  # Start a specific VM

virsh requires root or libvirt group access.

πŸ”Ή View a VM (fullscreen via SPICE):

remote-viewer spice://localhost:5900 -f

Adjust port if using multiple VMs or custom display settings.


πŸ§ͺ Step 6: Sanity Checks

βœ… Confirm Virtualization Support:

lscpu | grep Virtualization

You should see:

  • VT-x (Intel)
  • AMD-V (AMD)

If nothing appears, enable virtualization in BIOS/UEFI.

βœ… Confirm libvirtd is active:

systemctl status libvirtd.service

πŸš€ Step 7: Launch Virt-Manager GUI

Run via app launcher or:

virt-manager

From here, you can:

  • Create VMs from ISO images
  • Use UEFI firmware (via OVMF)
  • Attach TPM device for Win11
  • Allocate CPU, RAM, storage
  • Use bridged/NAT networking

🧠 Pro Tips

  • You can install Windows 11 by:

    • Enabling UEFI (OVMF)
    • Attaching TPM (swtpm)
    • Allocating at least 4 GB RAM + 2 CPUs
  • Create disk images using qemu-img if needed:

qemu-img create -f qcow2 ~/vm_images/win11.qcow2 50G
  • For better disk performance, enable VirtIO drivers (especially for Windows guests).

πŸŽ‰ You're Done!

You now have a complete KVM/QEMU virtualization setup with virt-manager on Arch Linux.

About

Basic commands to install, configure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published