How to prepare a Windows VM for a computer-use agent
The gist
A Windows VM for an agent needs a licensed Windows edition, at least the documented VM minimums (for Windows 11: 2 virtual processors, 4 GB memory, 64 GB disk, Secure Boot and a virtual TPM), a fixed screen at 100 percent scaling, an input and screenshot channel, and a clean snapshot per task.
Words: VMForAI editors / Out / Fixed up / 5 min
A Windows VM for a computer-use agent is an ordinary Windows installation prepared for three extra jobs: being driven by software instead of a person, being watched, and being put back exactly as it was after each task. Windows has more setup steps than a Linux desktop (licensing, first-run screens, scaling), and each one can break an agent run if it is left to chance.
What hardware does a Windows agent VM need?
A Windows 11 VM needs at least the minimums Microsoft lists for virtual machines.
Table: Windows 11 virtual machine requirements, as listed by Microsoft
| Setting | Requirement |
|---|---|
| Generation | 2 (generation 1 VMs cannot be upgraded in place) |
| Storage | 64 GB or greater |
| Memory | 4 GB or greater |
| Processor | Two or more virtual processors, on a host processor that meets the Windows 11 processor requirements |
| Security | Secure Boot capable, virtual TPM enabled |
| Display (physical devices) | High definition (720p), 8 bits per colour channel |
Source: Windows 11 requirements, read 2026-11-26.
These are minimums for Windows itself. An agent's applications, a browser and screen capture come on top, so size above them; our resource sizing page collects the figures.
Which Windows licence can an agent VM use?
Use an edition and licence that cover how you run it; for short trials, Microsoft offers an evaluation. The Windows 11 Enterprise evaluation is "full-featured software for a 90-day evaluation", delivered as ISO files after registration, and the page says that once it expires "the PC will shut down every hour" (Windows 11 Enterprise evaluation, read 2026-11-26). The page also says you must sign in to the PC with a Microsoft account.
For agents this has two practical effects: an evaluation snapshot has a fixed life, and an hourly shutdown in the middle of a task looks like an agent failure. Note the evaluation's start date in the image's metadata and rebuild before it runs out.
Benchmarks hit the same constraint. OSWorld's Windows tasks "could only be used after activation due to copyright restrictions" (OSWorld project site, read 2026-11-26).
How do I build a reusable Windows image?
Build one reference installation, generalize it with Sysprep, and create every agent VM from that image.
- Install Windows in the reference VM and boot into Audit Mode.
- Install the agent's applications and your input and screenshot service. Microsoft warns not to install or update Microsoft Store apps before generalizing, because "Installing new Microsoft Store apps or updating your existing Microsoft Store apps before generalizing a Windows image will cause Sysprep to fail."
- Generalize and shut down:
%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe. Generalizing "removes computer-specific information such as installed drivers and the computer security identifier (SID)." - If the image will run as a virtual disk on the same virtualisation platform, add
/mode:vm, as Microsoft's note on that command describes.
Source for all four steps: Sysprep (Generalize) a Windows installation, read 2026-11-26. The same page says Sysprep can run "up to 1001 times on a single Windows image" on Windows 8.1 and later, after which the image must be recreated.
Microsoft's page also describes running Sysprep with an unattend answer file, which lets you script the settings a clone applies instead of clicking through them by hand.
How should the screen be set?
Set a fixed resolution and 100 percent display scaling. At 100 percent, Windows uses 96 DPI, and Microsoft's guide explains that applications that are not DPI-aware are otherwise bitmap-stretched and appear "blurry" (High DPI desktop application development on Windows, read 2026-11-26). Blur makes small text harder for a model to read, and mixed DPI awareness can make a screenshot tool and an input tool disagree about coordinates. More on this in screen resolution and DPI for computer-use agents.
How does the agent see the screen and send input?
The agent needs a small service inside the VM, or a remote desktop session, that returns screenshots and accepts input.
- A service inside the VM. OSWorld's in-VM server is a model: on Windows it takes screenshots with
ImageGrab.grab()and draws the cursor with Windows calls (OSWorld server main.py, read 2026-11-26). Input can come from pyautogui, which "works on Windows, macOS, and Linux" (PyAutoGUI documentation, read 2026-11-26). - Remote Desktop. Remote Desktop listens on port 3389 by default (Change the Remote Desktop listening port, read 2026-11-26). Microsoft notes that Professional, Enterprise, Education and Server editions "can act as hosts", and "Windows Home editions can't serve as Remote Desktop hosts" (Enable Remote Desktop, read 2026-11-26). From Linux, the open-source FreeRDP client sets the size with
/size(default 1024x768) and can redirect the clipboard and a folder with/clipboardand/drive(xfreerdp manual, read 2026-11-26).
Microsoft's Remote Desktop page warns that enabling it "opens a port on your PC" and recommends Network Level Authentication. Keep port 3389 reachable only from the harness's network, never from the internet.
How do I reset the VM between tasks?
Reset the VM by restoring a snapshot taken at the clean, signed-in desktop. This is the same method OSWorld describes: "The snapshot feature also enables efficient reset of the virtual environment" (OSWorld paper, section 2.2, read 2026-11-26). The steps:
- Boot a fresh clone, sign in, wait for start-up tasks and updates to finish.
- Check the screen size, scaling and the input service.
- Shut down cleanly or pause, and take the snapshot.
- Restore it before every task, and never reuse a VM that ran a task without restoring.
Turn off automatic updates during runs, or apply them only when you rebuild the snapshot, so two runs of the same task start from the same Windows build.
What we read for this article
- Windows 11 requirements, read 2026-11-26
- Windows 11 Enterprise evaluation, read 2026-11-26
- Sysprep (Generalize) a Windows installation, read 2026-11-26
- High DPI desktop application development on Windows, read 2026-11-26
- Enable Remote Desktop on your PC, read 2026-11-26
- Change the Remote Desktop listening port, read 2026-11-26
- xfreerdp manual, Debian bookworm, read 2026-11-26
- PyAutoGUI documentation, read 2026-11-26
- OSWorld server main.py, read 2026-11-26
- OSWorld paper (arXiv 2404.07972), read 2026-11-26
- OSWorld project site, read 2026-11-26
Asked
What are the minimum VM settings for Windows 11?
Microsoft lists generation 2, 64 GB or more of disk, 4 GB or more of memory, two or more virtual processors, and Secure Boot with a virtual TPM enabled. A host processor that meets the Windows 11 processor requirements is also needed.
Can I use the Windows evaluation edition for agent testing?
Microsoft offers a 90-day evaluation of Windows 11 Enterprise as ISO files, aimed at IT professionals trying it for their organisation. After it expires, the page says the PC shuts down every hour, so evaluation images need rebuilding before day 90 and are no substitute for a licence in long-running use.
Which Windows editions can accept Remote Desktop connections?
Professional, Enterprise, Education and Windows Server editions can host Remote Desktop. Microsoft says Windows Home editions can't serve as Remote Desktop hosts.
Should I run Sysprep before cloning an agent VM?
Yes, when you deploy one image to many VMs. Generalizing removes computer-specific information such as the security identifier (SID). Windows 8.1 and later allow up to 1001 Sysprep runs on one image.