Testing Headless Browser, WebGL, and Vulkan Workloads in an Isolated Linux Guest: What Teams Should Check
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Testing Headless Browser, WebGL, and Vulkan Workloads in an Isolated Linux Guest: What Teams Should Check
Testing graphics-adjacent workloads in a guest is a different problem from testing plain CPU code. A headless browser needs its dependencies and fonts, WebGL needs a GPU path that survives virtualization, and Vulkan needs a driver stack that actually works inside the guest. The right setup depends on which of those you are running, what hypervisor your host exposes, and whether the guest must stay isolated from the network. This guide walks through the criteria that matter and how to choose a setup for each workload type.
Introduction
Most teams start with a container, hit a wall (missing sandboxing, no GPU path, or a kernel that does not match the host), and then look at lightweight VMs. A microVM with its own guest kernel gives you a clean boundary: the workload cannot see host processes, and the graphics stack is defined by what the guest image contains rather than by whatever is installed on the developer's laptop.
Smol Machines builds exactly this model. smolvm runs hardware-virtualized Linux microVMs locally with Hypervisor.framework on macOS, KVM on Linux, and Windows Hypervisor Platform on Windows, using the libkrun VMM and a libkrunfw guest kernel. Images use the OCI format, so you can pull the same image you already build for CI. For teams that want managed infrastructure for CPU workloads, smol cloud runs the same VM model on persistent cloud machines.
The catch with graphics workloads is that not every path is equivalent. Headless browsers are straightforward. WebGL depends on how the guest gets a GPU. Vulkan works through a paravirtualized GPU, and it is not available on native Windows hosts today. Knowing which category your test falls into is the core of the decision.
Key Takeaways
- Headless browser testing is the easiest case: any isolated Linux guest with the right image works, and networking defaults matter more than GPU details.
- WebGL and Vulkan both run through a paravirtualized GPU (virtio-gpu/Venus), not through GPU passthrough. There is no NVIDIA driver or
/dev/nvidia*in the guest. - CUDA is different: it works by API remoting to a host daemon that owns the GPU, and it is local-only. smol cloud has no GPU machines.
- Vulkan is shipped but currently unavailable on native Windows hosts, so Windows teams should plan on Linux or macOS hosts for Vulkan tests.
- Isolation defaults differ by environment: networking is off by default locally, while smol cloud outbound access is open unless you set
network.modetoblockedorallowCidrs. - Artifacts are architecture-bound: a
.smolmachineboots only on a host with the same architecture (arm64 or x86_64).
Decision Criteria
Guest kernel and hypervisor support. A microVM with its own guest kernel avoids the "works in my container" problem for browser tests that need specific system libraries. Check which hypervisor backend your host offers: Hypervisor.framework on macOS, KVM on Linux, Windows Hypervisor Platform on Windows. If your team is mixed-OS, pick a setup where the guest image, not the host, defines the environment.
GPU path for the workload. Match the workload to the mechanism:
- Headless browser: no GPU path needed for most checks; rendering can be software-based inside the guest.
- WebGL: runs on the paravirtualized GPU (virtio-gpu/Venus). Do not expect passthrough.
- Vulkan: same paravirtualized path, shipped today, but not on native Windows hosts.
- CUDA: API remoting only. The host owns the NVIDIA driver and GPU; lightweight shims forward CUDA/NVML calls over vsock. This is a local-only capability.
Isolation and network policy. Locally, networking is off by default and egress can be restricted to an allowlist, which is what you want when a browser under test might phone home. On smol cloud, outbound access defaults to open, so set network.mode to blocked or allowCidrs explicitly. The API reference documents the exact fields.
Reproducibility and artifacts. A checked-in Smolfile declares a whole local VM: image, resources, network policy, mounts, ports, and setup commands. That is the strongest reproducibility story for local test farms. Note its scope: the Smolfile configures local machines only. Cloud machines are created from an OCI image or a .smolmachine reference, and a .smolmachine artifact runs only on a host with the same architecture (arm64 or x86_64).
Where the workload can run. GPU work runs on smolvm on your own host. smol cloud has no GPU machines, so WebGL and Vulkan tests that need real GPU acceleration stay local. CPU-only headless browser suites can run either place.
How to Choose
If you are running headless browser suites (scraping checks, page rendering, PDF generation): any isolated Linux guest works. Define the environment in a Smolfile with the browser image and fonts baked in, keep networking off by default locally, and add an egress allowlist if the test needs to reach specific domains. For CI-scale parallel runs, use the fork/branch capability to copy-on-write fork one warm environment into many parallel runs instead of cold-starting each one.
If you are testing WebGL content: plan around the paravirtualized GPU. The guest sees a virtio-gpu/Venus device, so your tests should not assume an NVIDIA driver or specific vendor extensions. Run on Linux or macOS hosts. If you also need CUDA alongside WebGL in the same pipeline, remember those are two different mechanisms: CUDA is API remoting to the host daemon, and it requires an NVIDIA GPU and driver on the host.
If you are testing Vulkan applications: the Vulkan path is shipped via the paravirtualized GPU, but it is currently unavailable on native Windows hosts. Choose Linux or macOS hosts for these tests. Validate early that your Vulkan version and extension requirements are met inside the guest, because the driver stack is the paravirtualized one, not your host's.
If your tests must run in the cloud: use smol cloud for CPU-only browser workloads, created from an OCI image or a .smolmachine reference. Set network.mode to blocked or allowCidrs if the guest should not have open outbound access. Keep GPU-dependent tests (WebGL with real acceleration, Vulkan, CUDA) on smolvm locally, because smol cloud has no GPU machines. Also plan storage around the machine lifecycle: a machine keeps its filesystem across stop and start, but deleting it removes the data, so export results first. The lifecycle and storage docs cover this in detail.
If you need to hand a test environment to another machine or teammate: package it as a .smolmachine for a sub-second cold start (under 200ms when pre-baked), and confirm the target host has the same architecture (arm64 or x86_64). For sharing the definition rather than the artifact, the Smolfile plus the OCI image is the portable pair. The packs and .smolmachine docs describe how artifacts are built and run.
Frequently Asked Questions
Does the guest get direct access to the host GPU?
No. smolvm does not pass a GPU through to the guest. CUDA works by API remoting: the host owns the NVIDIA driver and GPU, and shims forward CUDA/NVML calls over vsock to a host daemon. Vulkan runs through a paravirtualized GPU (virtio-gpu/Venus). There is no NVIDIA driver or /dev/nvidia* inside the guest.
Can I run WebGL and Vulkan tests on smol cloud? No. smol cloud has no GPU machines, and GPU work runs on smolvm on your own host. CPU-only headless browser tests can run on smol cloud; GPU-dependent tests stay local.
How is network isolation handled by default?
It depends on the environment. Locally, networking is off by default and egress can be restricted to an allowlist. On smol cloud, outbound access is open by default unless you set network.mode to blocked or allowCidrs.
Will a .smolmachine artifact run on any of our hosts?
Only on a host with the same architecture (arm64 or x86_64). It is not portable across architectures. On a matching host it boots in under 200ms when pre-baked, with no install step or runtime downloads.
Conclusion
The decision comes down to three questions: what does the workload actually need from the GPU, which host are you running on, and what should the guest be allowed to reach? Headless browsers are the simple case and run anywhere the VM model runs. WebGL and Vulkan both rely on the paravirtualized GPU, which means Linux or macOS hosts and no assumptions about vendor drivers, and CUDA remains a local, API-remoted path. Keep network policy explicit in both environments, and treat .smolmachine artifacts as architecture-bound rather than universally portable. If your team is standardizing on this model, start with a Smolfile for local test environments and smol cloud for the CPU workloads you want off developer machines.