Guide to set up virtual machines on Fedora

Overview

Hardware

Begin

During the Fedora installation wizard

Uncheck Enable Root user

(Optional) Fedora Desktop Configuration

Task Manager (aka Taskbar in Windows)

Disable floating Task Manager:

  1. Right-click Task Manager
  2. Select Show Panel Configuration
  3. Set Floating to Disabled

Pin Konsole to Task Manager:

  1. Open the Application Launcher
  2. Search or type Konsole
  3. Right-click Konsole
  4. Pin Konsole to Task Manager

Set DNS to Cloudflare

  1. Right-click the Wi-Fi icon in the tray icon area

  2. Select Configure Network Connections

  3. Select the IPv6 tab

  4. Set Method to Disabled

  5. Select the IPv4 tab

  6. In Other DNS Servers, type 1.1.1.1, 1.0.0.1

  7. Click Clipboard in the “tray icon area”

  8. Click the Configure Clipboard icon (two lines)

System Settings

Display & Monitor

Mouse & Touchpad > Touchpad

Mouse > SYNA8008:00 06CB:CE58 Mouse

Mouse > TPPS/2 Elan TrackPoint

Wallpaper

Colors & Themes

Power Management

Screen Locking Lock screen automatically: Never

Dolphin (File Manager)

Set View Settings to detailed list like Windows:

  1. Click the down arrow in the View Settings icon in the toolbar
  2. Select Details
  3. Select the Zoom’s minus button until it is greyed-out

Add convenient Toolbar Actions:

  1. Right-click the top bar (to the left of the address bar)
  2. Configure Toolbars
  3. Add Up to the right of Forward
  4. Add Refresh to the right of Up
  5. Add Places next to View Settings
  6. Add New Tab and New Window to the right of Split

Virtualization

Reference https://docs.fedoraproject.org/en-US/quick-docs/virtualization-getting-started/

# Check CPU virtualization support
grep -E '^flags.*(vmx|svm)' /proc/cpuinfo

# View the Virtualization Package Group
dnf group info virtualization

# Install the Virtualization Package Group
sudo dnf @virtualization

# Start the libvirtd service
sudo systemctl start libvirtd

# Start the service on boot
sudo systemctl enable libvirtd

# Verify that the KVM kernel modules are properly loaded
lsmod | grep kvm

Creating the new Windows 11 virtual machine

Download/move Windows 11 and Kali Linux .iso files somewhere (e.g., ~/Downloads):

  1. Open Virtual Machine Manager from the Application Launcher
  2. Select the Create a new virtual machine icon at the top-left
  3. Select Local install media (ISO image or CDROM) > Forward
  4. Select Browse
  5. Select Browse Local
  6. Locate the .iso file > Forward
  7. Select Yes when prompted:

The emulator may not have search permissions from the path ____. Do you want to correct this now?

Recommended minimum virtualized specifications (Windows 11):

Before selecting Finish:

Virtualized hardware details (Windows 11)

Overview

This ensures the Windows 11 Secure Boot requirement:

Firmware:

UEFI x86_64: /usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2

Boot Options

NIC

Prevent Windows 11 installation configuration from accessing the internet:

Begin Installation

Windows Desktop

More resolutions in Windows 11’s Display settings:

Download the drivers:

# Open Konsole and paste:
wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso
  1. Open Virtual Machine Manager
  2. Double-click the new Windows 11 VM
  3. Click the blue icon with the “i” at the top-left to show virtual hardware details
  4. Select SATA CDROM 1 from the left > Browse
  5. Select Browse Local
  6. Find and select virtio-win.iso
  7. Select Power on the virtual machine button at the top-left
  8. In Windows, go to This PC and run virtio-guest-tools.exe
  9. Restart

You should now see more resolutions available in the display settings.

Create a virtual machine snapshot

Now is a good time to create a snapshot:

  1. From the virtual hardware details screen, click the icon with the two monitors located to the right of the blue icon with the “i”
  2. Select ”+” at the bottom-left
  3. Verify Snapshot Mode: external is selected
  4. Select Finish (the snapshot is created almost instantly)

Create the new Kali virtual machine

  1. Open Virtual Machine Manager from the Application Launcher
  2. Select the Create a new virtual machine icon at the top-left
  3. Select Local install media (ISO image or CDROM) > Forward
  4. Select Browse
  5. Select Browse Local > locate the .iso file6.
  6. Uncheck Automatically detect from the installation media / source
  7. Under Choose the operating system you are installing, type Debian and select Debian 13 from the list > Forward

My recommended minimum virtualized specifications:

Before selecting Finish:

Virtualized hardware details (Kali)

Overview

To use without Secure Boot:

Firmware:

UEFI x86_64: /usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2

Boot Options

NIC

Begin Installation

Kali Installation

Hostname:

Domain name:

Real name of the user:

Username for the new account:

Kali Desktop Configuration

Disable screensaver

Disable automatic sleep and off

Create a private network for the VMs

Go to the Virtual Machine Manager window

Select Edit > Connection Details

Select the Virtual Networks tab

Select the ”+” icon at the bottom-left

Set Name: hostonly

Add the second, new virtual network to both VMs

Topology

                 (Internet)


            [NAT through Fedora host]

          ┌─────────────────────┐
          │ Fedora Host (Wi-Fi) │
          └─────────────────────┘

         ┌───────────┴───────────┐
         │ Private Host-Only LAN │
         └───────────┬───────────┘

        ┌────────────┼────────────┐
        │            │            │
   Kali VM     Windows 11 VM     (optional other VMs)

The first virtual network is using Network Address Translation to provide internet access through the host’s real network interface. Creating this new one will not use NAT and use a different private subnet, which will only be accessible by VM to VM and Host to VM. We disabled Windows VM’s virtual Ethernet adapter, so it won’t have access to the internet.

  1. Go to Show virtual hardware details for both VMs and select Add Hardware
  2. Select Network

Verify Kali VM can “see” the Windows VM

Get Windows IP:

Ping Windows VM from Kali VM

If it is not working, allow ICMP in Windows Firewall

Control Panel > System and Security > Windows Defender Firewall > Advanced settings > Inbound Rules

Assuming Windows is using the Public/Private network setting, enable File and Printer Sharing (Echo Request - ICMPv4-In) for the correct profile.

Enable Network discovery and file sharing

Enable folder sharing

Test the SMB share