Virtual Machines on Fedora 39: The Ultimate KVM/QEMU Setup

Shreyas SShreyas S
4 min read

Virtualization isn’t just for enterprise servers anymore— With Fedora 39 and the native support for KVM/QEMU, spinning up lightweight, efficient virtual machines is not only possible—it’s seamless. Whether you're testing a new Linux distro, building a home lab, or isolating dev environments, this guide will walk you through setting up a rock-solid virtualization stack on your Fedora 39 system using KVM and QEMU, step by step.

STEP 1: Install KVM/QEMU on Fedora

Pre-verification check. Run the below command. If the output is 1 or more, virtualization is supported. If 0, enable it in BIOS.

egrep -c '(vmx|svm)' /proc/cpuinfo

After verification/ enabling virtualization, run the below commands to install KVM, QEMU & Libvirt

#Installation
sudo dnf install -y @virtualization
sudo systemctl enable --now libvirtd

# Verify the installation. It should now show and error.
sudo virsh list --all

Add user to the libvirt Group (Optinal)

sudo usermod -aG libvirt $(whoami)

STEP 2: Set-up Fedora Server VM

Download Fedora Server ISO

wget https://download.fedoraproject.org/pub/fedora/linux/releases/39/Server/x86_64/iso/Fedora-Server-dvd-x86_64-39-1.5.iso

#Create a VM with Virt-Manager
virt-manager

If you face any error during ISO file download, visit the official download page and download the latest version manually from here.

NOTE: Keep track of the directory where you’re saving this file. It’ll come handy during VM creation.

When the Virt-Manager is launched, follow the below steps for VM set-up.

  1. In virt-manager, select “Local install media (ISO).”

  2. Click BrowseBrowse Local.

  3. Navigate to the folder where the ISO is located (~/Downloads or /home/$USER/).

  4. Select the Fedora-Server-dvd-x86_64-*.iso file.

  5. Proceed with VM setup.

If you face any error like ‘The emulator may not have search permissions…..’ , simply click ‘Yes’ and proceed with the installation.

After the ISO file is fetched, you’ll need to enter specifications for your VM resources. Ensure you allocate just enough resources (RAM & CPU) for the VM to function. Allocating too much might slow down your system and applications.

Here’s a demo setup.

STEP 3: Final Check-list and set-up completion

Quick Checklist Before Clicking "Finish"

Name: fedora39 (Anything of choice)
OS: Fedora Linux 39 (Correct)
Install Media: Local CDROM/ISO (Correct)
Memory: 3GB (3049 MiB) → Works, but 4GB (4096 MiB) is recommended if you can allocate more.
CPUs: 2 → Good for a lightweight server setup.
Storage: 20GB → Should be fine, but increase if you plan to store logs/zones extensively.
Network Selection: Not expanded → Ensure the VM is set up to use NAT or Bridge mode (NAT is fine for now).

After verifying the above details, click on ‘Finish’ and you’ll be having a fresh VM ready for INFRA and DEV experiments 🎉. It should look similar to this.

VALIDATION CHECKS

  1. Check Network Connectivity

     ping -c 4 8.8.8.8
    
  2. Check IP address

     #This is your server IP
     #Will be useful for accessing the VM via SSH
     ip a
    
  3. Update System

     dnf update -y
    

These checks will make sure the environment is healthy for testing-deployment.

CHALLENGES & SOLUTIONS

Engineers who are either new to Fedora/Linux or KVM might get uncomfortable using the VM. This sections is specifically for suggestions to make like easier for people who are just getting started.

  1. No cursor available inside VM.

  2. Unable to copy/paste commands into the VM console.

Solution: Best way to handle is to just SSH into your Fedora VM from your system CLI.

#Confirm your VM IP using below command on your VM console.
ip a | grep inet

#Establish SSH connection from your Host machine
ssh root@<VM_IP>

#Example: ssh root@192.168.124.54

Note that in each new session of VM, the IP address might change. Make sure to validate before attempting to SSH into the server.

Hope this article contributed something to the community.

Happy Learning !!! and I’ll bring some advanced setup guide like binding static IP for your VM for reducing manual work and file handling commands to further ease out operations inside the VM as well.

0
Subscribe to my newsletter

Read articles from Shreyas S directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shreyas S
Shreyas S