Skip to content

kev2600/windows-vm-on-bazzite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

✅ Windows 10 VM on Bazzite (Silverblue) with VirtIO and QEMU Guest Agent

🧩 System Context

  • Host OS: Bazzite 42.20250915 (Silverblue, immutable)
  • Host Device: ASUS TUF Gaming A16 FA607NU
  • CPU: AMD Ryzen 5 7535HS
  • GPU: NVIDIA RTX 4050 Max-Q + AMD Radeon 680M (Hybrid)
  • Secure Boot: Disabled
  • Container Tool: Distrobox (Fedora-based)
  • Goal: Run Windows 10 VM via Virt-Manager with VirtIO drivers and guest agent

✅ Phase 1: Container Setup

distrobox create --name virtbox --image fedora \
  --volume ~/Downloads:/mnt/Downloads

distrobox enter virtbox

sudo dnf install virt-manager -y

virsh list --all

What Worked

  • Container launched successfully
  • Virt-Manager installed and opened
  • Host ISO folder mounted correctly

What Failed

  • Using --bind instead of --volume (invalid flag)
  • Running systemctl inside container (no systemd)
  • virsh CLI failed due to missing polkit/systemd

✅ Phase 2: VM Creation in Virt-Manager

  • Launch Virt-Manager:

    virt-manager
  • Create new VM:

    • Local install media (ISO)
    • ISO path: /mnt/Downloads/Win10_22H2_English_x64v1.iso
    • OS type: Microsoft Windows → Windows 10
    • RAM: 8112 MB
    • CPUs: 8
    • Disk: 300 GB
    • Customize configuration before install

✅ Phase 3: QEMU Configuration

  • Add second CD-ROM:

    • Bus type: SATA or SCSI
    • Source path: /mnt/Downloads/virtio-win-0.1.285.iso
  • Change disk bus to VirtIO

  • Change NIC model to VirtIO

  • (Optional) Set display to Spice + QXL

  • Confirm boot order → Windows ISO first


✅ Phase 4: Windows Installation

  • Inside installer:
    • "Where do you want to install Windows?"
    • "Load driver" → Browse VirtIO CD-ROM
    • Folder: viostor or vioscsiamd64.inf file
    • Disk appears → Select → Continue install

✅ Phase 5: Post-Install Driver Setup

  • Open VirtIO CD-ROM in File Explorer

  • Install drivers manually:

    NetKVM\w10\amd64\NetKVM.inf
    viostor\w10\amd64\viostor.inf
    vioserial\w10\amd64\vioser.inf
    Balloon\w10\amd64\balloon.inf (optional)
    
  • Install QEMU Guest Agent:

    guest-agent\qemu-ga-x86_64.msi
  • Reboot VM


✅ Phase 6: Integration Checks

  • Use Virt-Manager GUI to reboot/shutdown
  • Confirm graceful shutdown
  • Clipboard + resolution sync (if Spice/QXL enabled)
  • Device Manager shows no missing drivers

What Failed

  • virsh CLI inside container blocked by missing polkit/systemd
  • virsh from host showed no VMs (container isolation)

✅ Phase 7: Desktop Launcher Integration

nano ~/.local/share/applications/virt-manager-distrobox.desktop
[Desktop Entry]
Name=Virt-Manager (Distrobox)
Exec=distrobox enter virtbox -- virt-manager
Icon=/home/kev/.local/share/icons/virt-manager.png
Type=Application
Categories=System;Virtualization;
Terminal=false
mkdir -p ~/.local/share/icons
mv ~/Downloads/virt-manager.png ~/.local/share/icons/
chmod +x ~/.local/share/applications/virt-manager-distrobox.desktop

✅ Phase 8: Guest Agent Integration

Snapshot Discipline

sudo virsh snapshot-create-as win10 post-activation \
  "Clean state after Windows activation" --disk-only --atomic

sudo virsh snapshot-list win10

XML Editing Protocol

sudo virsh dumpxml win10 > ~/Documents/win10-recovery.xml
nano ~/Documents/win10-recovery.xml

Insert inside <devices>:

<channel type='unix'>
  <source mode='bind'/>
  <target type='virtio' name='org.qemu.guest_agent.0'/>
  <address type='virtio-serial' controller='0' bus='0' port='2'/>
</channel>

Redefine and Reboot

sudo virsh define ~/Documents/win10-recovery.xml
sudo virsh reboot win10

Verify Agent Connection

sudo virsh qemu-agent-command win10 '{"execute":"guest-info"}'

❌ What Didn’t Work

  • Editing XML in OnlyOffice (changes didn’t persist)
  • Searching for socket file (not created due to FD-based channel)
  • Assuming guest agent was broken when it was miswired

🚫 What to Avoid

  • GUI editors that don’t overwrite XML cleanly
  • Adding multiple <source> blocks (libvirt rejects it)
  • Expecting a named socket file when QEMU uses FD-based channel
  • Running virsh snapshot-list or reboot without checking VM state:
    sudo virsh domstate win10

🧭 Final State

  • Windows 10 VM running with VirtIO drivers and QEMU Guest Agent
  • Guest agent channel wired via <channel> block
  • Host can issue agent commands:
    sudo virsh qemu-agent-command win10 '{"execute":"guest-info"}'
  • No missing drivers in Device Manager
  • Snapshot created post-activation
  • Launcher integration working via Distrobox

About

Windows 10 VM on Bazzite (Silverblue) with VirtIO and QEMU Guest Agent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published