r/qemu_kvm • • 3h ago

virt-manager: automatic resolution resizing work only on 4096x2000

Thumbnail gallery
2 Upvotes

Hi everyone,

I'm currently working with virt-manager on Fedora 45 with KDE Plasma, and the guest display settings and automatic resolution resizing to fit the virt-manager window are driving me crazy.

Auto-resizing only works when the guest resolution is set to 4096x2000. As soon as I pick a resolution where I can actually read anything, the window auto-resize stops working (and I end up with black bars on the left and right).

My guests are Debian 13 with KDE Plasma and Fedora 45 with KDE Plasma, using both X11 and Wayland—the exact same issue occurs on all of them. Is there any trick to fix this, other than setting display scaling to 250%?

The VM is set to default settings:

<graphics type="spice" autoport="yes">
  <listen type="address"/>
  <image compression="off"/>
</graphics>

<channel type="spicevmc">
  <target type="virtio" name="com.redhat.spice.0"/>
  <address type="virtio-serial" controller="0" bus="0" port="2"/>
</channel>
<channel type="unix">
  <target type="virtio" name="org.qemu.guest_agent.0"/>
  <address type="virtio-serial" controller="0" bus="0" port="1"/>
</channel>

<video>
  <model type="virtio" heads="1" primary="yes" device="virtio-vga"/>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
</video>

r/qemu_kvm • • 10h ago

I got tired of letting AI coding agents run random commands on my workstation, so I built a self-hosted KVM/libvirt "airlock" they can control over MCP (3 min demo)

0 Upvotes

I love using AI coding agents (Claude Code, Cursor, etc.), but I really hated letting them run npm install, Docker Compose stacks, headless browsers, and random test scripts directly on my daily driver—right next to my SSH keys, browser profiles, and personal files.

Docker/devcontainers helped a bit, but I wanted actual kernel-level isolation and the ability to run full Docker fleets inside a disposable environment that I can snapshot and nuke in seconds—using my own Linux KVM hardware instead of paying for a cloud sandbox.

So I built AirlockVM (MIT licensed, 100% self-hosted).

The 3-minute video above shows the full flow end-to-end: probing a KVM host, provisioning an isolated VM, syncing an app, and hitting it from the host browser.

How it works

You keep editing code in your IDE on your workstation, while zero runtime workloads execute on your host OS:

textWorkstation (IDE, Git, Browser — NO runtime workloads)
        │  rsync / SSH
        ▼
Local or Remote Linux KVM Host (libvirt / QEMU)
        └── Dedicated Guest VM (<project>-vm)
              └── Docker fleets, builds, tests, untrusted code

Why I built it this way (the self-hosted / homelab bits)

  • **Zero-**sudo (rootless) hypervisor support: You don't have to hand your AI agent root on your homelab server. It supports a dedicated least-privilege account (libvirt/kvm groups only), ACL storage pools, and user-level systemd socket proxies (~/.config/systemd/user/).
  • No SaaS, no telemetry: Pure Python 3.11+, KVM/QEMU/libvirt, cloud-init, rsync, and systemd. State is stored locally as plain YAML (vm.yaml) in ~/.airlock/inventory/.
  • Doesn't starve your host: Auto-probes your hypervisor's CPU threads, RAM, and storage, allocates proportional headroom, and picks collision-free static DHCP IPs + MACs on virbr0.
  • Fast cloning & rollbacks: Pre-bakes a golden Ubuntu 24.04 qcow2 base image (and can stream/seed it to other KVM hosts with SHA-256 verification) + external disk snapshots so you can revert a broken guest in seconds.
  • Works with or without AI: Comes with a standalone airlock CLI (probe, deploy, sync, exec, snapshot, diagnose, drift) and an MCP server (28 tools) with a one-command connector for Claude Code, Cursor, VS Code, Windsurf, JetBrains, and Antigravity.

Current limitations (to save you a click)

  • Linux KVM/libvirt only right now (local or remote over SSH). No Proxmox API or macOS native hypervisor backend yet.
  • Still early—would genuinely love feedback, edge-case reports, or roasting of the architecture.

GitHub (MIT): https://github.com/simplybarter/AirlockVM

Happy to answer any questions about the rootless libvirt setup, the socket proxying, or why I went with KVM + cloud-init instead of containers/Incus/Vagrant!