Ollama and OpenCode: Windows VM setup and Qwen comparison

Set up Ollama on a Windows host and OpenCode in a Windows 11 VM, configure 64k context, and compare Qwen models on an RTX 3060 with 12 GB VRAM.

Player not loading? Watch on YouTube

This tutorial pairs Ollama on a Windows host with OpenCode inside a Windows 11 virtual machine. The host handles model inference while the agent runs commands in the VM over the home network. The setup separates command execution from the host; the VM still sends model requests to Ollama.

The walkthrough raises Ollama's context length to 64k, changes the model storage folder, and downloads Qwen 3.5 4B, Qwen 3.5 9B and Qwen 3 Coder 30B. The presenter enables network access, adds a firewall rule scoped to private networks and recommends a stable host IP address. OpenCode's Windows 64-bit desktop app connects through a custom OpenAI-compatible provider. Its base URL needs the /v1 suffix; the presenter reports a 404 error without it and leaves the API key empty.

The local LLM comparison uses an RTX 3060 with 12 GB VRAM. In one question test, the 4B model generates more tokens per second but takes 34 seconds overall, versus 17 seconds for the 30B model. In the file-creation task, the 9B model stops repeatedly and writes variable names instead of values. The presenter reports that 30B creates the folder and file in about four minutes, then corrects the Windows version after a follow-up. These results describe this demonstration, rather than a general model ranking.

The final steps disable OpenCode permission prompts inside the VM and save a VirtualBox snapshot for restoring the configured environment.